ecole_eft_app/app/views/layouts/public.html.haml
2014-07-18 17:24:04 +02:00

114 lines
3.2 KiB
Plaintext

!!!
%html{:xmlns=>"http://www.w3.org/1999/xhtml", :"xml:lang"=>"fr", :lang=>"fr"}
%head
%title= "Ecole EFT France - "+ @title.to_s+" - Geneviève Gagos"
%meta{ :"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" }
%meta{ :"name" => "Description", :content => @description }
%meta{ :"name" => "Keywords", :content => @keywords }
= javascript_include_tag "public"
= csrf_meta_tag
= stylesheet_link_tag 'public'
=render :partial => "public/shared/ga"
=javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false&region=FR"
%body
%a{:id => "top_anchor"}
#large.container
#top
=link_to image_tag( "front/logo.png", :id => "logo", :alt => ""), "/"
%ul#menu
%li=link_to i(:home, :icon => false), "/"
=render(:partial => "public/shared/first_menu")
#main.row
.col-md-8
=yield
.col-md-4.sidebar
=yield :sidebar
#testimony_slideshow
-Testimony.find(:all).sort_by { rand }.each do |testimony|
.testimony
.quote
=image_tag("front/left.png", :class => "prev-testimony")
=link_to testimony.quote, testimony_path(:slug => testimony.id.to_s+"-"+testimony.author.to_slug)
=image_tag("front/right.png", :class => "next-testimony")
.author=link_to testimony.author, testimony_path(:slug => testimony.id.to_s+"-"+testimony.author.to_slug)
:coffeescript
stop_dia = false
next_testimony = ->
active = $("#testimony_slideshow .active:first")
if active.next(".testimony").length == 0
$("#testimony_slideshow").append($("#testimony_slideshow").children(".testimony:first"))
active.fadeOut(300).removeClass("active")
active.next(".testimony").delay(300).fadeIn(300).addClass("active")
$(".prev-testimony").click ->
stop_dia = true
active = $("#testimony_slideshow .active:first")
if active.prev(".testimony").length == 0
$("#testimony_slideshow").prepend($("#testimony_slideshow").children(".testimony:last"))
active.fadeOut(300).removeClass("active")
active.prev(".testimony").delay(300).fadeIn(300).addClass("active")
$(".next-testimony").click ->
stop_dia = true
next_testimony()
dia_testimony = ->
if stop_dia == false
next_testimony()
window.setTimeout (->
dia_testimony()
), 7000
dia_testimony()
$("#testimony_slideshow").children(".testimony:first").show().addClass("active")
#bottom
%a#go_top{:href => "#top_anchor"}