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{
@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{
float:right;
width:430px;
background:url('/assets/events_shadow.png') no-repeat bottom center;
position:relative;
top:-22px;

View File

@ -1,58 +1,58 @@
!!!
%html{:xmlns=>"http://www.w3.org/1999/xhtml", :"xml:lang"=>"fr", :lang=>"fr"}
%head
%meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" }
%title
="Ecologie Noblet - #{@title} - Jean-François Noblet"
-if @description
%meta{:name => "description", :content => @description}
-else
%meta{:name => "description", :content => "Site officiel de Jean-François Noblet, activités, actualité écologie..."}
-if @keywords
%meta{:name => "keywords", :content => @keywords}
-else
%meta{:name => "keywords", :content => "JFN, Jean François Noblet, Ecologie Noblet, Ecologie, Environnement, Nature, Ecrivain"}
= csrf_meta_tag
%head
%meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" }
%title
="Ecologie Noblet - #{@title} - Jean-François Noblet"
-if @description
%meta{:name => "description", :content => @description}
-else
%meta{:name => "description", :content => "Site officiel de Jean-François Noblet, activités, actualité écologie..."}
-if @keywords
%meta{:name => "keywords", :content => @keywords}
-else
%meta{:name => "keywords", :content => "JFN, Jean François Noblet, Ecologie Noblet, Ecologie, Environnement, Nature, Ecrivain"}
= csrf_meta_tag
= javascript_include_tag "public"
= stylesheet_link_tag 'public'
= javascript_include_tag "public"
= stylesheet_link_tag 'public'
=render :partial => "public/shared/ga"
%body
=render :partial => "public/shared/ga"
%body
.top
#menu_top
=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"
#main
#sidebar
=yield :sidebar
.top
#menu_top
=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"
#main
#sidebar
=yield :sidebar
#body
=yield :body
%p{:style => "clear:both"}
#footer_container
#footer
=render :partial => "public/shared/footer"
%p{:style => "clear:both;"}
#body
=yield :body
%p{:style => "clear:both"}
#footer_container
#footer
=render :partial => "public/shared/footer"
%p{:style => "clear:both;"}
#legals
%p{:style => "float:right"}
=link_to "Site réalisé par Nicolas Bally - Quartz Agence", "http://www.quartz-agence.com", :target => "_blank"
#legals
%p{:style => "float:right"}
=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
%h3=event.title
%p.date= event_human_date(event)
%h3=event.title
%p.date= event_human_date(event)
%p
=image_tag(event.image_file.file.large.medium.small.thumb.url, :alt => "Jean François Noblet - Blog écologie")
%p.desc
=simple_format(event.description)
-if event.image_file
%p
=image_tag(event.image_file.file.large.medium.small.thumb.url, :alt => "Jean François Noblet - Blog écologie")
%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"}
%head
%meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" }
%title
Jean-François Noblet
= csrf_meta_tag
%head
%meta{:"http-equiv" => "content-type" ,:content =>"text/html;charset=UTF-8" }
%title
Jean-François Noblet
= csrf_meta_tag
= javascript_include_tag "public"
= stylesheet_link_tag 'public'
=render :partial => "public/shared/ga"
%body
= javascript_include_tag "public"
= stylesheet_link_tag 'public'
=render :partial => "public/shared/ga"
%body
.top
#menu_top
=render(:partial => "public/shared/first_menu")
=link_to image_tag('logo.png', :id => "logo"), "/"
.slider
.slides
.slides_container
-photos = 1..20
-photos = photos.sort {rand(8)}
-photos = photos.sort {rand(6)}
-photos = photos.sort {rand(4)}
-photos = photos[0..4]
-photos.each do |photo|
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/'+("%02d" % photo)+'.jpg', :style => "width:1000px;height:460px;"), ""
.photos_link.hover
=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 => "#"}
=image_tag('arrow-prev.png')
%a.next.hover{:href => "#"}
=image_tag('arrow-next.png')
#slider_shadow
.top
#menu_top
=render(:partial => "public/shared/first_menu")
=link_to image_tag('logo.png', :id => "logo"), "/"
.slider
.slides
.slides_container
-photos = 1..20
-photos = photos.sort {rand(8)}
-photos = photos.sort {rand(6)}
-photos = photos.sort {rand(4)}
-photos = photos[0..4]
-photos.each do |photo|
.slide{:style => "width:1000px;height:460px;"}=link_to image_tag('diaporama/'+("%02d" % photo)+'.jpg', :style => "width:1000px;height:460px;"), ""
.photos_link.hover
=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 => "#"}
=image_tag('arrow-prev.png')
%a.next.hover{:href => "#"}
=image_tag('arrow-next.png')
#slider_shadow
#home_main
#events_container
#events
.slide
%h2 A ne pas rater !
=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"
#articles
=render Article.recents.limit 3
=link_to "Voir tout les articles du blog", articles_path(), :id => "bloglink"
%p{:style => "clear:both"}
#footer_container.home
#footer
=render :partial => "public/shared/footer"
%p{:style => "clear:both;"}
#legals
%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"
#home_main
#right
#events_container
#events
.slide
%h2 A ne pas rater !
=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"
#new_book
%h3 Découvrez mon nouveau livre !
=link_to image_tag("book.jpg"), "http://www.plumedecarotte.com/ouvrage_fiche.php?id=147"
#articles
=render Article.recents.limit 3
=link_to "Voir tout les articles du blog", articles_path(), :id => "bloglink"
%p{:style => "clear:both"}
#footer_container.home
#footer
=render :partial => "public/shared/footer"
%p{:style => "clear:both;"}
#legals
%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
# gem 'sqlite3'
development:
adapter: mysql2
encoding: utf8
database: jfn_app
adapter: sqlite3
database: db/development.sqlite3
pool: 5
username: root
socket: /tmp/mysql.sock
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".

View File

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

View File

@ -11,7 +11,7 @@
#
# 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|
t.string "title"
@ -184,6 +184,7 @@ ActiveRecord::Schema.define(:version => 20111209094403) do
t.datetime "stop_at"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "image_file_id"
end
create_table "external_links", :force => true do |t|