nouveau design

This commit is contained in:
Nicolas Bally 2012-09-14 12:08:30 +02:00
parent e8908a9d53
commit 6c8cab4222
19 changed files with 3672 additions and 548 deletions

View File

@ -123,7 +123,7 @@ GEM
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
therubyracer (0.9.9)
libv8 (~> 3.3.10)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

View File

@ -212,7 +212,7 @@ function set_prescriptions_big_container_size(){
function set_busy(){
$('body').append('<div id="busy"></div>');
$('#busy').activity({segments: 8, steps: 5, opacity: 0.5, width: 10, space: 0, length: 10, color: '#212222', speed: 1.5});
//$('#busy').activity({segments: 8, steps: 5, opacity: 0.5, width: 10, space: 0, length: 10, color: '#212222', speed: 1.5});
}
function unset_busy(){
$('#busy').remove();

View File

@ -0,0 +1,125 @@
function size_caroussel(min,max){
if(!min){
min = 500;
}
if(!max){
max = 1000;
}
if(min > $(window).width()){
min = $(window).width();
}
var maximum = null;
$('#carousel img').each(function() {
var value = parseFloat($(this).attr('data-ratio'));
maximum = (value > maximum) ? value : maximum;
});
maw_width = parseInt($(window).width()*0.6);
if(maw_width < min){
maw_width = min;
}
if(parseInt(maw_width) > parseInt(max)){
maw_width = max;
}
ideal_height= parseInt(maw_width/maximum);
height=ideal_height;
$('#carousel img').each(function(){
ratio = $(this).width()/$(this).height();
$(this).attr("width", height*$(this).data('ratio'));
$(this).attr("height", height);
});
$("#carousel").trigger("configuration", {
height : height
});
}
function getMinMarge( newItems ) {
var center = newItems.eq(0).outerWidth(true) + (newItems.eq(1).outerWidth(true) / 2);
var minMarg = ($(window).width() / 2) - center;
return minMarg;
}
function showTitle( item ) {
$('#title').html( item.attr( 'alt' ) );
}
$(window).resize(function(){
size_caroussel();
});
$(function() {
size_caroussel();
$('#carousel').carouFredSel({
width: 10000, // should be wide enough ;)
align: false,
circular: true,
infinite: false,
items: 3,
prev: '#prev',
next: '#next',
auto: true,
scroll: {
items: 1,
duration: 1000,
onBefore: function( oldItems, newItems, newSizes, animDuration ) {
$(this).parent().animate({
'marginLeft': getMinMarge( newItems )
}, animDuration);
oldItems.eq(1).animate({
'opacity': 0.8
}, animDuration);
newItems.eq(1).animate({
'opacity': 1
}, animDuration);
showTitle( newItems.eq(1) );
}
},
onCreate: function( items ) {
$(this).parent().css({
'marginLeft': getMinMarge( items )
});
$(this).children().not(':eq(1)').css({
'opacity': 0.8
});
showTitle( items.eq(1) );
}
});
});

File diff suppressed because it is too large Load Diff

View File

@ -30,14 +30,6 @@ $(document).ready(function() {
});
$("#slider").jCarouselLite({
btnNext: ".right-arrow",
btnPrev: ".left-arrow",
easing: "easeInOutQuad",
visible: 1,
auto: 5000,
speed: 1000
});

File diff suppressed because it is too large Load Diff

View File

@ -48,14 +48,52 @@
%body
#public
#header
#menu_top.menu
=render(:partial => "public/shared/first_menu")
#logo=link_to image_tag('front/logo.png', :alt => "Pharmacie Boissier - Rives sur Fures - Pays Voironnais (à proximité de Renage, Réaumont, Saint Blaise du Buis, Charnècles)"), "/"
.center
.menu
=render(:partial => "public/shared/first_menu")
=link_to image_tag('front/logo.png', :alt => "Pharmacie Boissier - Rives sur Fures - Pays Voironnais (à proximité de Renage, Réaumont, Saint Blaise du Buis, Charnècles)"), "/"
=yield
#menu_bottom
#left_bottom
#right_bottom.menu
=render(:partial => "public/shared/first_menu")
.clear
#footer
.center
.column
%h4 Horaires d'ouverture
%p
="- le lundi de 14h à 19h "
%br
="- du mardi au vendredi : 8h30 à 12h15 et 14h à 19h "
%br
="- le samedi : 8h30 à 12h15 "
%p=image_tag('front/footer_logo.png')
.column
%h4 Nous contacter
%p
Pharmacie Boissier
%br
63 rue du Plan
%br
38140 Rives sur Fures
%p
Plan daccès
%p
=link_to "contact@pharmacieboissier.com", "mailto:contact@pharmacieboissier.com"
%p
tel : 04 76 65 35 69
%br
fax : 04 76 66 83 50
.column.last
%h4 Pharmacie de garde
%p
=link_to "- consultez la liste des pharmacies de garde ", "/pages/infos-utiles/pharmacies-gardes.html"
%br
="- appelez le 3915"
%h4=link_to "Déposez vos ordonnances", "/pages/ordonnances.html"
%p=link_to "ou commandez un produit directement en ligne !","/pages/ordonnances.html"
.clear

View File

@ -1,8 +1,9 @@
%h2 Cosmétiques
=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 2).order("month ASC, title ASC"))
%p{:style=> "clear:both"}
%h2 Bébés
=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 3).order("month ASC, title ASC"))
%p{:style=> "clear:both"}
%h2 Hygiène
=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 1).order("month ASC, title ASC"))
%p{:style=> "clear:both"}

