added date to title in home, added catégories and cat class in block in home

This commit is contained in:
Bachir Soussi Chiadmi
2017-10-26 08:13:06 +02:00
parent 344dae1543
commit 263aaf4ae7
4 changed files with 62 additions and 18 deletions
+18 -12
View File
@@ -7221,18 +7221,18 @@ header#top-bar {
line-height: 0.5; }
header#top-bar #left-nav a {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold; }
header#top-bar #left-nav a:hover {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold;
text-decoration: underline; }
header#top-bar #right-nav {
text-align: right; }
header#top-bar #right-nav h4 {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold;
margin: 0;
line-height: 1.9; }
@@ -7294,7 +7294,7 @@ div#center {
div#center .projet-block {
padding: 0.7em;
text-align: left; }
div#center .projet-block a {
div#center .projet-block a.image-link {
display: block; }
div#center .projet-block header {
position: relative;
@@ -7309,14 +7309,20 @@ div#center {
margin: 0; }
div#center .projet-block h1 {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold;
color: #5b2d87;
margin: 0;
line-height: 1;
margin: 0 0 0.5em 0;
line-height: 1.4;
height: auto;
display: inline-block;
position: relative; }
div#center .projet-block h1 span.date {
font-weight: normal; }
div#center .projet-block h1 span.date:before {
content: "|";
padding-right: 0.5em;
margin-left: 0.5em; }
div#center .projet-block h2 {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.8em;
@@ -7329,14 +7335,14 @@ div#center {
margin-bottom: 0.3em; }
div#center .projet-block.projet-block-text h2 {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold;
margin-bottom: 0.3em; }
div#center .projet .row {
margin: 0; }
div#center .projet h1 {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold;
margin: 0;
padding: 0 0.7em;
@@ -7382,7 +7388,7 @@ div#center {
display: inline-block;
position: relative;
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold;
border-bottom: 1px solid #000;
line-height: 0.2; }
@@ -7408,7 +7414,7 @@ div#center {
padding: 0.7em; }
div#center .client-block h3 {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold;
line-height: 0.6;
display: inline-block;
@@ -7479,7 +7485,7 @@ footer#bottom-bar {
padding: 1em 0; }
footer#bottom-bar h1 {
font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
font-size: 0.87em;
font-size: 0.95em;
font-weight: bold;
height: auto;
display: inline-block;
+12 -4
View File
@@ -14,7 +14,7 @@ $font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-ser
@mixin fontbold{
// TODO : media query
font: $font; font-size:0.87em; font-weight:bold;
font: $font; font-size:0.95em; font-weight:bold;
}
@mixin fontnormal{
// TODO : media query
@@ -235,7 +235,7 @@ div#center{
padding:0.7em;
text-align: left;
a{display: block;}
a.image-link{display: block;}
header{
position:relative;
@@ -247,16 +247,24 @@ div#center{
font-family: $font; text-align: left;
padding:0; margin:0;}
h1{
// font-size: 1em; font-weight: bold;
// font-size: 1.3em;
@include fontbold;
color: $maincolor;
margin:0; line-height: 1; height:auto;
margin:0 0 0.5em 0; line-height: 1.4; height:auto;
display:inline-block; position:relative;
// &:after{
// content: ""; height:0;
// display: block; margin-top:-.7em; margin-bottom:.7em;
// // border-top:0.5em solid $maincolor;
// transition:border-color 0.3s ease-in;}
span.date{
font-weight: normal;
&:before{
content: "|";
padding-right:0.5em;
margin-left: 0.5em;
}
}
}
h2{@include fontnormal; margin:-0.4em 0 0; line-height: 1;}
@@ -1,3 +1,16 @@
{# build taxo tags (categories) ids array #}
{% set taxlist = taxonomylist.get() %}
{% if taxlist %}
{% set catlist = {} %}
{% set id = 1 %}
{% for tax,value in taxlist['tag'] %}
{% set catlist = catlist|merge({ (tax|e('url')) : (id) }) %}
{% set id = id + 1 %}
{% endfor %}
{% endif %}
<!doctype html>
<html class="no-js" lang="en">
<head>
@@ -5,9 +5,26 @@
{% set image = page.media.images|first %}
{% endif %}
<a href="{{ page.url }}">{{ image.resize(500).html }}</a>
{% if page.taxonomy.tag %}
{{ dump(catlist) }}
<nav class="categories">
<ul>
{% for tag in page.taxonomy.tag %}
<li>
<a class="tag-{{ catlist[(tag|e('url'))] }}" href="/categories/tag{{ config.system.param_sep }}{{ tag|e('url') }}">{{ tag }}</a>
</li>
{% endfor %}
</ul>
</nav>
{% endif %}
<a class="image-link" href="{{ page.url }}">{{ image.resize(500).html }}</a>
<header>
<h1><a href="{{ page.url }}">{{page.title}}</a></h1>
<h1>
<a class="title" href="{{ page.url }}">{{page.title}}</a>
<span class="date">{{page.date|date("Y")}}</span>
</h1>
<h2><a href="{{ page.url }}">{{page.header.subtitle}}</a></h2>
</header>
{% endif %}