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) sprockets (2.0.3)
hike (~> 1.2) hike (~> 1.2)
rack (~> 1.0) rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1) tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5) sqlite3 (1.3.5)
therubyracer (0.9.9) therubyracer (0.9.9)
libv8 (~> 3.3.10) 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(){ function set_busy(){
$('body').append('<div id="busy"></div>'); $('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(){ function unset_busy(){
$('#busy').remove(); $('#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 %body
#public #public
#header #header
#menu_top.menu .center
.menu
=render(:partial => "public/shared/first_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)"), "/" =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 =yield
#menu_bottom #footer
#left_bottom .center
#right_bottom.menu .column
=render(:partial => "public/shared/first_menu") %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 .clear

View File

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

View File

@ -1,30 +1,4 @@
#bandeau
=@title
#page_main #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

View File

@ -1,23 +1,8 @@
#bandeau
=@title
#page_main #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 =render @folder.block
%h2 Tous les articles du dossier %h2 Tous les articles du dossier

View File

@ -1,64 +1,42 @@
-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" >
#slider{:style => "width:979px;height:309px;"} <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"/>
<img src="/assets/photos/03.jpg" alt="Lunar New Year 2012: Year of the Dragon" data-ratio="1.5"/>
%ul=render :partial => "slide", :collection => @home.slider.slides <img src="/assets/photos/04.jpg" alt="Lunar New Year 2012: Year of the Dragon" data-ratio="1.5"/>
.right-arrow
=image_tag "front/fleche-droite.png"
.left-arrow
=image_tag "front/fleche-gauche.png"
#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 </div>
</div>
#home_ordonnance
.center
%p
=link_to "Nouveau ! déposez vos ordonnances ou commandez un produit directement en ligne !", "/pages/ordonnances.html"
#home_folder
-block = @home.home_blocks.find_by_slug("right_block") -block = @home.home_blocks.find_by_slug("right_block")
- if block.cible -if block and block.cible and block.cible_type == "Folder"
-url = block.cible.cible_url =image_tag((block.cible.image_file ? block.cible.image_file.file.large.medium.url : ""))
-else %h3 Dossier du mois
-url = "" %h2=link_to block.cible.title, block.cible.cible_url
.title=link_to block.title, url .description= simple_format block.cible.description
.desc=link_to simple_format(block.description), url =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 #home_promotions
#promotions_header
Promotions
%h2
%p.center=link_to "PROMOTIONS (voir toutes les promotions)", "/pages/promotions.html"
.center
.column_1.column .column_1.column
.cat .cat
Cosmétiques Cosmétiques

View File

@ -1,42 +1,29 @@
#bandeau
=@title
#page_main -if @menu_item.parent_id
#sidebar
-if @menu_item.parent_id
-if @menu_item.ancestors.reverse[0] -if @menu_item.ancestors.reverse[0]
-first_level_menu = @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
#second_nav
.center
#menu_left
%h3= menu_item_link(first_level_menu)
%ul
-first_level_menu.children.where(:enabled => true).order(:position).each do |menu_item| -first_level_menu.children.where(:enabled => true).order(:position).each do |menu_item|
%li
=menu_item_link(menu_item) =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)
#content #page_main
#breadcrumb
=link_to "Accueil", "/"
>
-@menu_item.ancestors.reverse.each do |menu_item|
=menu_item_link(menu_item)
>
=@menu_item.name
-if flash[:notice] -if flash[:notice]
#flash_notice=raw(flash[:notice]) #flash_notice=raw(flash[:notice])

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 -if promotion.month.beginning_of_month == Date.today.beginning_of_month
.label= image_tag ('front/en-cours.png') .label= image_tag ('front/en-cours.png')
-elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month -elsif promotion.month.beginning_of_month == Date.today.next_month.beginning_of_month