View File

@ -1,35 +1,9 @@
#bandeau
=@title
#page_main
#sidebar
#menu_left
%h3= link_to "Dossiers", "/pages/dossiers.html"
%ul
-Folder.where(:enabled => true, :folder_type_id => @folder.folder_type_id).order(:title).each do |folder|
%li
=link_to folder.title, folder_path(:slug => folder.slug)
-if folder == @folder
%ul
-@folder.articles.each do |article|
%li=link_to article.title, article_path(:folder_slug => folder.slug, :slug => article.slug)
#content
#breadcrumb
=link_to "Accueil", "/"
>
-if @folder.folder_type_id == 1
=link_to "Dossiers", "/pages/dossiers.html"
-else
=link_to "Nos prestations", "/pages/nos-prestations.html"
>
=link_to @folder.title, folder_path(:slug => @folder.slug)
>
=@article.title
=render @article.block
=render @article.block
%h2 Cet article fait partie du dossier :
=render @folder
%h2 Cet article fait partie du dossier :
=render @folder
.clear

View File

@ -1,35 +1,20 @@
#bandeau
=@title
#page_main
#sidebar
#menu_left
%h3= link_to "Dossiers", "/pages/dossiers.html"
%ul
-Folder.where(:enabled => true, :folder_type_id => @folder.folder_type_id).order(:title).each do |folder|
%li=link_to folder.title, folder_path(:slug => folder.slug)
#content
#breadcrumb
=link_to "Accueil", "/"
>
-if @folder.folder_type_id == 1
=link_to "Dossiers", "/pages/dossiers.html"
-else
=link_to "Nos prestations", "/pages/nos-prestations.html"
>
=@folder.title
=render @folder.block
%h2 Tous les articles du dossier
-@folder.articles.each do |article|
.article
.image_file
=link_to image_tag(article.image_file.file.square.url), article_path(:folder_slug => @folder.slug, :slug => article.slug) if article.image_file
=render @folder.block
%h2 Tous les articles du dossier
-@folder.articles.each do |article|
.article
.image_file
=link_to image_tag(article.image_file.file.square.url), article_path(:folder_slug => @folder.slug, :slug => article.slug) if article.image_file
.title
%h3=link_to article.title, article_path(:folder_slug => @folder.slug, :slug => article.slug)
.description
=link_to simple_format(article.description), article_path(:folder_slug => @folder.slug, :slug => article.slug)
.clear
.title
%h3=link_to article.title, article_path(:folder_slug => @folder.slug, :slug => article.slug)
.description
=link_to simple_format(article.description), article_path(:folder_slug => @folder.slug, :slug => article.slug)
.clear
.clear

View File

