diff --git a/user/config/site.yaml b/user/config/site.yaml index f7a3479..5e12baa 100644 --- a/user/config/site.yaml +++ b/user/config/site.yaml @@ -10,7 +10,7 @@ author: name: Bachir Soussi Chiadmi # Default author name # email: 'john@email.com' # Default author email -taxonomies: [tag] # Arbitrary list of taxonomy types +taxonomies: [tag, category, client] # Arbitrary list of taxonomy types #[édition,édition jeunesse,art,identité visuelle,signalétique,évènement metadata: diff --git a/user/themes/labonneadresse/js/dist/script.min.js b/user/themes/labonneadresse/js/dist/script.min.js index f82b43f..b890ab4 100644 --- a/user/themes/labonneadresse/js/dist/script.min.js +++ b/user/themes/labonneadresse/js/dist/script.min.js @@ -1,4 +1,6 @@ jQuery(document).ready(function($){$(window).scroll(function(){var topOfWindow=$(window).scrollTop();console.log('topOfWindow',topOfWindow);if(topOfWindow>100){$("#top-bar").addClass("reduced");} -else{$("#top-bar").removeClass("reduced");}});if($('body').is('.categories')){var $diapo=$('
');$("#categories-content").before($diapo).children('section.projet-block').each(function(index,el){$(this).addClass('projet-'+index).hover(function(e){$diapo.children().removeClass('visible');var c=$(this).attr('class').match('projet-[0-9]+');console.log("class",c[0]);$diapo.children('.'+c[0]).addClass('visible');}).find('.projet-img').addClass('projet-'+index).appendTo($diapo);});$diapo.children('.projet-img').first().addClass('visible');} +else{$("#top-bar").removeClass("reduced");}});if($('body').is('.categories')){console.log('hello') +var $diapo=$('
');$("#categories-content").before($diapo).find('li.project').each(function(index,el){console.log(index) +$(this).addClass('projet-'+index).hover(function(e){$diapo.children().removeClass('visible');var c=$(this).attr('class').match('projet-[0-9]+');console.log("class",c[0]);$diapo.children('.'+c[0]).addClass('visible');}).find('.projet-img').addClass('projet-'+index).appendTo($diapo);});$diapo.children('.projet-img').first().addClass('visible');} var $grid=$('.grid').masonry({itemSelector:'.grid-block'});}); \ No newline at end of file diff --git a/user/themes/labonneadresse/js/script.js b/user/themes/labonneadresse/js/script.js index 8be4e46..e670131 100644 --- a/user/themes/labonneadresse/js/script.js +++ b/user/themes/labonneadresse/js/script.js @@ -14,10 +14,12 @@ jQuery(document).ready(function($) { // init categories content images behaviour if($('body').is('.categories')){ + console.log('hello') var $diapo = $('
'); $("#categories-content") .before($diapo) - .children('section.projet-block').each(function(index, el) { + .find('li.project').each(function(index, el) { + console.log(index) $(this) .addClass('projet-'+index) .hover(function (e) { diff --git a/user/themes/labonneadresse/scss/_settings.scss b/user/themes/labonneadresse/scss/_settings.scss index 936df3d..0cb2b89 100644 --- a/user/themes/labonneadresse/scss/_settings.scss +++ b/user/themes/labonneadresse/scss/_settings.scss @@ -77,10 +77,10 @@ $include-html-global-classes: $include-html-classes; // - - - - - - - - - - - - - - - - - - - - - - - - - // $include-html-grid-classes: $include-html-classes; -// $include-xl-html-grid-classes: false; +$include-xl-html-grid-classes: true; //$row-width: rem-calc(2000); -$total-columns: 24; +$total-columns: 12; $column-gutter: rem-calc(5); // c. Global diff --git a/user/themes/labonneadresse/scss/styles.scss b/user/themes/labonneadresse/scss/styles.scss index a91a705..8b7cb3d 100644 --- a/user/themes/labonneadresse/scss/styles.scss +++ b/user/themes/labonneadresse/scss/styles.scss @@ -1,11 +1,7 @@ @import '../bower_components/foundation/scss/normalize.scss'; -$include-xl-html-grid-classes: true; -@import '../bower_components/foundation/scss/foundation.scss'; @import "_settings.scss"; - -// $include-html-grid-classes: $include-html-classes; - +@import '../bower_components/foundation/scss/foundation.scss'; @import '../bower_components/foundation/scss/foundation/components/_global.scss'; @import '../bower_components/foundation/scss/foundation/components/_grid.scss'; @@ -28,8 +24,8 @@ $font: "CiutadellaRounded", "Helvetica Neue", Helvetica, Roboto, Arial, sans-ser body{font-family: $font; letter-spacing: 1px;} h1,h2,h3,h4,h5,h6{font-family: $font;} - a, a:hover{color:inherit;} +ul,li{padding:0; margin:0; list-style: none;} // @media $large-up { // .row.fullwidth{width:1200px;} @@ -277,7 +273,6 @@ div#center{ .projet{ .row{margin:0;} h1{ - // font-family: $font; font-size: 1.05em; font-weight: bold; @include fontbold; line-height:0.6; display:inline-block; position:relative; margin:0; padding:0 0.7em; @@ -345,6 +340,7 @@ div#center{ #diaporama{ position:relative; height:20vw; + margin:0 0 1.5em; >*{ position:absolute; top:0; left:0; height:100%; width:100%; @@ -356,6 +352,26 @@ div#center{ img{height:100%;} } } + .client-block{ + margin:0 0 1em; + h3{ + @include fontbold; + line-height:0.6; display:inline-block; position:relative; + margin:0; padding:0; + // $green overline + &:after{ + content: ""; + display: block; margin-top:-.5em; margin-bottom:.5em; + border-top:0.5em solid $green; + transition:border-color 0.3s ease-in; + } + } + h4{ + margin:0; + @include fontnormal; + } + + } } /* diff --git a/user/themes/labonneadresse/templates/categories.html.twig b/user/themes/labonneadresse/templates/categories.html.twig index 25fb144..6e1eeab 100644 --- a/user/themes/labonneadresse/templates/categories.html.twig +++ b/user/themes/labonneadresse/templates/categories.html.twig @@ -8,11 +8,32 @@ {% include 'partials/tagslist.html.twig' with {'base_url':"/categories/", 'taxonomy':'tag', 'display':'inline'} %} + {% set contents = page.collection %} + {% set taxlist = taxonomylist.get() %} +
- {% for child in page.collection %} -
- {% include 'partials/projet-block.html.twig' with {'page':child, 'display':'text'} %} -
+ {% for tax,value in taxlist['client'] %} + {% set posts = taxonomy.findTaxonomy({'client':tax}) %} + + {% set disposts = {} %} + {% for p,v in posts %} + {% if v in contents %} + {% set disposts = disposts|merge({(p):v}) %} + {% endif %} + {% endfor %} + + {% if disposts|length %} +
+

