diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee index ea931d9..8e810ed 100644 --- a/app/assets/javascripts/public.js.coffee +++ b/app/assets/javascripts/public.js.coffee @@ -66,6 +66,19 @@ $(document).ready -> $(this).css("height",height+"px") + $(".vertical_center").each -> + height = $(this).parent().height() + margin = ((height-$(this).outerHeight())/ 2) + + $(this).css('margin-top', (margin-1)+"px") + + $('.column_inner').each -> + $(this).css('margin-top', "0px") + + height = $(this).closest('.row').height() + margin = ((height-$(this).outerHeight())/ 2) + + $(this).css('margin-top', (margin-1)+"px") diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index 588ef25..66279a4 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -9,11 +9,34 @@ @import "qi_grids"; -@import url('https://fonts.googleapis.com/css?family=Archivo+Narrow:400,400i,500,500i,600,600i,700,700i|Fugaz+One|Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i|Roboto+Condensed:300,300i,400,400i,700,700i|Russo+One'); + +body{ + font-family: Lato, Helvetica, Arial, sans-serif; + +} + +.row{ + margin:0 !important; +} + +$first_color:#EAB634; + +.column_inner{ + .main_center{ + max-width:550px; + padding:0 30px; + } + + +} +.main_center{ + margin:auto; +} + .center{ width:90%; - max-width:1100px; + max-width:900px; margin:auto; } @@ -34,8 +57,20 @@ img{ #header{ - background:#EAB634; + background: center center no-repeat black; + background-size:100%; + background-size:cover; padding:10px 20px; + padding-bottom:30px; + + h1{ + font-family: 'Pacifico', cursive; + font-size: 4em; + color:white; + text-align:center; + padding-top:0px; + + } #logo{ height:70px; @@ -77,4 +112,91 @@ ul{ } +#footer{ + #b6{ + position: absolute; + display: block; + z-index: 1; + left: 0; + right: 0; + height: 40px; + top: 0px; + } + position: relative; + h2{ + padding-bottom: 20px; + } + .center{ + max-width:600px; + } + text-align:center; + padding:60px 0; + background: url('/mont2.jpg?1=2') no-repeat center center; + background-size: cover; + font-weight: 300; + + h2{ + + margin:0; + text-align:center; + } + + fieldset{ + border:0; + padding:0; + margin:0; + + } + + table{ + width:100%; + + border-collapse:collapse; + td{ + padding-bottom:12px; + } + } + + input, textarea{ + box-sizing:border-box; + padding:12px 15px; + font-size:15px; + width:100%; + border:0; + border-radius:0; + background: rgba(255,255,255,0.5); + border: 1px solid gray; + color: white; + + + } + .error{ + color:red; + } + .submit{ + + max-width:100%; + text-align:center; + padding:12px 0; + padding-top:0px; + + + } + + .btn{ + border: 0 !important; + background-color: $first-color; + color: white; + border-radius:0; + display:inline-block; + width:auto; + padding:10px 20px; + } + + + padding-left:0; + padding-right:0; +} + + diff --git a/app/mailers/general_mails.rb b/app/mailers/general_mails.rb index 3bdea05..fb6409c 100644 --- a/app/mailers/general_mails.rb +++ b/app/mailers/general_mails.rb @@ -4,7 +4,7 @@ class GeneralMails < ActionMailer::Base layout 'mail' - default from: "Market-Inn " + default from: "Pollen Concepts " def general(lang_slug, mail_type, email, options = {}) diff --git a/app/mailers/question_mailer.rb b/app/mailers/question_mailer.rb new file mode 100755 index 0000000..4b2f3c3 --- /dev/null +++ b/app/mailers/question_mailer.rb @@ -0,0 +1,16 @@ +class QuestionMailer < ActionMailer::Base + default from: "Pollen Concepts " + + # Subject can be set in your I18n file at config/locales/en.yml + # with the following lookup: + # + # en.question.deliver.subject + # + def send_contact(contact) + @contact = contact + + mail to: "nbally@olwen-capital.com",:reply_to => @contact.email.to_s, :subject => "[Contact site]" + end + + +end diff --git a/app/models/block_content.rb b/app/models/block_content.rb index e5cd442..7a34d0b 100644 --- a/app/models/block_content.rb +++ b/app/models/block_content.rb @@ -7,7 +7,7 @@ class BlockContent < ApplicationRecord validates :nbr_columns, :presence => true - STYLES = [["normal",1],["Blanc encadré",2],["centré",3],["timeline",4],["centré sombre",5],["gris accueil",6]] + STYLES = [["normal",1],["Interieur colonne centrée",5],["Bandeau titre",2],["centré",3],["carré ombre",4]] diff --git a/app/models/contact.rb b/app/models/contact.rb index f2e9ad8..2f6df01 100755 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -7,14 +7,6 @@ class Contact < ApplicationRecord accepts_nested_attributes_for :document_orders validates :name, :presence => true - validates :firstname, :presence => true - validates :civilite, :presence => true - - validates :address, :presence => true, :if => :postal_need - validates :cp, :presence => true, :if => :postal_need - validates :city, :presence => true, :if => :postal_need - validates :country, :presence => true, :if => :postal_need - validates :email, :presence => true, :format => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :if => :email_need validates :message, :presence => true, :if => :message_need @@ -28,8 +20,6 @@ class Contact < ApplicationRecord true if Time.now > self.date_rgdp end - validates :rgdp, :presence => {:if => :valid_rgpd} - #raison_id # 1 => contact classique diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index 93879c5..6288272 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -1,7 +1,3 @@ --if @m_odr - -@title = @m_odr.name - -@description = @m_odr.description - -@products_controllers = ["ProductOrdersController", "ProductsController","ProductCategoriesController", "ProductCustomersController", "ProductCustomersAuthsController" ] @@ -42,6 +38,10 @@ + + + + %meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1"} %meta{ :"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" } %meta{ :"name" => "Description", :content => @description } @@ -69,14 +69,24 @@ =raw '' - - - - -@img_size = FastImage.size('https://pollen.olwen.xyz'+@facebook_img.to_s) + + -begin + -if @facebook_img + -require 'rmagick' + + -img = Magick::Image.ping((Rails.root.to_s + "/public".to_s + @facebook_img.to_s) ).first + -@img_size = [] + -puts @img_size[0] = img.columns + -puts @img_size[1] = img.rows + + -rescue + -"" -if @img_size and @img_size.size > 0 =raw '' =raw '' + + = javascript_include_tag "public" @@ -103,7 +113,7 @@ %span.remove=ic :times =flash[:alert] - #header + #header.with_ratio{:style => "position:relative;background-image:url('#{@img_url}');", :data => {:ratio => 0.30}} #menu_top %ul @@ -113,14 +123,29 @@ =menu_item_link(menu_item) =link_to "/" do - =image_tag "/logo-pollen.png", :id => "logo" + =image_tag "/logo-pollen-w.png", :id => "logo" .clear + + %div{:style => "position:absolute;top:0;right:0;left:0;bottom:0;"} + %h1.vertical_center=@title #main=yield #footer + + .center + %h2 + Contact + %p + Envie d’échanger autour de beaux projets ? N’hésitez pas à nous contacter. + + + .contact_form.contact_militer#form + =render :partial => "public/contacts/form" + + .clear :javascript diff --git a/app/views/portlets/render_public/_blockcontent.html.haml b/app/views/portlets/render_public/_blockcontent.html.haml index 8ef8e0a..907fc18 100644 --- a/app/views/portlets/render_public/_blockcontent.html.haml +++ b/app/views/portlets/render_public/_blockcontent.html.haml @@ -10,9 +10,10 @@ - css_class = "" - - css_class = "blanc_encadre" if input.style == 2 + - css_class = "large_centered" if input.style == 2 - css_class = "center_block" if input.style == 3 - - css_class = "dark_center_block" if input.style == 5 + - css_class = "shadow_square with_ratio" if input.style == 4 + - css_class = "column_inner" if input.style == 5 - css_class = "home_gray" if input.style == 6 -css_style = "" -css_columns = "" @@ -43,11 +44,11 @@ =raw "" if input.style == 5 or input.style == 6 and !@admin - =raw "
" + =raw "
" - =raw "
" if input.style == 2 + - =raw "
" if input.center + =raw "
" if input.center .row -for i in 1..input.nbr_columns.to_i %div{:class => "columns span_"+eval("input.row#{i}").to_s, :style => css_columns} @@ -59,7 +60,7 @@ =raw "
" if input.center - =raw "
" if input.style == 2 + =raw "
" diff --git a/app/views/public/contacts/_form.html.haml b/app/views/public/contacts/_form.html.haml index 41d291f..6250dca 100755 --- a/app/views/public/contacts/_form.html.haml +++ b/app/views/public/contacts/_form.html.haml @@ -1,245 +1,34 @@ --if !@new_site - - @contact = @contact || Contact.new - =semantic_form_for [:public, @contact], :remote => true do |f| - =f.inputs do - .row - .columns.span_8 - =f.hidden_field :raison_id - =f.hidden_field :survey_set_id - - -if @contact.raison_id == 2 - %p - Je souhaite recevoir sous pli confidentiel votre guide d'information consacré aux legs, donations et assurances-vie. Pour cela, je vous transmets mes coordonnées : - %br - %br - - %table{:style => "border-collapse:collapse;width:100%;"} - %tr - %td{:style => "width:20%;vertical-align:top;"} - =f.input :civilite, :label =>false, :as => :select, :collection => [[qit("don-particular-civilite-mme","Mme."), "Mme"], [qit("don-particular-civilite-m","M."), "M"]], :include_blank => false - %td{:style => "width:40%;vertical-align:top;"} - - =f.input :name, :label => false, :placeholder => qit("contact nom","Nom*") - - %td{:style => "width:40%;vertical-align:top;"} - =f.input :firstname, :label => false, :placeholder => qit("contact prenom","Prénom*") - - - - - - - -if @contact.raison_id != 1 - =f.input :address, :label => false, :placeholder => qit("contact adresse","Adresse") - %table{:style => "border-collapse:collapse;width:100%;"} - %tr - %td{:style => "width:35%;vertical-align:top;"}=f.input :cp, :label => false, :placeholder => qit("contact cp","Code postal") - %td{:style => "width:65%;vertical-align:top;"}=f.input :city, :label =>false, :placeholder => qit("contact city","Ville") - =f.input :country, :label => false, :priority_countries => ["FR", "CH", "BE"], :locale => @lang.slug - - - - =f.input :email, :label => false , :placeholder =>"Email" - =f.input :phone, :label => false, :placeholder => qit("contact tel","Téléphone") - - +- @contact = @contact || Contact.new() +=semantic_form_for [:public, @contact], :remote => true do |f| + =f.inputs do + + + %table{:style => "border-collapse:collapse;width:100%;"} + %tr + + %td{:style => "width:33.33%;vertical-align:top;padding-right:6px;"} + + =f.input :name, :label => false, :placeholder => "Nom/Prénom*" + + + %td{:style => "width:33.33%;vertical-align:top;padding-right:6px;"} + =f.input :email, :label => false , :placeholder =>"Email*" + %td{:style => "width:33.33%;vertical-align:top;padding-left:6px;"} + =f.input :phone, :label => false, :placeholder => qit("contact tel","Téléphone*") + %tr + %td{:colspan => 3} =f.input :message, :label =>false , :placeholder => "Message" - - -if @contact.raison_id == 3 - .contact_documents - =f.semantic_fields_for :document_orders do |f| - - .data_file#data_file{:id => f.object.data_file.token} - =f.hidden_field :data_file_id - =image_tag f.object.data_file.image_file.file.large.medium.small.thumb.url - %br - %br - %p - Quantité : - =f.text_field :qte - %p - =link_to "Supprimer de la liste", public_document_order_path(f.object.data_file.token), :method => :delete, :remote => true, :data => {:confirm => "Voulez-vous vraiment enlever ce document de la liste ?"} - .clear - - - .clear - - - - - =f.submit "Envoyer", :class => "btn" - - - - - - - %br - %br - - - - .columns.span_4.button_container{:style => "padding-left:60px;"} - .inner - - - - %p - = "Association" if @lang.id != 2 - 3P - %br - - - 1 A place des Orphelins - %br - 67000 Strasbourg - %br - FRANCE - - %p - =ic(:phone) - - +33 (0)3 88 35 67 30 - %p - =ic(:"envelope-o") - - =link_to "info@3p.quartz.xyz", "mailto:info@3p.quartz.xyz" - .clear - --else - .title - - - -if @contact.raison_id == 1 - =qit "contact-general-titre", "Je souhaite" - -elsif @contact.raison_id == 2 - =qit "contact-legs-titre", "Je souhaite en savoir plus" - -elsif @contact.raison_id == 3 - =qit "contact-commande-docs-titre", "Je souhaite" - -elsif @contact.raison_id == 4 - =qit "contact-militer-titre", "Je souhaite en savoir plus" - -else - =qit "Contacter 3P" - - .inner - =semantic_form_for [:public, @contact], :remote => true do |f| - =f.inputs do - - =f.hidden_field :raison_id - =f.hidden_field :survey_set_id - - -if @contact.raison_id == 1 - %p.intro - =qit "contact-general-intro" do - entrer en contact avec 3P. Laissez-nous votre message, nous reviendrons vers vous rapidement : - -if @contact.raison_id == 2 - %p.intro - =qit "contact-legs-intro" do - sur les legs, donations, et assurances-vie en faveur de 3P. Vous pouvez me contacter pour répondre à mes questions : - %br - %br - -if @contact.raison_id == 3 - %p.intro - =qit "contact-commande-docs-intro" do - recevoir gratuitement ces documents à cette adresse : - -if @contact.raison_id == 4 - %p.intro - =qit "contact-militer-intro" do - sur le militantisme avec 3P. Vous pouvez nous contacter et nous répondrons à vos questions. - - .civilite=f.input :civilite, :label =>false, :as => :radio, :collection => [[qit("don-particular-civilite-mme2","Madame"), "Mme"], [qit("don-particular-civilite-m2","Monsieur"), "M"]], :include_blank => false - - %table{:style => "border-collapse:collapse;width:100%;"} - %tr - - %td{:style => "width:50%;vertical-align:top;padding-right:10px;"} - - =f.input :firstname, :label => false, :placeholder => qit("contact prenom","Prénom*") - - %td{:style => "width:50%;vertical-align:top;padding-left:10px;"} - =f.input :email, :label => false , :placeholder =>"Email" - %tr - - %td{:style => "width:50%;vertical-align:top;padding-right:10px;"} - =f.input :name, :label => false, :placeholder => qit("contact nom","Nom*") - - %td{:style => "width:50%;vertical-align:top;padding-left:10px;"} - =f.input :phone, :label => false, :placeholder => qit("contact tel","Téléphone") - -if @contact.raison_id == 1 - - =f.input :raison_text, :label =>false, :as => :radio, :collection => ["Demande d'informations", "Faire appel à la Cellule Zoé", "Autre"], :include_blank => false - - -if @contact.raison_id != 4 and @contact.raison_id != 2 - -if @contact.raison_id != 1 - =f.input :address, :label => false, :placeholder => qit("contact adresse","Adresse") - %table{:style => "border-collapse:collapse;width:100%;"} - %tr - %td{:style => "width:35%;vertical-align:top;padding-right:10px;"}=f.input :cp, :label => false, :placeholder => qit("contact cp","Code postal") - %td{:style => "width:65%;vertical-align:top;padding-left:10px;"}=f.input :city, :label =>false, :placeholder => qit("contact city","Ville") - =f.input :country, :label => false, :priority_countries => ["FR", "CH", "BE"], :locale => @lang.slug - - - - -if @contact.raison_id == 4 - =f.input :objet, :label =>false , :placeholder => qit("contact-objet", "Objet de votre message"), :as => :string - - =f.input :message, :label =>false , :placeholder => "Message" - - -if @contact.raison_id == 3 - .contact_documents - =f.semantic_fields_for :document_orders do |f| - - .data_file#data_file{:id => f.object.data_file.token} - =f.hidden_field :data_file_id - =image_tag f.object.data_file.image_file.file.large.medium.small.thumb.url if f.object.data_file.image_file and f.object.data_file.image_file.file - .desc - %h3 - =f.object.data_file.title - %p - Quantité : - =f.text_field :qte - %p - =link_to qit("Supprimer de la liste"), public_document_order_path(f.object.data_file.token), :method => :delete, :remote => true, :data => {:confirm => qit("Voulez-vous vraiment enlever ce document de la liste ?")} - .clear - - - .clear - .rgdp - =f.input :rgdp, :label => qit("rgpd-consentement-contact","J'accepte que les informations saisies dans le formulaire soient enregistrées et utilisées par l'association dans le cadre du traitement de ma demande et je certifie avoir 16 ans ou plus.") - - %p.rgpd_link_legals=qit "rgpd-detail-line", "Pour en savoir plus sur le traitement de vos données personnelles consultez le détail sur cette page." - - - -if @contact.raison_id == 2 - .left_sign - .cta.vertical_center=f.submit qit("Contactez-moi >"), :class => "btn" - .img - =image_tag "/muriel.png" - .description.vertical_center - - Muriel Arnal - %br - 02 97 13 11 10 - - %br - =link_to "muriel@3p.quartz.xyz", "mailto:muriel@3p.quartz.xyz" - - - - .clear + .submit + =f.submit "Envoyer", :class => "btn" + + + - - - - .clear - -else - .cta=f.submit qit("Contactez-nous >"), :class => "btn" - - + .clear \ No newline at end of file diff --git a/app/views/public/contacts/_inline_thank.html.haml b/app/views/public/contacts/_inline_thank.html.haml index 383f14f..e69de29 100755 --- a/app/views/public/contacts/_inline_thank.html.haml +++ b/app/views/public/contacts/_inline_thank.html.haml @@ -1,4 +0,0 @@ -%div{:style => "text-align:center;max-width:400px;margin:auto;margin-top:30px"} - %p - Merci beaucoup pour votre demande, je vous recontacterai dans les meilleurs délais. - %p Muriel Arnal \ No newline at end of file diff --git a/app/views/public/contacts/_thank.html.haml b/app/views/public/contacts/_thank.html.haml index df5bd99..8341cd9 100755 --- a/app/views/public/contacts/_thank.html.haml +++ b/app/views/public/contacts/_thank.html.haml @@ -1,26 +1,6 @@ --if !@new_site - %div{:style => "text-align:center;"} - %h3 Merci pour votre message ! + + - %p Nous mettons tout en œuvre pour vous répondre dans les meilleurs délais. - %p L’équipe de 3P +%p Merci pour votre message, nous mettons tout en œuvre pour vous répondre dans les meilleurs délais. +%p L’équipe de Pollen Concepts --else - .title - -if @contact.raison_id == 2 || @contact.raison_id == 4 - =qit "contact-raison2-thank", "Merci pour votre message !" - -else - =qit "contact-raison3-thank", "Merci pour votre demande" - - - - .inner{:style => "text-align:center;"} - -if @contact.raison_id == 3 - %p.intro - =qit "contact-raison3-thank-s", "Nous vous enverrons ces documents dans les meilleurs délais." - -else - %p.intro - =qit "contact-raison-thank-s", "Nous vous contacterons dans les meilleurs délais." - - - \ No newline at end of file diff --git a/app/views/public/contacts/new.html.haml b/app/views/public/contacts/new.html.haml index e69de29..0b068eb 100644 --- a/app/views/public/contacts/new.html.haml +++ b/app/views/public/contacts/new.html.haml @@ -0,0 +1,19 @@ +-if !@new_site + .contact_page + + %h1 Contacter 3P + + #form=render :partial => "form" + +-else + + -if @contact.raison_id == 3 + -@title = qit("contact doc","Recevoir des documents papier par courrier") + =render :partial => "public/products/new_top" + .render_block.contact_page + + + + .contact_form.contact_militer#form=render :partial => "form" + + .bottom_space \ No newline at end of file diff --git a/app/views/public/menu_items/show.html.haml b/app/views/public/menu_items/show.html.haml index 58375a1..787f3ee 100644 --- a/app/views/public/menu_items/show.html.haml +++ b/app/views/public/menu_items/show.html.haml @@ -21,15 +21,15 @@ -else -if @menu_item.title_image -if @menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).image_file - -img_url = @menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).image_file.file.large.url + -@img_url = @menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).image_file.file.large.url -@facebook_img = @menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).image_file.file.large.medium.url -elsif @menu_item.image_file - -img_url = @menu_item.image_file.file.large.url + -@img_url = @menu_item.image_file.file.large.url -@facebook_img = @menu_item.image_file.file.large.medium.url - .center_content.menu_content_inner{:class => @menu_item_lang.slug} + .menu_content_inner{:class => @menu_item_lang.slug} .inner .menu_item_content diff --git a/app/views/question_mailer/send_contact.html.haml b/app/views/question_mailer/send_contact.html.haml index af779b2..712b7e0 100755 --- a/app/views/question_mailer/send_contact.html.haml +++ b/app/views/question_mailer/send_contact.html.haml @@ -47,23 +47,6 @@ =simple_format @contact.message %hr -.row - -@contact.document_orders.each do |document_order| - -data_file = document_order.data_file - -if data_file.image_file - - .data_file#data_file{:id => data_file.token} - =image_tag "https://3p.quartz.xyz"+data_file.image_file.file.large.medium.small.thumb.url.to_s - - =data_file.title - %br - Quantité : - =document_order.qte - %br - %br - .clear{:style => "clear:both;"} - - :scss .data_file{ img{ diff --git a/public/logo-pollen-w.png b/public/logo-pollen-w.png new file mode 100644 index 0000000..2249615 Binary files /dev/null and b/public/logo-pollen-w.png differ diff --git a/public/mont.jpg b/public/mont.jpg new file mode 100644 index 0000000..ecce268 Binary files /dev/null and b/public/mont.jpg differ diff --git a/public/mont2.jpg b/public/mont2.jpg new file mode 100644 index 0000000..02638c1 Binary files /dev/null and b/public/mont2.jpg differ