diff --git a/app/assets/images/front/logo copie.png b/app/assets/images/front/logo copie.png deleted file mode 100644 index cf0b428..0000000 Binary files a/app/assets/images/front/logo copie.png and /dev/null differ diff --git a/app/assets/images/front/logo.png b/app/assets/images/front/logo.png index 9d8b017..200c8e1 100644 Binary files a/app/assets/images/front/logo.png and b/app/assets/images/front/logo.png differ diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index b62b138..7d136ed 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -74,20 +74,31 @@ a{ float:right; } -.coms{ - font-family:"jaf-bernino-sans", sans-serif; - font-size:14px; - a{ - color:inherit; + +article{ + .category{ + font-family:"jaf-bernino-sans", sans-serif; + font-size:14px; + a{ + color:inherit; + + } } -} -time{ - font-family:"jaf-bernino-sans", sans-serif; - font-size:14px; + .coms{ + font-family:"jaf-bernino-sans", sans-serif; + font-size:14px; + a{ + color:inherit; + + } + } + time{ + font-family:"jaf-bernino-sans", sans-serif; + font-size:14px; + } } - .sidebar_title{ font-weight:normal; border-bottom:1px solid #858585; diff --git a/app/assets/stylesheets/public/layout.css.scss b/app/assets/stylesheets/public/layout.css.scss index abbce5a..2973f28 100644 --- a/app/assets/stylesheets/public/layout.css.scss +++ b/app/assets/stylesheets/public/layout.css.scss @@ -13,16 +13,43 @@ color: #333; } header#top{ display:block; - + h1{ + font-weight:normal; + font-size:1.7em; + position:absolute; + top:50px; + left:160px; + margin:0; + a{ + color:black; + } + + } + + h2{ + font-weight:normal; + font-size:1.1em; + + position:absolute; + top:85px; + left:160px; + margin:0; + a{ + color:#99BB52; + + } + + } .center{ max-width:1200px; margin:auto; + position:relative; } background: url('/assets/front/top.png') repeat-x; img{ - width:120px; + height:120px; float:left; margin:20px 0px; margin-left:20px; @@ -262,6 +289,7 @@ footer{ article, .corps_content{ padding:40px; + padding-top:30px; background:white; margin-bottom:40px; @@ -354,6 +382,7 @@ article, .corps_content{ h1.principal{ text-align:center; + } @@ -372,10 +401,21 @@ h1.principal{ } @media only screen and (min-width: 0px) and (max-width: 960px) { - header#top img{ - float:none; - display:block; - margin:auto; + header#top{ + text-align:center; + h1,h2{ + position:static; + display:inline; + + + } + img{ + float:none; + display:block; + margin:auto; + margin-bottom:1em; + } + } navigation#first_nav{ @@ -383,7 +423,7 @@ h1.principal{ display:block; margin:auto; text-align:center; - + margin-top:1em; } #corps, #sidebar{ diff --git a/app/models/category.rb b/app/models/category.rb index e87fd27..66aefbb 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -76,7 +76,7 @@ class Category < ActiveRecord::Base before_create do if !position - top = Category.where( :parent_id => self.parent_id).order("position DESC") + top = Category.where( :parent_id => self.parent_id).order("position DESC").last if top self.position = top.position.to_i + 1 else diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index d9270cb..9420681 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -30,7 +30,9 @@ .center =link_to image_tag("front/logo.png"), "/" - + %h1=link_to "Nicolas Bally", "/" + %h2=link_to "/ Blog", "/" + %navigation#first_nav =link_to "A propos", "/a-propos-de-nicolas-bally.html" =link_to "Blog", "/" diff --git a/app/views/public/articles/_article_intro.html.haml b/app/views/public/articles/_article_intro.html.haml index bb718aa..a130e25 100644 --- a/app/views/public/articles/_article_intro.html.haml +++ b/app/views/public/articles/_article_intro.html.haml @@ -3,11 +3,17 @@ %header - .right.coms - =link_to i(:"comment-o")+" "+article.comments.count.to_s, article_path(:slug => article.slug, :anchor => "comments") - %time.updated{:datetime => Time.now, :pubdate => true} + .right + -if article.category + %span.category + =link_to article.category.name, category_public_article_path(:slug => article.category.slug), :title => "Articles de la catégorie \""+article.category.name.to_s+'"' + + .article_infos + %time.updated{:datetime => Time.now, :pubdate => true} - ="le "+l(article.published_at, :format => :human_date) + ="le "+l(article.published_at, :format => :human_date) + ="-" + %span.coms=link_to i(:"comment-o")+" "+article.comments.count.to_s, article_path(:slug => article.slug, :anchor => "comments") diff --git a/app/views/public/articles/_sidebar_categories.html.haml b/app/views/public/articles/_sidebar_categories.html.haml index f77226e..9990084 100644 --- a/app/views/public/articles/_sidebar_categories.html.haml +++ b/app/views/public/articles/_sidebar_categories.html.haml @@ -4,4 +4,4 @@ %ul -Category.order(:name).each do |category| %li - =link_to category.name+" (#{category.articles.recents.count})", category_public_article_path(:slug => category.slug), :title => "Conseil en image : articles de la catégorie \""+category.name.to_s+'"' + =link_to category.name+" (#{category.articles.recents.count})", category_public_article_path(:slug => category.slug), :title => "Articles de la catégorie \""+category.name.to_s+'"'