Commit af2f712d authored by Antonin's avatar Antonin

Design, news & stuff.

parent 7682b25f
ACL
---
- Footer
- Design plus cohérent (breadcrumb dans le template ?, séparation fullwidth)
- Nouvelle couleurs ?
- Pages dans le menu (automatique ?)
- Liens accueil (heading && barre menu)
- Animation de démarage seulement la première fois (session ? Cookie ?)
- Problème small devices titre + menu barre
- Nettoyage (commentaires, code non utilisé, indentation)
- Nettoyage (commentaires, code non utilisé, indentation, orga css)
- Validation (html, css, bonnes pratiques, sitemap, etc)
- Animation de démarage seulement la premièer fois (session ? Cookie ?)
- Traductions manquantes (admin + )
- Autopublish ?
- Mise en ligne automatique
......
......@@ -22,6 +22,7 @@ sonata_page:
- (.*)admin(.*) # ignore admin route, ie route containing 'admin'
- ^_(.*) # ignore symfony routes
- ^mremi_contact_(.*) # ignore contact stuff
- ^sonata_news_(.*) # ignore news stuff
ignore_routes:
- sonata_page_cache_esi
......@@ -43,6 +44,7 @@ sonata_page:
assets:
stylesheets:
- assetic/bootstrap/css/bootstrap.min.css
- assetic/icomoon/style.css
- assetic/animate.css
javascripts:
......
......@@ -2,6 +2,14 @@ body {
height: 100%;
}
a {
color: #550000;
}
a:hover, a:focus {
color: #d00000;
}
#header {
width: 100%;
height: 50vh;
......@@ -15,6 +23,8 @@ h1.title {
margin-top: 20vh;
font-size: 56px;
color: #211;
-moz-animation-duration: 2s;
-webkit-animation-duration: 2s;
animation-duration: 2s;
......@@ -68,6 +78,7 @@ h1.title {
}
#menu.affix-top a{
color: white;
text-shadow: 0px 0px 2px rgba(0,0,0, 0.5);
background-color: transparent;
border: none;
font-weight: bold;
......@@ -103,6 +114,61 @@ h1.title {
padding-right: 15px;
}
.panel-heading h1 {
.bottom-section {
background-color: #DDD;
}
.panel-heading h1, .panel-heading h2, .panel-heading h3, .well h3 {
margin-top: 0px;
}
.sonata_breadcrumb .breadcrumb {
font-weight: bold;
border-radius: 0px;
background-color: transparent;
margin-bottom: 0px;
}
.breadcrumb-container, #footer {
background-color: #200;
color: white;
}
.sonata_breadcrumb .breadcrumb a, #footer a {
color: white;
font-weight: bold;
}
#footer {
min-height: 50px;
padding-top: 20px;
padding-bottom: 20px;
}
#footer ul {
list-style: none;
}
#footer span {
display: inline-block;
width: 16px;
margin-right: 2px;
}
.recent_posts {
margin-bottom: 10px;
}
.recent_posts article {
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px solid lightgray;
}
.recent_posts article:last-of-type {
border-bottom: none;
padding-bottom: 5px;
}
\ No newline at end of file
......@@ -20,8 +20,6 @@ file that was distributed with this source code.
{% block contact_contents %}
{{ form_start(form, {'action': path('mremi_contact_form')}) }}
<fieldset>
<legend>{{ 'mremi_contact.form_title'|trans }}</legend>
{{ form_widget(form) }}
</fieldset>
{{ form_end(form) }}
......
{% extends "SonataPageBundle::base_layout.html.twig" %}
{% block page_container %}
{% block application_breadcrumb %}
<div class="breadcrumb-container">
<div class="container">
<div class="sonata_breadcrumb">
<ol class="breadcrumb">
<li class=""><a href="/">Accueil</a><div class="sonata_breadcrumb"></div></li>
<li class=""><a href="/contact">Contact</a><div class="sonata_breadcrumb"></div></li>
</ol>
</div>
</div>
</div>
{% endblock %}
{% block sonata_page_container %}
<div class="container">
<h1>Contact</h1>
......
......@@ -12,29 +12,30 @@ file that was distributed with this source code.
{% block block %}
{% if settings.title %}
<h3 class=""><i class="glyphicon glyphicon-pencil"></i> {{ settings.title }}</h3>
<h3><i class="glyphicon glyphicon-pencil"></i> {{ settings.title }}</h3>
{% endif %}
<div>
<div class="recent_posts">
{% for post in pager.getResults() %}
<div class="panel panel-default">
<div class="panel-heading">
<article>
<div>
<span class="label label-default">{{ post.publicationDateStart | format_date }}</span>
<a href="{{ url('sonata_news_view', { 'permalink': sonata_news_permalink(post) }) }}">
{{ post.title }} - {{'archive_author'|trans({'%author%': post.author }, 'SonataNewsBundle') }}
</a>
</div>
<div class="panel-body">
<div>
<p>{{ post.content|raw }}</p>
</div>
</div>
</article>
{% else %}
<a class="list-group-item" href="#">{{ 'no_post_found'|trans({}, 'SonataNewsBundle') }}</a>
{% endfor %}
<div class="clearfix"></div>
{% if context.getSetting('mode') == 'admin' %}
<a href="{{ url('admin_sonata_news_post_list') }}" class="btn btn-block"><i class="glyphicon glyphicon-list"></i> {{ 'view_all_posts'|trans({}, 'SonataNewsBundle') }}</a>
<a href="{{ url('admin_sonata_news_post_list') }}" class="btn btn-default btn-block"><i class="glyphicon glyphicon-list"></i> {{ 'view_all_posts'|trans({}, 'SonataNewsBundle') }}</a>
{% else %}
<a href="{{ url('sonata_news_archive') }}" class="btn btn-block"><i class="glyphicon glyphicon-list"></i> {{ 'view_all_posts'|trans({}, 'SonataNewsBundle') }}</a>
<a href="{{ url('sonata_news_archive') }}" class="btn btn-default btn-block"><i class="glyphicon glyphicon-list"></i> {{ 'view_all_posts'|trans({}, 'SonataNewsBundle') }}</a>
{% endif %}
</div>
{% endblock %}
{#
{% extends 'SonataPageBundle::base_layout.html.twig' %}
/*
* This file is part of the Sonata package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#}
{% block sonata_page_breadcrumb %}
<div class="row-fluid clearfix">
{{ sonata_block_render_event('breadcrumb', { 'context': 'news_archive', 'collection': collection, 'tag': tag, 'current_uri': app.request.requestUri }) }}
{% block application_breadcrumb %}
<div class="breadcrumb-container">
<div class="container">
{{ sonata_block_render_event('breadcrumb', { 'context': 'news_archive', 'collection': collection, 'tag': tag, 'current_uri': app.request.requestUri }) }}
</div>
</div>
{% endblock %}
<h1>{{ 'title_archive'|trans({}, 'SonataNewsBundle') }}</h1>
{% block sonata_page_container %}
<div class="container">
<div class="content">
<h1>{{ 'title_archive'|trans({}, 'SonataNewsBundle') }}</h1>
<div class="sonata-blog-post-list">
{% for post in pager.getResults() %}
<div class="sonata-blog-post-container">
<header>
<h2 class="sonata-blog-post-title">
<a href="{{ url('sonata_news_view', { 'permalink': sonata_news_permalink(post) }) }}">{{ post.title }}</a>
</h2>
<div class="sonata-blog-post-list">
{% for post in pager.getResults() %}
<div class="sonata-blog-post-container">
<header>
<h2 class="sonata-blog-post-title">
<a href="{{ url('sonata_news_view', { 'permalink': sonata_news_permalink(post) }) }}">{{ post.title }}</a>
</h2>
<div class="sonata-blog-post-information">
<span class="sonata-blog-post-author">{{ 'archive_author'|trans({'%author%': post.author }, 'SonataNewsBundle') }}</span> |
<div class="sonata-blog-post-information">
<span class="sonata-blog-post-author">{{ 'archive_author'|trans({'%author%': post.author }, 'SonataNewsBundle') }}</span> |
<i class="icon-calendar"></i>
{{ post.publicationDateStart | format_date }} |
<i class="icon-calendar"></i>
{{ post.publicationDateStart | format_date }} |
<i class="icon-comment"></i>
<span class="sonata-blog-post-comments-count">{{ 'comments_count'|trans({'%comments_count%': post.commentsCount }, 'SonataNewsBundle') }}</span>
<i class="icon-comment"></i>
<span class="sonata-blog-post-comments-count">{{ 'comments_count'|trans({'%comments_count%': post.commentsCount }, 'SonataNewsBundle') }}</span>
<div class="sonata-blog-post-tags">
{% if post.tags|length > 1 %}
<i class="icon-tags"></i>
{% else %}
<i class="icon-tag"></i>
{% endif %}
{{ 'published_under'|transchoice(post.tags|length, {}, 'SonataNewsBundle') }}
<div class="sonata-blog-post-tags">
{% if post.tags|length > 1 %}
<i class="icon-tags"></i>
{% else %}
<i class="icon-tag"></i>
{% endif %}
{{ 'published_under'|transchoice(post.tags|length, {}, 'SonataNewsBundle') }}
{% for tag in post.tags %}
<a href="{{ url('sonata_news_tag', { 'tag': tag.slug } ) }}">{{ tag.name }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
{% for tag in post.tags %}
<a href="{{ url('sonata_news_tag', { 'tag': tag.slug } ) }}">{{ tag.name }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
</div>
</div>
</header>
<div class="sonata-blog-post-abtract">
{{ post.abstract }}
</div>
</div>
</header>
<div class="sonata-blog-post-abtract">
{{ post.abstract }}
</div>
</div>
<hr />
{% else %}
{{ 'no_post_found'|trans({}, 'SonataNewsBundle') }}
{% endfor %}
<hr />
{% else %}
{{ 'no_post_found'|trans({}, 'SonataNewsBundle') }}
{% endfor %}
<ul class="pager">
<li{% if pager.page == pager.lastPage %} class="disabled"{% endif %}><a href="{{ url(route, route_parameters|merge({'page': pager.nextpage})) }}" title="{{ 'link_previous_page'|trans({}, 'SonataNewsBundle') }}">{{ 'link_previous_page'|trans({}, 'SonataNewsBundle') }}</a>
<li{% if pager.page == pager.firstPage %} class="disabled"{% endif %}><a href="{{ url(route, route_parameters|merge({'page': pager.previouspage})) }}" title="{{ 'link_next_page'|trans({}, 'SonataNewsBundle') }}">{{ 'link_next_page'|trans({}, 'SonataNewsBundle') }}</a></li>
</ul>
<ul class="pager">
<li{% if pager.page == pager.lastPage %} class="disabled"{% endif %}><a href="{{ url(route, route_parameters|merge({'page': pager.nextpage})) }}" title="{{ 'link_previous_page'|trans({}, 'SonataNewsBundle') }}">{{ 'link_previous_page'|trans({}, 'SonataNewsBundle') }}</a>
<li{% if pager.page == pager.firstPage %} class="disabled"{% endif %}><a href="{{ url(route, route_parameters|merge({'page': pager.previouspage})) }}" title="{{ 'link_next_page'|trans({}, 'SonataNewsBundle') }}">{{ 'link_next_page'|trans({}, 'SonataNewsBundle') }}</a></li>
</ul>
</div>
</div>
</div>
{% endblock %}
<div class="panel panel-default">
<div class="panel-heading">
<h3>{{'title_leave_comment'|trans({}, 'SonataNewsBundle') }}</h3>
</div>
<div class="panel-body">
<form action="{{ url('sonata_news_add_comment', {'id': post_id}) }}" method="POST" class="form-horizontal" role="form">
{{ form_widget(form) }}
<div class="form-actions">
<button type="submit" class="btn btn-default"><i class="glyphicon glyphicon-pencil"></i>&nbsp;{{'btn_add_comment'|trans({}, 'SonataNewsBundle') }}</button>
</div>
</form>
</div>
</div>
\ No newline at end of file
{% block sonata_page_breadcrumb %}
<div class="row-fluid clearfix">
{{ sonata_block_render_event('breadcrumb', { 'context': 'news_post', 'post': post, 'current_uri': app.request.requestUri }) }}
{% extends 'SonataPageBundle::base_layout.html.twig' %}
{% block application_breadcrumb %}
<div class="breadcrumb-container">
<div class="container">
{{ sonata_block_render_event('breadcrumb', { 'context': 'news_post', 'post': post, 'current_uri': app.request.requestUri }) }}
</div>
</div>
{% endblock %}
<article class="sonata-blog-post-container">
<div class="panel panel-default">
<div class="panel-heading">
<header>
<h1 class="sonata-blog-post-title">
<a href="{{ url('sonata_news_view', { 'permalink': sonata_news_permalink(post) }) }}">{{ post.title }}</a>
</h1>
<p>
<span class="label label-default"><i class="glyphicon glyphicon-calendar"></i> {{ post.publicationDateStart | format_date }}</span>
<span class="sonata-blog-post-author">{{ 'archive_author'|trans({'%author%': post.author }, 'SonataNewsBundle') }}</span>
</p>
<div class="sonata-blog-post-information">
<div class="sonata-blog-post-tag-container">
<div class="sonata-blog-post-tag-title">
{% if post.tags|length > 1 %}
<i class="glyphicon glyphicon-tags"></i>
{% else %}
<i class="glyphicon glyphicon-tag"></i>
{% endif %}
{{ 'published_under'|transchoice(post.tags|length, {}, 'SonataNewsBundle') }}
</div>
<div class="sonata-blog-post-tag-list">
{% for tag in post.tags %}
<a href="{{ url('sonata_news_tag', { 'tag': tag.slug } ) }}">{{ tag.name }}</a>
{% endfor %}
</div>
{% block sonata_page_container %}
<div class="container">
<div class="content">
<article class="sonata-blog-post-container">
<div class="panel panel-default">
<div class="panel-heading">
<header>
<h2 class="sonata-blog-post-title">
<a href="{{ url('sonata_news_view', { 'permalink': sonata_news_permalink(post) }) }}">{{ post.title }}</a>
</h2>
<p>
<span class="label label-default"><i class="glyphicon glyphicon-calendar"></i> {{ post.publicationDateStart | format_date }}</span>
<span class="sonata-blog-post-author">{{ 'archive_author'|trans({'%author%': post.author }, 'SonataNewsBundle') }}</span>
</p>
<div class="sonata-blog-post-information">
<div class="sonata-blog-post-tag-container">
<div class="sonata-blog-post-tag-title">
{% if post.tags|length > 1 %}
<i class="glyphicon glyphicon-tags"></i>
{% else %}
<i class="glyphicon glyphicon-tag"></i>
{% endif %}
{{ 'published_under'|transchoice(post.tags|length, {}, 'SonataNewsBundle') }}
</div>
<div class="sonata-blog-post-tag-list">
{% for tag in post.tags %}
<a href="{{ url('sonata_news_tag', { 'tag': tag.slug } ) }}">{{ tag.name }}</a>
{% endfor %}
</div>
</div>
</div>
</header>
</div>
<div class="panel-body">
{% media post.image, 'wide' %}
{{ post.content|raw }}
</div>
</div>
</header>
</div>
<div class="panel-body">
{% media post.image, 'wide' %}
{{ post.content|raw }}
</div>
</div>
<div class="well">
{% render(controller('SonataNewsBundle:Post:comments', {'postId': post.id})) %}
</div>
<div class="well">
{% render(controller('SonataNewsBundle:Post:comments', {'postId': post.id})) %}
{% if post.iscommentable %}
{% render(controller('SonataNewsBundle:Post:addCommentForm', {
'postId': post.id,
'form': form
})) %}
{% else %}
<div>
{{ 'message_comments_are_closed'|trans({}, 'SonataNewsBundle') }}
</div>
{% endif %}
</article>
</div>
</div>
{% if post.iscommentable %}
{% render(controller('SonataNewsBundle:Post:addCommentForm', {
'postId': post.id,
'form': form
})) %}
{% else %}
<div>
{{ 'message_comments_are_closed'|trans({}, 'SonataNewsBundle') }}
</div>
{% endif %}
</article>
{% endblock %}
\ No newline at end of file
......@@ -157,7 +157,6 @@ file that was distributed with this source code.
<ul class="nav navbar-nav">
<li><a href="{{ path('sonata_news_home') }}">Blog</a></li>
<li><a href="{{ path('_page_alias_home') }}#infos-pratiques">Info pratiques</a></li>
<li><a href="admin/">Connexion</a></li>
{#<li class="dropdown">#}
{#<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>#}
{#<ul class="dropdown-menu">#}
......@@ -199,10 +198,42 @@ file that was distributed with this source code.
{% endblock %}
{% endblock %}
{% block application_breadcrumb %}
{% if page.name != 'Accueil' %}
<div class="breadcrumb-container">
<div class="container">
{{ sonata_block_render({ 'type': 'sonata.page.block.breadcrumb' }) }}
</div>
</div>
{% endif %}
{% endblock %}
{% block sonata_page_container %}
{% block page_container %}{% endblock %} {# Deprecated block #}
{% endblock %}
{% block application_footer %}
<footer id="footer">
<div class="container">
<div class="row">
<div class="col-md-4">
<p class="text-right">L'Amicale du Combat Libre<br/>
91 rue Montesquieu<br/>
69007 Lyon
</p>
</div>
<div class="col-md-4 col-md-offset-4">
<ul>
<li><span class="icon-rss-square"></span> <a href="http://localhost:8000/blog/archive.rss">RSS</a></li>
<li><span class="glyphicon glyphicon-log-in"></span> <a href="admin/">Connexion</a></li>
<li><span class="glyphicon glyphicon-envelope"></span> <a href="contact">Contact</a></li>
</ul>
</div>
</div>
</div>
</footer>
{% endblock %}
{% block sonata_page_asset_footer %}
{% block page_asset_footer %} {# Deprecated block #}
{% if page is defined %}
......
......@@ -40,6 +40,10 @@
{% endif %}
{% endblock %}
</div>
</div>
</div>
<div class="bottom-section">
<div class="container">
{% if page is defined %}
<div class="row">
......
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xf143;" glyph-name="rss-square" horiz-adv-x="878" d="M292.571 219.428q0 30.286-21.429 51.714t-51.714 21.429-51.714-21.429-21.429-51.714 21.429-51.714 51.714-21.429 51.714 21.429 21.429 51.714zM493.143 165.714q-7.429 132.571-101.143 226.286t-226.286 101.143q-8 0.571-13.714-5.143t-5.714-13.143v-73.143q0-7.429 4.857-12.571t12.286-5.714q88-6.286 150.857-69.143t69.143-150.857q0.571-7.429 5.714-12.286t12.571-4.857h73.143q7.429 0 13.143 5.714t5.143 13.714zM712.571 165.143q-2.857 88-32 170t-79.714 148.571-117.143 117.143-148.571 79.714-170 32q-8 0.571-13.143-5.143-5.714-5.714-5.714-13.143v-73.143q0-7.429 5.143-12.571t12.571-5.714q116.571-4 216-63.714t159.143-159.143 63.714-216q0.571-7.429 5.714-12.571t12.571-5.143h73.143q7.429 0 13.143 5.714 6.286 5.143 5.143 13.143zM877.714 713.143v-548.571q0-68-48.286-116.286t-116.286-48.286h-548.571q-68 0-116.286 48.286t-48.286 116.286v548.571q0 68 48.286 116.286t116.286 48.286h548.571q68 0 116.286-48.286t48.286-116.286z" />
</font></defs></svg>
\ No newline at end of file
@font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot?63b4q8');
src:url('fonts/icomoon.eot?63b4q8#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?63b4q8') format('truetype'),
url('fonts/icomoon.woff?63b4q8') format('woff'),
url('fonts/icomoon.svg?63b4q8#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"], [class*=" icon-"] {
font-family: 'icomoon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-rss-square:before {
content: "\f143";
}
......@@ -3,8 +3,7 @@ $( document ).ready(function() {
$('#menu').affix({
offset: {
top: function() {
console.log("? : "+ ( $( window ).height() ) );
return ( $( window ).height() )*45/100;
return Math.min(250, ( $( window ).height() )*40/100);
}
}
})
......
......@@ -2,6 +2,14 @@ body {
height: 100%;
}
a {
color: #550000;
}
a:hover, a:focus {
color: #d00000;
}
#header {
width: 100%;
height: 50vh;
......@@ -15,6 +23,8 @@ h1.title {
margin-top: 20vh;
font-size: 56px;
color: #211;
-moz-animation-duration: 2s;
-webkit-animation-duration: 2s;
animation-duration: 2s;
......@@ -68,6 +78,7 @@ h1.title {
}
#menu.affix-top a{
color: white;
text-shadow: 0px 0px 2px rgba(0,0,0, 0.5);
background-color: transparent;
border: none;
font-weight: bold;
......@@ -103,6 +114,61 @@ h1.title {
padding-right: 15px;
}
.panel-heading h1 {
.bottom-section {
background-color: #DDD;
}
.panel-heading h1, .panel-heading h2, .panel-heading h3, .well h3 {
margin-top: 0px;
}
.sonata_breadcrumb .breadcrumb {
font-weight: bold;
border-radius: 0px;
background-color: transparent;
margin-bottom: 0px;
}
.breadcrumb-container, #footer {
background-color: #200;
color: white;
}
.sonata_breadcrumb .breadcrumb a, #footer a {
color: white;
font-weight: bold;
}
#footer {
min-height: 50px;
padding-top: 20px;
padding-bottom: 20px;
}
#footer ul {
list-style: none;
}
#footer span {
display: inline-block;
width: 16px;
margin-right: 2px;
}
.recent_posts {
margin-bottom: 10px;
}
.recent_posts article {
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px solid lightgray;
}
.recent_posts article:last-of-type {
border-bottom: none;
padding-bottom: 5px;
}
\ No newline at end of file
......@@ -2,6 +2,14 @@ body {
height: 100%;
}
a {
color: #550000;
}
a:hover, a:focus {
color: #d00000;
}
#header {
width: 100%;
height: 50vh;
......@@ -15,6 +23,8 @@ h1.title {
margin-top: 20vh;
font-size