diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index 3f63645..ac553ab 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -10486,10 +10486,29 @@ a.sp-video { } +#mobile_menu{ + display:none; +} + +.no-mobile{ + display:none; +} + @media screen and (min-width: 0px) and (max-width: 740px) { + .columns{ + float:none; + width:auto !important; + padding:0; + img{ + max-width:90%; + } + } + .center_content{ + padding:0 20px; + } .m_event{ img{ float:none; @@ -10590,6 +10609,105 @@ a.sp-video { } } + + + + #mobile_menu{ + z-index:900; + position:fixed; + top:0; + left:0; + right:0; + bottom:0; + background:rgba(0,0,0,0.9); + color:white; + padding:20px; + + .mobile_second_menu{ + padding:10px 0; + ul{ + margin:0; + list-style:none; + li{display:inline-block; + margin:4px 10px; + margin-left:0; + + } + + a{color:white;} + } + } + + + .mobile_first_menu{ + margin-top:20px; + font-family: "Roboto Condensed", sans-serif; + text-transform: uppercase; + color:white; + + ul{ + margin:0; + list-style:none; + li{display:block; + + padding:5px 0; + } + + a{color:white;} + } + + } + } + + #burger_menu{ + z-index:1000; + top:5px; + right:5px; + bottom:inherit; + } + + .mobile_clear{ + clear:both; + } + + .circuit_show{ + .localisation{ + margin:0; + margin-top:20px; + } + + .info_lien{ + .right{ + display:block; + width:auto; + float:none; + margin:auto !important; + margin-bottom: 10px !important; + } + } + + .logo{ + position:static; + display:block; + margin:auto; + } + + } + + #contenu{ + padding-top:0px !important; + } + + .mobile-block{ + display:block; + } + + .doc_pannel{ + + td,th{ + font-size:10px; + } + } } diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index 4f5776a..7800283 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -71,7 +71,71 @@ %body.pageAccueil + #mobile_menu + .mobile_second_menu + %ul.social-links + + + %li + -if current_p_customer + =link_to public_my_account_path do + =ic(:user) + Mon compte : + =current_p_customer.particular.firstname + =current_p_customer.particular.name + + -else + =link_to ic(:user)+" Mon compte", public_my_account_path + + + %li + %a{:href => "https://www.facebook.com/mamotosurcircuit/", :target => "_blank"} + =ic :"facebook-f" + + + + .mobile_first_menu + %ul + + + -MenuItem.where(:parent_id => nil, :menu_id => 1).order(:position).each do |menu_item| + -if menu_item_link(menu_item) and menu_item_link(menu_item) != "" + %li + =menu_item_link(menu_item) + + + -if false + %li.PGS_ROULAGE + =link_to "Trouvez votre journée", public_m_events_path + + + %li.PGS_ANNUAIRE_CIRCUIT + =link_to "Circuits", public_circuits_path, :class => ("active" if @circuits_active) + %li.PGS_ANNUAIRE_ORGA + =link_to "Organisateurs", public_organisateurs_path, :class => ("active" if @organisateurs_active) + + %li.PGS_DISTRIBUTEUR + %a{:href => "https://www.dunlop.eu/fr_fr/motorcycle/dealers/find-a-dealer.html", :target => "_blank", :title => "Distributeurs"} + %span Distributeurs + + + .mobile_second_menu + %br + %br + %ul + -if current_p_customer + %li=link_to ic(:"power-off")+" Déconnexion", logout_public_p_customer_auths_path() + + + + + %button.navbar-toggle.collapsed.btn-menu#burger_menu{:onclick => "$('#mobile_menu').toggle();"} + %span.sr-only Toggle navigation + %span.icon-bar + %span.icon-bar + %span.icon-bar + %span.fond_body_1 %span.fond_body_2 #conteneur @@ -82,11 +146,11 @@ .header-topbarbox-1 .header-topbarbox-2 %ul.social-links - + -if current_p_customer =link_to ic(:"power-off")+" Déconnexion", logout_public_p_customer_auths_path() - - + + %li -if current_p_customer =link_to public_my_account_path do @@ -94,15 +158,15 @@ Mon compte : =current_p_customer.particular.firstname =current_p_customer.particular.name - + -else =link_to ic(:user)+" Mon compte", public_my_account_path - + %li %a{:href => "https://www.facebook.com/mamotosurcircuit/", :target => "_blank"} =ic :"facebook-f" - + #conteneur_header #logo %h1 @@ -112,13 +176,13 @@ #position-menu #menu_haut.WithCarousel %ul - + -MenuItem.where(:parent_id => nil, :menu_id => 1).order(:position).each do |menu_item| -if menu_item_link(menu_item) and menu_item_link(menu_item) != "" %li =menu_item_link(menu_item) - + -if false %li.PGS_ROULAGE @@ -129,25 +193,21 @@ =link_to "Circuits", public_circuits_path, :class => ("active" if @circuits_active) %li.PGS_ANNUAIRE_ORGA =link_to "Organisateurs", public_organisateurs_path, :class => ("active" if @organisateurs_active) - + %li.PGS_DISTRIBUTEUR %a{:href => "https://www.dunlop.eu/fr_fr/motorcycle/dealers/find-a-dealer.html", :target => "_blank", :title => "Distributeurs"} %span Distributeurs - - + + - %button.navbar-toggle.collapsed.btn-menu{"aria-controls" => "navbar", "aria-expanded" => "false", "data-target" => "#navbar", "data-toggle" => "collapse", :type => "button"} - %span.sr-only Toggle navigation - %span.icon-bar - %span.icon-bar - %span.icon-bar - - - - - #contenu + + + + + #contenu + -if flash[:error] or flash[:notice] or flash[:alert] .flashs -if flash[:error] @@ -162,14 +222,14 @@ .alert %span.remove=ic :times =flash[:alert] - - - #centreetdroite + + #centreetdroite + =yield - + #pied #conteneur_pied .row @@ -182,7 +242,7 @@ %li.social-net__item %a.social-net__link.text-primary_h{:href => "https://www.facebook.com/mamotosurcircuit/", :target => "_blank"} =ic(:"facebook-f") - + .col-md-4 %section.footer-section.footer-section_list-columns %h3.footer-section__title.ui-title-inner Liens utiles @@ -207,10 +267,8 @@ 04 76 31 38 38 / conteneur_contenu // / conteneur// - %button#totop{:style => "display: none;", :type => "button"} To the top - :javascript resize() - + diff --git a/app/views/public/circuits/index.html.haml b/app/views/public/circuits/index.html.haml index 34c545c..b38faea 100644 --- a/app/views/public/circuits/index.html.haml +++ b/app/views/public/circuits/index.html.haml @@ -8,7 +8,7 @@ =form_tag "", :method => "get", :onsubmit => "" do - .right{:style => ""} + .no-mobile.right{:style => ""} =submit_tag "Rechercher", :class => "submit" %p .select.inline_large_input=select_tag "search[circuit_region_id]", options_for_select([["Région",""]]+CircuitRegion.order(:name).all.map{|a| [a.name, a.id]}, params[:search][:circuit_region_id]), :class => "" @@ -20,6 +20,9 @@ .clear + .mobile-block + =submit_tag "Rechercher", :class => "submit" + .center_content diff --git a/app/views/public/circuits/show.html.haml b/app/views/public/circuits/show.html.haml index 747abe3..74ba396 100644 --- a/app/views/public/circuits/show.html.haml +++ b/app/views/public/circuits/show.html.haml @@ -46,9 +46,9 @@ -if @circuit.facebook? =link_to raw(ic(:'facebook-f')), @circuit.facebook, :target => "_blank", :class => "new_btn" - + .mobile_clear %p.localisation - + =# =@circuit.address2 =@circuit.address3 if @circuit.address3? =@circuit.cp diff --git a/app/views/public/organisateurs/index.html.haml b/app/views/public/organisateurs/index.html.haml index f6fd702..09df3af 100644 --- a/app/views/public/organisateurs/index.html.haml +++ b/app/views/public/organisateurs/index.html.haml @@ -8,7 +8,7 @@ =form_tag "", :method => "get", :onsubmit => "" do - .right{:style => ""} + .no-mobile.right{:style => ""} =submit_tag "Rechercher", :class => "submit" %p .select.inline_large_input=select_tag "search[circuit_region_id]", options_for_select([["Région",""]]+CircuitRegion.order(:name).all.map{|a| [a.name, a.id]}, params[:search][:circuit_region_id]), :class => "" @@ -16,9 +16,13 @@ =text_field_tag "search[name]", params[:search][:name],:class => "form-control inline_input", :placeholder => "Nom" - + .clear + + .mobile-block + =submit_tag "Rechercher", :class => "submit" + .center_content %center diff --git a/app/views/public/p_customer_auths/new.haml b/app/views/public/p_customer_auths/new.haml index 60bb6a3..ae82ecd 100755 --- a/app/views/public/p_customer_auths/new.haml +++ b/app/views/public/p_customer_auths/new.haml @@ -45,3 +45,7 @@ %center =link_to "Créer mon compte", new_public_p_customer_path ,:class => "new_btn new_btn_red new_btn_big" =#render :partial => "public/p_customers/new_form" + + %br + %br + %br