This commit is contained in:
Simon Vieille 2015-05-22 12:58:07 +02:00
parent caef8d8824
commit 0a79bfdd8c
10 changed files with 419 additions and 412 deletions

View file

@ -15,7 +15,7 @@
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/bootstrap.css') }}" /> <link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/bootstrap.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/clean-blog.css') }}" /> <link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/clean-blog.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/syntaxhighlighter/styles/shThemeEclipse.css') }}" /> <link rel="stylesheet" href="{{ asset('bundles/deblanblog/syntaxhighlighter/styles/shThemeEclipse.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/main.css') }}" /> <link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/main.css') }}?v=2" />
{% endblock %} {% endblock %}
{{ get_var('CssBlock')|raw }} {{ get_var('CssBlock')|raw }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -124,6 +124,19 @@
</header> </header>
{% spaceless %}
{% if session_user.hasFlash('message') %}
{% set flash = session_user.flash('message') %}
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ include(flash.template, {message: flash.message}) }}
</div>
</div>
</div>
{% endif %}
{% endspaceless %}
{% block body %}{% endblock %} {% block body %}{% endblock %}
{# {#
@ -161,12 +174,6 @@
<div id="content" class="ctn"> <div id="content" class="ctn">
<div class="trow"> <div class="trow">
<section> <section>
{% spaceless %}
{% if session_user.hasFlash('message') %}
{% set flash = session_user.flash('message') %}
{{ include(flash.template, {message: flash.message}) }}
{% endif %}
{% endspaceless %}
{{ get_var('Notice')|transform_url }} {{ get_var('Notice')|transform_url }}

View file

@ -1,63 +1,63 @@
{% extends "::base.html.twig" %} {% extends "::base.html.twig" %}
{% block breadcrumb %} {% block breadcrumb %}
<li><a href="{{ cms_path('homepage') }}">Accueil</a></li> <li><a href="{{ cms_path('homepage') }}">Accueil</a></li>
<li class="sep"> » </li> <li class="sep"> » </li>
<li>Catégorie « <a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug}) }}">{{ page.object }}</a> »</li> <li>Catégorie « <a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug}) }}">{{ page.object }}</a> »</li>
{% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %}
<li class="sep"> » </li> <li class="sep"> » </li>
<li>Page {{ page.pager.currentPage }}</li> <li>Page {{ page.pager.currentPage }}</li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% if page.pager.nbResults == 0 %} {% if page.pager.nbResults == 0 %}
<div class="alert alert-info">Aucun article disponible.</div> <div class="alert alert-info">Aucun article disponible.</div>
{% endif %} {% endif %}
{% for post in page.pager %} {% for post in page.pager %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{% if not loop.first %} {% if not loop.first %}
<hr /> <hr />
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
{{ include('DeblanBlogBundle:Default:thePost.html.twig') }} {{ include('DeblanBlogBundle:Default:thePost.html.twig') }}
{% endfor %} {% endfor %}
{% if page.pager.hasPreviousPage or page.pager.hasNextPage %} {% if page.pager.hasPreviousPage or page.pager.hasNextPage %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<hr /> <hr />
<ul class="pager"> <ul class="pager">
{% if page.pager.hasPreviousPage %} {% if page.pager.hasPreviousPage %}
<li class="previous"> <li class="previous">
<a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug, page: page.pager.getPreviousPage }) }}">Précédent</a> <a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug, page: page.pager.getPreviousPage }) }}">Précédent</a>
</li> </li>
{% endif %} {% endif %}
{% if page.pager.hasNextPage %} {% if page.pager.hasNextPage %}
<li class="next"> <li class="next">
<a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug, page: page.pager.getNextPage }) }}">Suivant</a> <a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug, page: page.pager.getNextPage }) }}">Suivant</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block main_menu_bind %} {% block main_menu_bind %}
{% if page.pager.hasPreviousPage %} {% if page.pager.hasPreviousPage %}
<li class="bind"><a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug, page: page.pager.getPreviousPage}) }}"><span class="glyphicon glyphicon-backward"></span></a></li> <li class="bind"><a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug, page: page.pager.getPreviousPage}) }}"><span class="glyphicon glyphicon-backward"></span></a></li>
{% endif %} {% endif %}
{% if page.pager.hasNextPage %} {% if page.pager.hasNextPage %}
<li class="bind"><a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug, page: page.pager.getNextPage}) }}"><span class="glyphicon glyphicon-forward"></span></a></li> <li class="bind"><a href="{{ cms_path('category', {id: page.object.id, category: page.object.slug, page: page.pager.getNextPage}) }}"><span class="glyphicon glyphicon-forward"></span></a></li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -1,57 +1,57 @@
{% extends "::base.html.twig" %} {% extends "::base.html.twig" %}
{% block breadcrumb %} {% block breadcrumb %}
<li><a href="{{ cms_path('homepage') }}">Accueil</a></li> <li><a href="{{ cms_path('homepage') }}">Accueil</a></li>
{% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %}
<li class="sep"> » </li> <li class="sep"> » </li>
<li>Page {{ page.pager.currentPage }}</li> <li>Page {{ page.pager.currentPage }}</li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% for post in page.pager %} {% for post in page.pager %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{% if not loop.first %} {% if not loop.first %}
<hr /> <hr />
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
{{ include('DeblanBlogBundle:Default:thePost.html.twig', {post: post}) }} {{ include('DeblanBlogBundle:Default:thePost.html.twig', {post: post}) }}
{% endfor %} {% endfor %}
{% if page.pager.hasPreviousPage or page.pager.hasNextPage %} {% if page.pager.hasPreviousPage or page.pager.hasNextPage %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<hr /> <hr />
<ul class="pager"> <ul class="pager">
{% if page.pager.hasPreviousPage %} {% if page.pager.hasPreviousPage %}
<li class="previous"> <li class="previous">
<a href="{{ cms_path('homepage', {page: page.pager.getPreviousPage}) }}">Précédent</a> <a href="{{ cms_path('homepage', {page: page.pager.getPreviousPage}) }}">Précédent</a>
</li> </li>
{% endif %} {% endif %}
{% if page.pager.hasNextPage %} {% if page.pager.hasNextPage %}
<li class="next"> <li class="next">
<a href="{{ cms_path('homepage', {page: page.pager.getNextPage}) }}">Suivant</a> <a href="{{ cms_path('homepage', {page: page.pager.getNextPage}) }}">Suivant</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block main_menu_bind %} {% block main_menu_bind %}
{% if page.pager.hasPreviousPage %} {% if page.pager.hasPreviousPage %}
<li class="bind"><a href="{{ cms_path('homepage', {page: page.pager.getPreviousPage}) }}"><span class="glyphicon glyphicon-backward"></span></a></li> <li class="bind"><a href="{{ cms_path('homepage', {page: page.pager.getPreviousPage}) }}"><span class="glyphicon glyphicon-backward"></span></a></li>
{% endif %} {% endif %}
{% if page.pager.hasNextPage %} {% if page.pager.hasNextPage %}
<li class="bind"><a href="{{ cms_path('homepage', {page: page.pager.getNextPage}) }}"><span class="glyphicon glyphicon-forward"></span></a></li> <li class="bind"><a href="{{ cms_path('homepage', {page: page.pager.getNextPage}) }}"><span class="glyphicon glyphicon-forward"></span></a></li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -1,28 +1,28 @@
{% extends "::base.html.twig" %} {% extends "::base.html.twig" %}
{% block breadcrumb %} {% block breadcrumb %}
<li><a href="{{ cms_path('homepage') }}">Accueil</a></li> <li><a href="{{ cms_path('homepage') }}">Accueil</a></li>
<li class="sep"> » </li> <li class="sep"> » </li>
<li>Article « <a href="{{ cms_path('post', {id: page.object.id, post: page.object.slug}) }}">{{ page.object }}</a> »</li> <li>Article « <a href="{{ cms_path('post', {id: page.object.id, post: page.object.slug}) }}">{{ page.object }}</a> »</li>
{% endblock %} {% endblock %}
{% block header_title %} {% block header_title %}
{{ page.object.title }} {{ page.object.title }}
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% set post = page.object %} {% set post = page.object %}
{{ include('DeblanBlogBundle:Default:thePost.html.twig') }} {{ include('DeblanBlogBundle:Default:thePost.html.twig') }}
{% endblock %} {% endblock %}
{% block metas %} {% block metas %}
{% spaceless %} {% spaceless %}
{{ parent() }} {{ parent() }}
<meta property="og:title" content="{{ page.object.title }}" /> <meta property="og:title" content="{{ page.object.title }}" />
<meta property="og:url" content="{{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: page.object.id, post: page.object.slug}) }}" /> <meta property="og:url" content="{{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: page.object.id, post: page.object.slug}) }}" />
<meta property="og:image" content="{{ app.request.getSchemeAndHttpHost() ~ asset(page.object.getWebPathForPicture) }}" /> <meta property="og:image" content="{{ app.request.getSchemeAndHttpHost() ~ asset(page.object.getWebPathForPicture) }}" />
<meta property="og:site_name" content="Deblan" /> <meta property="og:site_name" content="Deblan" />
{% endspaceless %} {% endspaceless %}
{% endblock %} {% endblock %}