@ -1,114 +1,92 @@
-if flash[:notice]
#flash_notice{:style => "display:none"}=raw(flash[:notice])
<script type="text/javascript">
$.fn.prettyPhoto({
show_title : false,
allow_resize : false,
social_tools : false,
});
="$.prettyPhoto.open('#flash_notice','Information importante');"
</script>
#slider
<div id="wrapper" >
<div id="carousel" >
<img src="/assets/photos/01.jpg" alt="Lunar New Year 2012: Year of the Dragon" data-ratio="1.5" />
<img src="/assets/photos/02.jpg" alt="Lunar New Year 2012: Year of the Dragon" data-ratio="1.5"/>
#slider{:style => "width:979px;height:309px;"}
<img src="/assets/photos/03.jpg" alt="Lunar New Year 2012: Year of the Dragon" data-ratio="1.5"/>
<img src="/assets/photos/04.jpg" alt="Lunar New Year 2012: Year of the Dragon" data-ratio="1.5"/>
%ul=render :partial => "slide", :collection => @home.slider.slides
.right-arrow
=image_tag "front/fleche-droite.png"
.left-arrow
=image_tag "front/fleche-gauche.png"
</div>
</div>
#home_ordonnance
.center
%p
=link_to "Nouveau ! déposez vos ordonnances ou commandez un produit directement en ligne !", "/pages/ordonnances.html"
#main
.column_1.column
=render :partial => "public/shared/contact_block"
.column_2.column
-block = @home.home_blocks.find_by_slug("left_block")
- if block.cible
-url = block.cible.cible_url
-else
-url = ""
.title=link_to block.title, url
.desc=link_to simple_format(block.description), url
.cible
=link_to image_tag('front/en-savoir-plus-marron.png'), url
.column_3.column
-block = @home.home_blocks.find_by_slug("right_block")
- if block.cible
-url = block.cible.cible_url
-else
-url = ""
.title=link_to block.title, url
.desc=link_to simple_format(block.description), url
#home_folder
-block = @home.home_blocks.find_by_slug("right_block")
-if block and block.cible and block.cible_type == "Folder"
=image_tag((block.cible.image_file ? block.cible.image_file.file.large.medium.url : ""))
%h3 Dossier du mois
%h2=link_to block.cible.title, block.cible.cible_url
.description= simple_format block.cible.description
=link_to "Lire la suite", block.cible.cible_url, :class => "readmore"
%p{:style => "clear:both"}
.cible
=link_to image_tag('front/en-savoir-plus-marron.png'), url
.clear
#home_promotions
#promotions_header
Promotions
.column_1.column
.cat
Cosmétiques
-if @home.promotion_1
-promotion = @home.promotion_1
%h2
%p.center=link_to "PROMOTIONS (voir toutes les promotions)", "/pages/promotions.html"
.center
.column_1.column
.cat
Cosmétiques
-if @home.promotion_1
-promotion = @home.promotion_1
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
.column_2.column
.cat
Bébés
-if @home.promotion_2
-promotion = @home.promotion_2
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
.column_2.column
.cat
Bébés
-if @home.promotion_2
-promotion = @home.promotion_2
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
.column_3.column
.cat
Hygiène
-if @home.promotion_3
-promotion = @home.promotion_3
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
.column_3.column
.cat
Hygiène
-if @home.promotion_3
-promotion = @home.promotion_3
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label=link_to image_tag('front/en-cours.png'), "/pages/promotions.html"
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month
.label=link_to image_tag('front/a-venir.png'), "/pages/promotions.html"
.img
=link_to image_tag(promotion.image_file.file.large.medium.small.thumb.url), "/pages/promotions.html" if promotion.image_file
.title
=link_to promotion.title, "/pages/promotions.html"
.description
=link_to simple_format(promotion.description), "/pages/promotions.html"
.clear
.clear

View File

@ -1,57 +1,44 @@
#bandeau
=@title
#page_main
#sidebar
-if @menu_item.parent_id
-if @menu_item.ancestors.reverse[0]
-first_level_menu = @menu_item.ancestors.reverse[0]
-if @menu_item.parent_id
-if @menu_item.ancestors.reverse[0]
-first_level_menu = @menu_item.ancestors.reverse[0]
-else
-else
-first_level_menu = @menu_item
-first_level_menu = @menu_item
-if first_level_menu.children.size > 0
-if first_level_menu.children.size > 0
#menu_left
%h3= menu_item_link(first_level_menu)
%ul
-first_level_menu.children.where(:enabled => true).order(:position).each do |menu_item|
%li
=menu_item_link(menu_item)
-if menu_item.children.size > 0
%ul
-menu_item.children.where(:enabled => true).order(:position).each do |menu_item|
%li=menu_item_link(menu_item)
#second_nav
.center
-first_level_menu.children.where(:enabled => true).order(:position).each do |menu_item|
=menu_item_link(menu_item)
#content
#breadcrumb
=link_to "Accueil", "/"
>
-@menu_item.ancestors.reverse.each do |menu_item|
=menu_item_link(menu_item)
>
=@menu_item.name
#page_main
-if flash[:notice]
#flash_notice=raw(flash[:notice])
<script type="text/javascript">
$.fn.prettyPhoto({
show_title : false,
allow_resize : false,
social_tools : false,
});
="$.prettyPhoto.open('#flash_notice','Information importante');"
</script>
-if flash[:notice]
#flash_notice=raw(flash[:notice])
<script type="text/javascript">
$.fn.prettyPhoto({
show_title : false,
allow_resize : false,
social_tools : false,
});
="$.prettyPhoto.open('#flash_notice','Information importante');"
</script>
=render @menu_item.menu_content.blocks[0]
=render @menu_item.menu_content.blocks[0]
.clear

View File

@ -1,4 +1,5 @@
.promotion
.promotion{:style => ("margin-right:0px" if (promotion_counter+1).modulo(3) == 0)}
-if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label= image_tag ('front/en-cours.png')
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month