From ee3d2bdbf6bc1e957272bca42c7947d43747234e Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 21 Mar 2018 17:27:23 +0100 Subject: [PATCH] suite --- app/assets/stylesheets/plume_print.css.scss | 2 + app/assets/stylesheets/public.scss | 92 +------------------- app/assets/stylesheets/public/plume.css.scss | 88 +++++++++++-------- app/views/public/plumes/_top.html.haml | 2 +- app/views/public/plumes/print.html.haml | 2 +- app/views/public/plumes/show.html.haml | 40 +++++---- 6 files changed, 78 insertions(+), 148 deletions(-) diff --git a/app/assets/stylesheets/plume_print.css.scss b/app/assets/stylesheets/plume_print.css.scss index 18ec59d..f4ba097 100644 --- a/app/assets/stylesheets/plume_print.css.scss +++ b/app/assets/stylesheets/plume_print.css.scss @@ -3,6 +3,8 @@ $marron:#9A9289; $vert:#7BAE53; $beige:#F1F0EE; +@import "qi_css/grid"; + body{ font-weight:bold; diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index 7abaeb7..2e812f8 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -7,6 +7,8 @@ @import "public/plume"; +@import "qi_css/grid"; + .observer-et-photographier-la-faune-sans-deranger{ .couv{ @@ -59,7 +61,7 @@ a{ &:hover{ color:#68b9ff; - +text-decoration:none; } } @@ -144,94 +146,6 @@ a{ -.row{ - -margin:auto; -//max-width:1100px; -display:block; - - -&:after{ -content: ""; - display: table; - clear: both; - -} - -.columns{ - - -display:block; - -box-sizing: border-box; -float:left; -display:inline-block; -padding:0 5px; - -&:first-child{ -padding-left:0px; - -} -&:last-child{ -padding-right:0px; - -} - -&.span_12{ -width:100%; - -} - -&.span_11{ -width:100/12*11; - -} -&.span_10{ -width:percentage(1/12*10); - -} -&.span_9{ -width:percentage(1/12*9); - -} -&.span_8{ -width:percentage(1/12*8); - -} -&.span_7{ -width:percentage(1/12*7); - -} - -&.span_6{ -width:percentage(1/12*6); - -} -&.span_5{ -width:percentage(1/12*5); - -} -&.span_4{ -width:percentage(1/12*4); - -} -&.span_3{ -width:percentage(1/12*3); - -} -&.span_2{ -width:percentage(1/12*2); - -} - -&.span_1{ -width:percentage(1/12*1); - -} - - -} -} .main{ width:100%; max-width:1020px; diff --git a/app/assets/stylesheets/public/plume.css.scss b/app/assets/stylesheets/public/plume.css.scss index 4b6d614..c4a3315 100644 --- a/app/assets/stylesheets/public/plume.css.scss +++ b/app/assets/stylesheets/public/plume.css.scss @@ -145,48 +145,60 @@ $vert:#7BAE53; } } - - .article{ + a{ + .article{ + - - width:50%; - float:left; - - &.article_large{ - float:none; - width:auto; - margin-top:60px; - margin-bottom:100px; - .image{ - width:47%; - margin-left:1%; - float:left; - } - .description{ - margin-left:50%; - padding-left:20px; - } + width:50%; + float:left; + text-decoration:none !important; + &.article_large{ + float:none; + width:auto; + margin-top:60px; + margin-bottom:100px; + .image{ + width:47%; + margin-left:1%; + float:left; + } + .description{ + margin-left:50%; + padding-left:20px; + + } - } - .inner{ - margin:0 20px; - } + } + .inner{ + margin:0 20px; + } - .image{ - height:300px; - } + .image{ + height:300px; + } + .desc{ + text-decoration:none !important; + color:black !important; + } + .plume_cat{ + text-transform:uppercase; + color:$vert; + font-size:30px; + margin-top:15px; + font-weight:bold; + } + h2{ + font-size:20px; + margin:10px 0; + font-weight:bold; + } - .plume_cat{ - text-transform:uppercase; - color:$vert; - font-size:30px; - margin-top:15px; - font-weight:bold; - } - h2{ - font-size:20px; - margin:10px 0; - font-weight:bold; + *{ + text-decoration:none !important; + &:hover{ + text-decoration:none !important; + } + } } } } diff --git a/app/views/public/plumes/_top.html.haml b/app/views/public/plumes/_top.html.haml index 99089c2..e17161c 100644 --- a/app/views/public/plumes/_top.html.haml +++ b/app/views/public/plumes/_top.html.haml @@ -1,5 +1,5 @@ #plume_header - =image_tag "/plume-logo.png", :class => "plume_logo" + =link_to image_tag("/plume-logo.png", :class => "plume_logo"), public_plume_path(@plume) =image_tag "/plume-logo-mobile.png", :class => "plume_logo_mobile" .baseline Bulletin indépendant des lobbies, d’un électorat, consacré à l’intérêt général et super intéressant ! diff --git a/app/views/public/plumes/print.html.haml b/app/views/public/plumes/print.html.haml index 06800b6..545152f 100644 --- a/app/views/public/plumes/print.html.haml +++ b/app/views/public/plumes/print.html.haml @@ -87,5 +87,5 @@ .render_block =render plume_article.block - %div{:style => "width:100px;height:100px;background:red;position:fixed;top:0;right:0;"} + %div{:style => "width:100px;height:100px;background:red;position:absolute;top:0;right:0;"} \ No newline at end of file diff --git a/app/views/public/plumes/show.html.haml b/app/views/public/plumes/show.html.haml index f6bd9a1..7cbb071 100644 --- a/app/views/public/plumes/show.html.haml +++ b/app/views/public/plumes/show.html.haml @@ -17,17 +17,18 @@ -@plume.plume_articles.where(:id => id).each do |article| - .article - .inner - .image.with_ratio.fill_img{:style => "background-image:url('"+(article.image_file.file.large.medium.url if article.image_file).to_s+"');", :data => {:ratio => 0.6}} + =link_to public_plume_article_path(article) do + .article + .inner + .image.with_ratio.fill_img{:style => "background-image:url('"+(article.image_file.file.large.medium.url if article.image_file).to_s+"');", :data => {:ratio => 0.6}} - .description - -if article.plume_cat - .plume_cat= article.plume_cat.title - %h2=article.title - .desc - =article.description + .description + -if article.plume_cat + .plume_cat= article.plume_cat.title + %h2=article.title + .desc + =article.description .clear -id = [] @@ -36,18 +37,19 @@ -id << cat.plume_articles.first.id if cat.plume_articles.first -@plume.plume_articles.where(:id => id).each do |article| - .article.article_large - .inner - .image.with_ratio.fill_img{:style => "background-image:url('"+(article.image_file.file.large.medium.url if article.image_file).to_s+"');", :data => {:ratio => 0.6}} + =link_to public_plume_article_path(article) do + .article_large.article + .inner + .image.with_ratio.fill_img{:style => "background-image:url('"+(article.image_file.file.large.medium.url if article.image_file).to_s+"');", :data => {:ratio => 0.6}} - .description - -if article.plume_cat - .plume_cat= article.plume_cat.title - %h2=article.title - .desc - =article.description - .clear + .description + -if article.plume_cat + .plume_cat= article.plume_cat.title + %h2=article.title + .desc + =article.description + .clear .clear