Modifs design + catégories

This commit is contained in:
Nicolas Bally 2015-04-12 11:59:28 +02:00
parent 72312e361e
commit 41baabf4f3
8 changed files with 83 additions and 24 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -74,20 +74,31 @@ a{
float:right; float:right;
} }
.coms{
font-family:"jaf-bernino-sans", sans-serif; article{
font-size:14px; .category{
a{ font-family:"jaf-bernino-sans", sans-serif;
color:inherit; font-size:14px;
a{
color:inherit;
}
} }
} .coms{
time{ font-family:"jaf-bernino-sans", sans-serif;
font-family:"jaf-bernino-sans", sans-serif; font-size:14px;
font-size:14px; a{
color:inherit;
}
}
time{
font-family:"jaf-bernino-sans", sans-serif;
font-size:14px;
}
} }
.sidebar_title{ .sidebar_title{
font-weight:normal; font-weight:normal;
border-bottom:1px solid #858585; border-bottom:1px solid #858585;

View File

@ -13,16 +13,43 @@ color: #333;
} }
header#top{ header#top{
display:block; 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{ .center{
max-width:1200px; max-width:1200px;
margin:auto; margin:auto;
position:relative;
} }
background: url('/assets/front/top.png') repeat-x; background: url('/assets/front/top.png') repeat-x;
img{ img{
width:120px; height:120px;
float:left; float:left;
margin:20px 0px; margin:20px 0px;
margin-left:20px; margin-left:20px;
@ -262,6 +289,7 @@ footer{
article, .corps_content{ article, .corps_content{
padding:40px; padding:40px;
padding-top:30px;
background:white; background:white;
margin-bottom:40px; margin-bottom:40px;
@ -354,6 +382,7 @@ article, .corps_content{
h1.principal{ h1.principal{
text-align:center; text-align:center;
} }
@ -372,10 +401,21 @@ h1.principal{
} }
@media only screen and (min-width: 0px) and (max-width: 960px) { @media only screen and (min-width: 0px) and (max-width: 960px) {
header#top img{ header#top{
float:none; text-align:center;
display:block; h1,h2{
margin:auto; position:static;
display:inline;
}
img{
float:none;
display:block;
margin:auto;
margin-bottom:1em;
}
} }
navigation#first_nav{ navigation#first_nav{
@ -383,7 +423,7 @@ h1.principal{
display:block; display:block;
margin:auto; margin:auto;
text-align:center; text-align:center;
margin-top:1em;
} }
#corps, #sidebar{ #corps, #sidebar{

View File

@ -76,7 +76,7 @@ class Category < ActiveRecord::Base
before_create do before_create do
if !position 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 if top
self.position = top.position.to_i + 1 self.position = top.position.to_i + 1
else else

View File

@ -30,7 +30,9 @@
.center .center
=link_to image_tag("front/logo.png"), "/" =link_to image_tag("front/logo.png"), "/"
%h1=link_to "Nicolas Bally", "/"
%h2=link_to "/ Blog", "/"
%navigation#first_nav %navigation#first_nav
=link_to "A propos", "/a-propos-de-nicolas-bally.html" =link_to "A propos", "/a-propos-de-nicolas-bally.html"
=link_to "Blog", "/" =link_to "Blog", "/"

View File

@ -3,11 +3,17 @@
%header %header
.right.coms .right
=link_to i(:"comment-o")+" "+article.comments.count.to_s, article_path(:slug => article.slug, :anchor => "comments") -if article.category
%time.updated{:datetime => Time.now, :pubdate => true} %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")

View File

@ -4,4 +4,4 @@
%ul %ul
-Category.order(:name).each do |category| -Category.order(:name).each do |category|
%li %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+'"'