This commit is contained in:
Nicolas Bally 2013-12-09 23:01:30 +01:00
parent e33494cf61
commit dab22ee570
8 changed files with 161 additions and 140 deletions

BIN
app/assets/images/book.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -256,9 +256,28 @@ body{
#home_main{ #home_main{
@extend .center; @extend .center;
#new_book{
color:white;
h3{
color:white;
margin-top:5px;
}
margin: 0px 15px 20px 23px ;
padding: 10px ;
background:#80a93f;
img{
width:100%;
}
}
#right{
float:right;
width:430px;
}
#events_container{ #events_container{
float:right;
width:430px;
background:url('/assets/events_shadow.png') no-repeat bottom center; background:url('/assets/events_shadow.png') no-repeat bottom center;
position:relative; position:relative;
top:-22px; top:-22px;

View File

@ -1,58 +1,58 @@
!!! !!!
%html{:xmlns=>"http://www.w3.org/1999/xhtml", :"xml:lang"=>"fr", :lang=>"fr"} %html{:xmlns=>"http://www.w3.org/1999/xhtml", :"xml:lang"=>"fr", :lang=>"fr"}
%head %head
%meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" } %meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" }
%title %title
="Ecologie Noblet - #{@title} - Jean-François Noblet" ="Ecologie Noblet - #{@title} - Jean-François Noblet"
-if @description -if @description
%meta{:name => "description", :content => @description} %meta{:name => "description", :content => @description}
-else -else
%meta{:name => "description", :content => "Site officiel de Jean-François Noblet, activités, actualité écologie..."} %meta{:name => "description", :content => "Site officiel de Jean-François Noblet, activités, actualité écologie..."}
-if @keywords -if @keywords
%meta{:name => "keywords", :content => @keywords} %meta{:name => "keywords", :content => @keywords}
-else -else
%meta{:name => "keywords", :content => "JFN, Jean François Noblet, Ecologie Noblet, Ecologie, Environnement, Nature, Ecrivain"} %meta{:name => "keywords", :content => "JFN, Jean François Noblet, Ecologie Noblet, Ecologie, Environnement, Nature, Ecrivain"}
= csrf_meta_tag = csrf_meta_tag
= javascript_include_tag "public" = javascript_include_tag "public"
= stylesheet_link_tag 'public' = stylesheet_link_tag 'public'
=render :partial => "public/shared/ga" =render :partial => "public/shared/ga"
%body %body
.top .top
#menu_top #menu_top
=render(:partial => "public/shared/first_menu") =render(:partial => "public/shared/first_menu")
=link_to image_tag('logo.png', :id => "logo", :alt => "Ecologie Noblet, logo JFN"), "/", :title => "Site officiel de Jean François Noblet" =link_to image_tag('logo.png', :id => "logo", :alt => "Ecologie Noblet, logo JFN"), "/", :title => "Site officiel de Jean François Noblet"
#main #main
#sidebar #sidebar
=yield :sidebar =yield :sidebar
#body #body
=yield :body =yield :body
%p{:style => "clear:both"} %p{:style => "clear:both"}
#footer_container #footer_container
#footer #footer
=render :partial => "public/shared/footer" =render :partial => "public/shared/footer"
%p{:style => "clear:both;"} %p{:style => "clear:both;"}
#legals #legals
%p{:style => "float:right"} %p{:style => "float:right"}
=link_to "Site réalisé par Nicolas Bally - Quartz Agence", "http://www.quartz-agence.com", :target => "_blank" =link_to "Site réalisé par Nicolas Bally", "http://nicolasbally.com", :target => "_blank"
%p=link_to "Mentions légales" %p=link_to "Mentions légales"

View File

@ -1,9 +1,10 @@
.event .event
%h3=event.title %h3=event.title
%p.date= event_human_date(event) %p.date= event_human_date(event)
%p -if event.image_file
=image_tag(event.image_file.file.large.medium.small.thumb.url, :alt => "Jean François Noblet - Blog écologie") %p
%p.desc =image_tag(event.image_file.file.large.medium.small.thumb.url, :alt => "Jean François Noblet - Blog écologie")
=simple_format(event.description) %p.desc
=simple_format(event.description)

View File