View file

@ -1,31 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel> <channel>
<title>Deblan - Blog</title> <title>Deblan - Blog</title>
<link>http://www.deblan.io/</link> <link>http://www.deblan.io/</link>
<description>Deblan - Blog</description> <description>Deblan - Blog</description>
<language>fr</language> <language>fr</language>
{% for post in page.pager %} {% for post in page.pager %}
<item> <item>
<title><![CDATA[{{ post.title|raw }}]]></title> <title><![CDATA[{{ post.title|raw }}]]></title>
<link>{{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: post.id, post: post.slug}) }}</link> <link>{{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: post.id, post: post.slug}) }}</link>
<description> <description>
<![CDATA[ <![CDATA[
{% if post.contentFormat == 'html' %} {% if post.contentFormat == 'html' %}
{{ post.content|post|transform_url }} {{ post.content|post|transform_url }}
{% endif %} {% endif %}
{% if post.contentFormat == 'markdown' %} {% if post.contentFormat == 'markdown' %}
{{ post.content|markdown|transform_url }} {{ post.content|markdown|transform_url }}
{% endif %} {% endif %}
]]></description> ]]></description>
<guid isPermaLink="false">{{ post.id }}</guid> <guid isPermaLink="false">{{ post.id }}</guid>
<pubDate>{{ post.publishedAt|date('r') }}</pubDate> <pubDate>{{ post.publishedAt|date('r') }}</pubDate>
{% for category in post.categories %} {% for category in post.categories %}
<category><![CDATA[{{ category.title }}]]></category> <category><![CDATA[{{ category.title }}]]></category>
{% endfor %} {% endfor %}
</item> </item>
{% endfor %} {% endfor %}
</channel> </channel>
</rss> </rss>