{{ tax }}

+ +
+ {% endif %} {% endfor %}
diff --git a/user/themes/labonneadresse/templates/home.html.twig b/user/themes/labonneadresse/templates/home.html.twig index 60d9834..e2925d1 100644 --- a/user/themes/labonneadresse/templates/home.html.twig +++ b/user/themes/labonneadresse/templates/home.html.twig @@ -7,7 +7,7 @@ {% for child in page.collection %} {% if child.header.home == true %}
- {% include 'partials/projet-block.html.twig' with {'page':child,'display':'img'} %} + {% include 'partials/projet-block.html.twig' with {'page':child,'display':'img', 'context':'home'} %}
{% endif %} {% endfor %} diff --git a/user/themes/labonneadresse/templates/partials/projet-block.html.twig b/user/themes/labonneadresse/templates/partials/projet-block.html.twig index 550337a..b512255 100644 --- a/user/themes/labonneadresse/templates/partials/projet-block.html.twig +++ b/user/themes/labonneadresse/templates/partials/projet-block.html.twig @@ -1,10 +1,9 @@ {% if display == 'img' %} - {% set image = page.media.images|first %} - {# {% set image = child.media.files|first %} #} - {# {% if image == null %} #} - {# {% set image = child.media.images|first %} #} - {# {% endif %} #} + {% set image = page.media['00-home.jpg'] %} + {% if image == null %} + {% set image = page.media.images|first %} + {% endif %} {{ image.resize(500).html }}
@@ -14,12 +13,10 @@ {% endif %} {% if display == 'text' %} -

{{page.title}}

-

{{page.header.subtitle}}

- - {{ page.summary() }} - - {% set image = page.media.images|first %} +

{{page.title}} - {{page.date|date("Y")}}

+ {% set image = page.media['00-cat.jpg'] %} + {% if image == null %} + {% set image = page.media.images|first %} + {% endif %} {{ image.resize(500).html }} - {% endif %}