@ -1,89 +1,92 @@
!!! !!!
%html{:xmlns=>"http://www.w3.org/1999/xhtml", :"xml:lang"=>"fr", :lang=>"fr"} %html{:xmlns=>"http://www.w3.org/1999/xhtml", :"xml:lang"=>"fr", :lang=>"fr"}
%head %head
%meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" } %meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" }
%title %title
Jean-François Noblet Jean-François Noblet
= csrf_meta_tag = csrf_meta_tag
= javascript_include_tag "public" = javascript_include_tag "public"
= stylesheet_link_tag 'public' = stylesheet_link_tag 'public'
=render :partial => "public/shared/ga" =render :partial => "public/shared/ga"
%body %body
.top .top
#menu_top #menu_top
=render(:partial => "public/shared/first_menu") =render(:partial => "public/shared/first_menu")
=link_to image_tag('logo.png', :id => "logo"), "/" =link_to image_tag('logo.png', :id => "logo"), "/"
.slider .slider
.slides .slides
.slides_container .slides_container
-photos = 1..20 -photos = 1..20
-photos = photos.sort {rand(8)} -photos = photos.sort {rand(8)}
-photos = photos.sort {rand(6)} -photos = photos.sort {rand(6)}
-photos = photos.sort {rand(4)} -photos = photos.sort {rand(4)}
-photos = photos[0..4] -photos = photos[0..4]
-photos.each do |photo| -photos.each do |photo|
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/'+("%02d" % photo)+'.jpg', :style => "width:1000px;height:460px;"), "" .slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/'+("%02d" % photo)+'.jpg', :style => "width:1000px;height:460px;"), ""
.photos_link.hover .photos_link.hover
=link_to "Actuellement plus de 24 000 photos visibles dans ma photothèque", "http://www.photo-nature-environnement.com", :target => "_blank" =link_to "Actuellement plus de 24 000 photos visibles dans ma photothèque", "http://www.photo-nature-environnement.com", :target => "_blank"
%a.prev.hover{:href => "#"} %a.prev.hover{:href => "#"}
=image_tag('arrow-prev.png') =image_tag('arrow-prev.png')
%a.next.hover{:href => "#"} %a.next.hover{:href => "#"}
=image_tag('arrow-next.png') =image_tag('arrow-next.png')
#slider_shadow #slider_shadow
#home_main #home_main
#right
#events_container #events_container
#events #events
.slide .slide
%h2 A ne pas rater ! %h2 A ne pas rater !
=render Event.after(Time.now.beginning_of_day).order(:start_at).limit(3) =render Event.after(Time.now.beginning_of_day).order(:start_at).limit(3)
=link_to "voir la suite.", public_events_path, :style => "display:block;padding-top:15px;text-align:right" =link_to "voir la suite.", public_events_path, :style => "display:block;padding-top:15px;text-align:right"
#new_book
%h3 Découvrez mon nouveau livre !
#articles =link_to image_tag("book.jpg"), "http://www.plumedecarotte.com/ouvrage_fiche.php?id=147"
=render Article.recents.limit 3
=link_to "Voir tout les articles du blog", articles_path(), :id => "bloglink"
#articles
=render Article.recents.limit 3
%p{:style => "clear:both"} =link_to "Voir tout les articles du blog", articles_path(), :id => "bloglink"
#footer_container.home
#footer
=render :partial => "public/shared/footer" %p{:style => "clear:both"}
%p{:style => "clear:both;"} #footer_container.home
#footer
#legals =render :partial => "public/shared/footer"
%p{:style => "float:right"} %p{:style => "clear:both;"}
=link_to "Site réalisé par Nicolas Bally - Quartz Agence", "http://www.quartz-agence.com", :target => "_blank"
#legals
%p=link_to "Mentions légales" %p{:style => "float:right"}
=link_to "Site réalisé par Nicolas Bally - Quartz Agence", "http://www.quartz-agence.com", :target => "_blank"
%p=link_to "Mentions légales"

View File

@ -4,13 +4,10 @@
# Ensure the SQLite 3 gem is defined in your Gemfile # Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3' # gem 'sqlite3'
development: development:
adapter: mysql2 adapter: sqlite3
encoding: utf8 database: db/development.sqlite3
database: jfn_app
pool: 5 pool: 5
username: root timeout: 5000
socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and # Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake". # re-generated from your development database when you run "rake".

View File

@ -1,5 +1,5 @@
class AddImageToEvents < ActiveRecord::Migration class AddImageToEvents < ActiveRecord::Migration
def change def change
add_column :events, :image_file, :references add_column :events, :image_file_id, :integer
end end
end end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20111209094403) do ActiveRecord::Schema.define(:version => 20131209165939) do
create_table "actualities", :force => true do |t| create_table "actualities", :force => true do |t|
t.string "title" t.string "title"
@ -184,6 +184,7 @@ ActiveRecord::Schema.define(:version => 20111209094403) do
t.datetime "stop_at" t.datetime "stop_at"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.integer "image_file_id"
end end
create_table "external_links", :force => true do |t| create_table "external_links", :force => true do |t|