View file

@ -1,62 +1,62 @@
{% extends "::base.html.twig" %} {% extends "::base.html.twig" %}
{% block breadcrumb %} {% block breadcrumb %}
<li><a href="{{ cms_path('homepage') }}">Accueil</a></li> <li><a href="{{ cms_path('homepage') }}">Accueil</a></li>
<li class="sep"> » </li> <li class="sep"> » </li>
<li>Tag « <a href="{{ cms_path('tag', {tag: page.object}) }}">{{ page.object }}</a> »</li> <li>Tag « <a href="{{ cms_path('tag', {tag: page.object}) }}">{{ page.object }}</a> »</li>
{% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %}
<li class="sep"> » </li> <li class="sep"> » </li>
<li>Page {{ page.pager.currentPage }}</li> <li>Page {{ page.pager.currentPage }}</li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block body %} {% block body %}
{% if page.pager.nbResults == 0 %} {% if page.pager.nbResults == 0 %}
<div class="alert alert-info">Aucun article disponible.</div> <div class="alert alert-info">Aucun article disponible.</div>
{% endif %} {% endif %}
{% for post in page.pager %} {% for post in page.pager %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{% if not loop.first %} {% if not loop.first %}
<hr /> <hr />
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
{{ include('DeblanBlogBundle:Default:thePost.html.twig') }} {{ include('DeblanBlogBundle:Default:thePost.html.twig') }}
{% endfor %} {% endfor %}
{% if page.pager.hasPreviousPage or page.pager.hasNextPage %} {% if page.pager.hasPreviousPage or page.pager.hasNextPage %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="pager"> <ul class="pager">
{% if page.pager.hasPreviousPage %} {% if page.pager.hasPreviousPage %}
<li class="previous"> <li class="previous">
<a href="{{ cms_path('tag', {tag: page.object, page: page.pager.getPreviousPage}) }}">Précédent</a> <a href="{{ cms_path('tag', {tag: page.object, page: page.pager.getPreviousPage}) }}">Précédent</a>
</li> </li>
{% endif %} {% endif %}
{% if page.pager.hasNextPage %} {% if page.pager.hasNextPage %}
<li class="next"> <li class="next">
<a href="{{ cms_path('tag', {tag: page.object, page: page.pager.getNextPage}) }}">Suivant</a> <a href="{{ cms_path('tag', {tag: page.object, page: page.pager.getNextPage}) }}">Suivant</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block main_menu_bind %} {% block main_menu_bind %}
{% if page.pager.hasPreviousPage %} {% if page.pager.hasPreviousPage %}
<li class="bind"><a href="{{ cms_path('tag', {tag: page.object, page: page.pager.getPreviousPage}) }}"><span class="glyphicon glyphicon-backward"></span></a></li> <li class="bind"><a href="{{ cms_path('tag', {tag: page.object, page: page.pager.getPreviousPage}) }}"><span class="glyphicon glyphicon-backward"></span></a></li>
{% endif %} {% endif %}
{% if page.pager.hasNextPage %} {% if page.pager.hasNextPage %}
<li class="bind"><a href="{{ cms_path('tag', {tag: page.object, page: page.pager.getNextPage}) }}"><span class="glyphicon glyphicon-forward"></span></a></li> <li class="bind"><a href="{{ cms_path('tag', {tag: page.object, page: page.pager.getNextPage}) }}"><span class="glyphicon glyphicon-forward"></span></a></li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -1,23 +1,23 @@
<div class="media {% if level != 1 %}level-{{ level }}{%endif %}"> <div class="media {% if level != 1 %}level-{{ level }}{%endif %}">
<div class="pull-left"> <div class="pull-left">
<img width="90" height="90" data-dimensions="destroy" class="avatar" src="{{ comment.avatar }}" alt="{{ comment.author }}" title="{{ comment.author }}"> <img width="90" height="90" data-dimensions="destroy" class="avatar" src="{{ comment.avatar }}" alt="{{ comment.author }}" title="{{ comment.author }}">
</div> </div>
<div class="media-body"> <div class="media-body">
<div class="media-heading meta"> <div class="media-heading meta">
<a rel="author" href="{{ comment.Website ? comment.Website : '#' }}">{{ comment.author }}</a>, <a rel="author" href="{{ comment.Website ? comment.Website : '#' }}">{{ comment.author }}</a>,
<time datetime="{{ post.createdAt|date("Y-m-d") }}" title="{{ comment.createdAt|date("r") }}"> <time datetime="{{ post.createdAt|date("Y-m-d") }}" title="{{ comment.createdAt|date("r") }}">
{{ comment.createdAt|date("d/m/Y à H\\hi") }} {{ comment.createdAt|date("d/m/Y à H\\hi") }}
</time> </time>
</div> </div>
<p>{{ comment.Content|comment }}</p> <p>{{ comment.Content|comment }}</p>
<button class="btn btn-default btn-sm answer" data-comment="{{ comment.id }}">Répondre</button> <button class="btn btn-default btn-sm answer" data-comment="{{ comment.id }}">Répondre</button>
</div> </div>
</div> </div>
{% set level = level + 1 %} {% set level = level + 1 %}
{% for child in comment.orderedComments %} {% for child in comment.orderedComments %}
{{ include('DeblanBlogBundle:Default:theComment.html.twig', {level: level, comment: child}) }} {{ include('DeblanBlogBundle:Default:theComment.html.twig', {level: level, comment: child}) }}
{% endfor %} {% endfor %}

View file

@ -1,180 +1,180 @@
<article> <article>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{% if full is not defined %} {% if full is not defined %}
<h1><a href="{{ cms_path('post', {id: post.id, post: post.slug}) }}">{{ post.title }}</a></h1> <h1><a href="{{ cms_path('post', {id: post.id, post: post.slug}) }}">{{ post.title }}</a></h1>
{% endif %} {% endif %}
{% if post.contentFormat == 'html' %} {% if post.contentFormat == 'html' %}
{{ post.content|post|transform_url }} {{ post.content|post|transform_url }}
{% endif %} {% endif %}
{% if post.contentFormat == 'markdown' %} {% if post.contentFormat == 'markdown' %}
{{ post.content|markdown|transform_url }} {{ post.content|markdown|transform_url }}
{% endif %} {% endif %}
</div> </div>
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="labels"> <ul class="labels">
{% for category in post.categories %} {% for category in post.categories %}
<li><span class="label"><a href="{{ cms_path('category', {id: category.id, category: category.slug}) }}">{{ category.title }}</a></span></li> <li><span class="label"><a href="{{ cms_path('category', {id: category.id, category: category.slug}) }}">{{ category.title }}</a></span></li>
{% endfor %} {% endfor %}
{% for tag in post.tagsCollection %} {% for tag in post.tagsCollection %}
{% if tag|trim is not empty %} {% if tag|trim is not empty %}
<li><span class="label"><a href="{{ cms_path('tag', {tag: tag}) }}">#{{ tag }}</a></span></li> <li><span class="label"><a href="{{ cms_path('tag', {tag: tag}) }}">#{{ tag }}</a></span></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
</article> </article>
{# {#
<article class="post" id="post-{{ post.id }}"> <article class="post" id="post-{{ post.id }}">
<header> <header>
<h1><a href="{{ cms_path('post', {id: post.id, post: post.slug}) }}">{{ post.title }}</a></h1> <h1><a href="{{ cms_path('post', {id: post.id, post: post.slug}) }}">{{ post.title }}</a></h1>
<div class="meta"> <div class="meta">
<address class="author"> <address class="author">
<span class="glyphicon glyphicon-user"></span> <span class="glyphicon glyphicon-user"></span>
<a rel="author" href="{{ cms_path('about') }}">{{ post.user.username|capitalize }}</a> <a rel="author" href="{{ cms_path('about') }}">{{ post.user.username|capitalize }}</a>
</address> </address>
<time datetime="{{ post.publishedAt|date("Y-m-d") }}" title="{{ post.publishedAt|date("r") }}"> <time datetime="{{ post.publishedAt|date("Y-m-d") }}" title="{{ post.publishedAt|date("r") }}">
<span class="glyphicon glyphicon-calendar"></span> <span class="glyphicon glyphicon-calendar"></span>
{{ post.publishedAt|date("d/m/Y à H\\hi") }} {{ post.publishedAt|date("d/m/Y à H\\hi") }}
</time> </time>
<ul class="labels"> <ul class="labels">
{% for category in post.categories %} {% for category in post.categories %}
<li><span class="label label-primary"><a href="{{ cms_path('category', {id: category.id, category: category.slug}) }}">{{ category.title }}</a></span></li> <li><span class="label label-primary"><a href="{{ cms_path('category', {id: category.id, category: category.slug}) }}">{{ category.title }}</a></span></li>
{% endfor %} {% endfor %}
{% for tag in post.tagsCollection %} {% for tag in post.tagsCollection %}
{% if tag|trim is not empty %} {% if tag|trim is not empty %}
<li><span class="label label-success"><a href="{{ cms_path('tag', {tag: tag}) }}">#{{ tag }}</a></span></li> <li><span class="label label-success"><a href="{{ cms_path('tag', {tag: tag}) }}">#{{ tag }}</a></span></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
</header> </header>
<div class="page-content"> <div class="page-content">
{% if post.contentFormat == 'html' %} {% if post.contentFormat == 'html' %}
{{ post.content|post|transform_url }} {{ post.content|post|transform_url }}
{% endif %} {% endif %}
{% if post.contentFormat == 'markdown' %} {% if post.contentFormat == 'markdown' %}
{{ post.content|markdown|transform_url }} {{ post.content|markdown|transform_url }}
{% endif %} {% endif %}
</div> </div>
{% if full is defined and false %} {% if full is defined and false %}
<footer> <footer>
<script type="text/javascript"> <script type="text/javascript">
var addthis_share = { var addthis_share = {
url: '{{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: post.id, post: post.slug}) }}' url: '{{ app.request.getSchemeAndHttpHost() ~ cms_path('post', {id: post.id, post: post.slug}) }}'
} }
</script> </script>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a> <a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a> <a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a> <a class="addthis_counter addthis_bubble_style"></a>
</div> </div>
</footer> </footer>
{% endif %} {% endif %}
</article> </article>
#} #}
{% if full is defined %} {% if full is defined %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{% if post.hasComments %} {% if post.hasComments %}
<hr /> <hr />
{% for comment in post.orderedComments %} {% for comment in post.orderedComments %}
{% if comment.active and not comment.parentCommentId %} {% if comment.active and not comment.parentCommentId %}
{{ include('DeblanBlogBundle:Default:theComment.html.twig', {level: 1}) }} {{ include('DeblanBlogBundle:Default:theComment.html.twig', {level: 1}) }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="comments"> <div class="comments">
<div id="form"></div> <div id="form"></div>
<hr /> <hr />
<h2>Ajouter un commentaire</h2> <h2>Ajouter un commentaire</h2>
<div class="alert alert-info hide" id="answer_inprogress"> <div class="alert alert-info hide" id="answer_inprogress">
<button id="cancel_answer" class="btn btn-default pull-right">Annuler</button> <button id="cancel_answer" class="btn btn-default pull-right">Annuler</button>
<p>Vous répondez à un commentaire.</p> <p>Vous répondez à un commentaire.</p>
</div> </div>
<form class="form-horizontal" method="post" data-secured role="form" data-target="{{ cms_path('post', {id: post.id, post: post.slug}) }}" action="{{ cms_path('bot') }}"> <form class="form-horizontal" method="post" data-secured role="form" data-target="{{ cms_path('post', {id: post.id, post: post.slug}) }}" action="{{ cms_path('bot') }}">
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label" for="comment_Author">Auteur</label> <label class="col-sm-2 control-label" for="comment_Author">Auteur</label>
<div class="col-sm-10"> <div class="col-sm-10">
{{ form_widget(form.Author) }} {{ form_widget(form.Author) }}
{{ form_errors(form.Author) }} {{ form_errors(form.Author) }}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label" for="comment_Website">Site web</label> <label class="col-sm-2 control-label" for="comment_Website">Site web</label>
<div class="col-sm-10"> <div class="col-sm-10">
{{ form_widget(form.Website) }} {{ form_widget(form.Website) }}
{{ form_errors(form.Website) }} {{ form_errors(form.Website) }}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label" for="comment_Email">Email</label> <label class="col-sm-2 control-label" for="comment_Email">Email</label>
<div class="col-sm-10"> <div class="col-sm-10">
{{ form_widget(form.Email) }} {{ form_widget(form.Email) }}
{{ form_errors(form.Email) }} {{ form_errors(form.Email) }}
<span class="help-block">L'email n'est pas affiché. Vous pouvez utiliser un avatar à l'aide de <a href="http://fr.gravatar.com/">Gravatar</a>.</span> <span class="help-block">L'email n'est pas affiché. Vous pouvez utiliser un avatar à l'aide de <a href="http://fr.gravatar.com/">Gravatar</a>.</span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label" for="comment_Content">Commentaire</label> <label class="col-sm-2 control-label" for="comment_Content">Commentaire</label>
<div class="col-sm-10"> <div class="col-sm-10">
{{ form_widget(form.Content) }} {{ form_widget(form.Content) }}
{{ form_errors(form.Content) }} {{ form_errors(form.Content) }}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label"></label> <label class="col-sm-2 control-label"></label>
<div class="col-sm-10"> <div class="col-sm-10">
<label>{{ form_widget(form.Follow) }} M'informer des nouveaux commentaires</label> <label>{{ form_widget(form.Follow) }} M'informer des nouveaux commentaires</label>
{{ form_errors(form.Follow) }} {{ form_errors(form.Follow) }}
</div> </div>
</div> </div>
<div class="form-group submit"> <div class="form-group submit">
<label class="col-sm-2 control-label">Publier</label> <label class="col-sm-2 control-label">Publier</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="submit" class="btn btn-primary" value="Publier" /> <input type="submit" class="btn btn-primary" value="Publier" />
</div> </div>
</div> </div>
{{ form_widget(form.ParentCommentId) }} {{ form_widget(form.ParentCommentId) }}
{{ form_rest(form) }} {{ form_rest(form) }}
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}

View file

@ -1,58 +1,58 @@
{% extends "DeblanBlogBundle:Default:home.html.twig" %} {% extends "DeblanBlogBundle:Default:home.html.twig" %}
{% block breadcrumb %} {% block breadcrumb %}
<li><a href="{{ cms_path('homepage') }}">Accueil</a></li> <li><a href="{{ cms_path('homepage') }}">Accueil</a></li>
<li class="sep"> » </li> <li class="sep"> » </li>
<li><a href="{{ cms_path('tiny', {page: 1}) }}">{{ page.seoTitle|pp(page.object)|pp(page)|e }}</a></li> <li><a href="{{ cms_path('tiny', {page: 1}) }}">{{ page.seoTitle|pp(page.object)|pp(page)|e }}</a></li>
{% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %} {% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %}
<li class="sep"> » </li> <li class="sep"> » </li>
<li>Page {{ page.pager.currentPage }}</li> <li>Page {{ page.pager.currentPage }}</li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1> <h1>
{{ page.seoTitle|pp(page.object)|pp(page)|e }} {{ page.seoTitle|pp(page.object)|pp(page)|e }}
<a href="https://tiny.deblan.org/public.php?op=rss&amp;id=-1&amp;key=c35938b7d791af1d550a8e11e77eb91ad2bf7a6f" target="_blank"> <a href="https://tiny.deblan.org/public.php?op=rss&amp;id=-1&amp;key=c35938b7d791af1d550a8e11e77eb91ad2bf7a6f" target="_blank">
<span class="social social-rss" style="width: 20px; height: 20px; display: inline-block"></span> <span class="social social-rss" style="width: 20px; height: 20px; display: inline-block"></span>
</a> </a>
</h1> </h1>
{% for post in page.pager %} {% for post in page.pager %}
{{ include('DeblanBlogBundle:Default:tinyThePost.html.twig', {post: post}) }} {{ include('DeblanBlogBundle:Default:tinyThePost.html.twig', {post: post}) }}
{% endfor %} {% endfor %}
{% if page.pager.hasPreviousPage or page.pager.hasNextPage %} {% if page.pager.hasPreviousPage or page.pager.hasNextPage %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<hr /> <hr />
<ul class="pager"> <ul class="pager">
{% if page.pager.hasPreviousPage %} {% if page.pager.hasPreviousPage %}
<li class="previous"> <li class="previous">
<a href="{{ cms_path('tiny', {page: page.pager.getPreviousPage}) }}">Précédent</a> <a href="{{ cms_path('tiny', {page: page.pager.getPreviousPage}) }}">Précédent</a>
</li> </li>
{% endif %} {% endif %}
{% if page.pager.hasNextPage %} {% if page.pager.hasNextPage %}
<li class="next"> <li class="next">
<a href="{{ cms_path('tiny', {page: page.pager.getNextPage}) }}">Suivant</a> <a href="{{ cms_path('tiny', {page: page.pager.getNextPage}) }}">Suivant</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block main_menu_bind %} {% block main_menu_bind %}
{% if page.pager.hasPreviousPage %} {% if page.pager.hasPreviousPage %}
<li class="bind"><a href="{{ cms_path('tiny', {page: page.pager.getPreviousPage}) }}"><span class="glyphicon glyphicon-backward"></span></a></li> <li class="bind"><a href="{{ cms_path('tiny', {page: page.pager.getPreviousPage}) }}"><span class="glyphicon glyphicon-backward"></span></a></li>
{% endif %} {% endif %}
{% if page.pager.hasNextPage %} {% if page.pager.hasNextPage %}
<li class="bind"><a href="{{ cms_path('tiny', {page: page.pager.getNextPage}) }}"><span class="glyphicon glyphicon-forward"></span></a></li> <li class="bind"><a href="{{ cms_path('tiny', {page: page.pager.getNextPage}) }}"><span class="glyphicon glyphicon-forward"></span></a></li>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -1,23 +1,23 @@
<article class="post" id="post-{{ post.id }}"> <article class="post" id="post-{{ post.id }}">
<header> <header>
<h3><a href="{{ post.link }}" target="_blank">{{ post.title }}</a></h3> <h3><a href="{{ post.link }}" target="_blank">{{ post.title }}</a></h3>
<div class="meta"> <div class="meta">
<address class="author"> <address class="author">
<span class="glyphicon glyphicon-user"></span> <span class="glyphicon glyphicon-user"></span>
<a rel="author" href="{{ post.link }}" target="_blank">{{ post.author }}</a> <a rel="author" href="{{ post.link }}" target="_blank">{{ post.author }}</a>
</address> </address>
<time datetime="{{ post.updated|date("Y-m-d") }}" title="{{ post.updated|date("r") }}"> <time datetime="{{ post.updated|date("Y-m-d") }}" title="{{ post.updated|date("r") }}">
<span class="glyphicon glyphicon-calendar"></span> <span class="glyphicon glyphicon-calendar"></span>
{{ post.updated|date("d/m/Y à H\\hi") }} {{ post.updated|date("d/m/Y à H\\hi") }}
</time> </time>
</div> </div>
</header> </header>
<div class="page-content"> <div class="page-content">
{{ post.excerpt|raw }} {{ post.excerpt|raw }}
<p><a href="{{ post.link }}" target="_blank">{{ post.link }}</a></p> <p><a href="{{ post.link }}" target="_blank">{{ post.link }}</a></p>
</div> </div>
</article> </article>