diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index 3092e9e..59c8717 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -191,6 +191,10 @@ h1,h2,h3{ .q_counter_holder{ text-align:center; + p{ + margin-top:10px; + } + } .socials_links{ @@ -198,7 +202,7 @@ h1,h2,h3{ margin-right:10px; position:absolute; right:10px; - bottom:120px; + top:20px; a, .top_link{ display:inline-block; padding:10px 0px; @@ -301,4 +305,31 @@ padding:10px 20px; float:left; } +} + +.article_large{ + + .date{ + width:25%; + float:left; + border-right:1px solid #8d8d8d; + text-align:right; + margin-top:20px; + box-sizing:border-box; + padding-right:20px; + min-height:240px; + } + .description{ + + margin-left:25%; + padding-left:20px; + p{ + max-width:70%; + } + } +} + +#articles{ + margin-bottom:100px; + margin-top:40px; } \ No newline at end of file diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index 30d973d..c7d3694 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -141,7 +141,7 @@ .row .columns.span_4{:style => "padding:10px;"} - =link_to image_tag("/logo-w.png", :class => "logo"),"/" + =link_to image_tag("/logo-w.png", :class => "logo"),"/", :style => "margin-left:20Px;" %br %br %br diff --git a/app/views/public/articles/_article.html.haml b/app/views/public/articles/_article.html.haml index c1087b3..bec9eac 100644 --- a/app/views/public/articles/_article.html.haml +++ b/app/views/public/articles/_article.html.haml @@ -2,27 +2,22 @@ -img_url = article.image_file.file.large.url if article.image_file +.article_large + .article-1x{:style => "background-image:url('#{img_url}');"} + +   -=link_to article_path(:slug => lang_article.slug, :lang => @lang.slug), :style => "background-image:url('#{img_url}');", :class => "article-1x" do - - - - .overlay - =#image_tag( article.image_file.file.large.medium.url ) if article.image_file - + .date + =l(article.published_at, :format => :human_date) + .description -if !article.title_cached - %h2= lang_article.title - %p.date - ="le "+l(article.published_at, :format => :human_date) - ="-" - %span.coms=i(:"comment-o")+" "+article.comments.count.to_s - + %h3= lang_article.title + + + =simple_format lang_article.description - %p.read_more - Lire la suite - --if article.image_file and article.image_file.photograph - - -@page_images_credits << article.image_file.photograph - \ No newline at end of file + + =#%p.read_more + =#Lire la suite + .clear \ No newline at end of file diff --git a/app/views/public/articles/index.html.haml b/app/views/public/articles/index.html.haml index 07cd241..378d9bd 100644 --- a/app/views/public/articles/index.html.haml +++ b/app/views/public/articles/index.html.haml @@ -1,26 +1,11 @@ +.center -.menu_item_title - -if @lang.slug == "fr" - %h1 Articles du blog - -elsif @lang.slug == "en" - %h1 Blog -=render :partial => "article", :object => @articles[0], :as => :article + #articles=render @articles -.more_articles - -i = 0 - -@articles[1..20].each do |article| - -i = i +1 - - =render :partial => "article_x2", :object => article, :as => :article, :locals => {:i => i} -.clear -%br -%br -%br - -#articles_pagination= paginate @articles + #articles_pagination= paginate @articles diff --git a/config/routes.rb b/config/routes.rb index 24845f1..616fc90 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -41,17 +41,19 @@ Rails.application.routes.draw do get "evenements/:id.html" => "public/events#show", :as => "public_event" get "evenements.html" => "public/events#index", :as => "public_events" - get 'blog/:id.html' => "public/articles#show", :as => "public_article" + + + get 'actualite/:id.html' => "public/articles#show", :as => "public_article" - get "blog/archives/:year/:month.html"=> "public/articles#archives", :as => :archive_public_article - get "blog/tags/:id.html"=> "public/articles#tags", :as => :public_tag + get "actualite/archives/:year/:month.html"=> "public/articles#archives", :as => :archive_public_article + get "actualite/tags/:id.html"=> "public/articles#tags", :as => :public_tag get "categorie/:slug.:f"=> "public/articles#category", :as => :category_public_article, :f => "html" - get ':lang/blog/:slug.:f' => 'public/articles#show', :as => :article, :f => "html" - get ':lang/blog.:f' => 'public/articles#index', :as => :articles, :f => "html" + get ':lang/actualite/:slug.:f' => 'public/articles#show', :as => :article, :f => "html" + get ':lang/actualite.:f' => 'public/articles#index', :as => :articles, :f => "html" get ':lang/petitions/:slug.:f' => 'public/petitions#show', :as => :petition, :f => "html"