Merge pull request #513 from sgmap/add_crisp_to_homepage

[Fix #512] Crisp: add crisp to homepage
This commit is contained in:
gregoirenovel 2017-06-29 15:20:25 +02:00 committed by GitHub
commit c8456904c8
4 changed files with 20 additions and 10 deletions

View file

@ -70,6 +70,7 @@ $landing-breakpoint: 1040px;
color: #FFFFFF; color: #FFFFFF;
font-size: 24px; font-size: 24px;
margin-top: 30px; margin-top: 30px;
cursor: pointer;
&:hover { &:hover {
color: #FFFFFF; color: #FFFFFF;
@ -286,6 +287,7 @@ $cta-panel-button-border-size: 2px;
color: #FFFFFF; color: #FFFFFF;
font-size: 24px; font-size: 24px;
text-align: center; text-align: center;
cursor: pointer;
&:hover { &:hover {
color: #FFFFFF; color: #FFFFFF;

View file

@ -0,0 +1,15 @@
- if request.path == root_path
:javascript
window.$crisp=[];
window.CRISP_WEBSITE_ID="779b5050-4cc1-4172-8dd0-bde55716a289";
(function(){
d=document;
s=d.createElement("script");
s.src="https://client.crisp.im/l.js";
s.async=1;
d.getElementsByTagName("head")[0].appendChild(s);
})();
window.$crisp.push(["do", "chat:show"]);
- else
:javascript
window.$crisp && window.$crisp.push(["do", "chat:hide"]);

View file

@ -35,6 +35,7 @@
= render partial: "layouts/new_footer" = render partial: "layouts/new_footer"
= render partial: "layouts/google_analytics" = render partial: "layouts/google_analytics"
= render partial: "layouts/mailjet_newsletter" = render partial: "layouts/mailjet_newsletter"
= render partial: "layouts/crisp"
= javascript_include_tag "application", "data-turbolinks-track": true = javascript_include_tag "application", "data-turbolinks-track": true
= yield :charts_js = yield :charts_js

View file

@ -8,11 +8,7 @@
%br %br
vos procédures administratives en quelques minutes vos procédures administratives en quelques minutes
= link_to "Demander une démo", %a.hero-button{ target: "_blank", onclick: "javascript: ga('send', 'pageview', '/demander-une-demo'); $crisp.push(['do', 'chat:open'])" } Demander une démo
"mailto:#{t("dynamics.contact_email")}?subject=Demande de démo TPS",
class: "hero-button",
target: "_blank",
onclick: "javascript: ga('send', 'pageview', '/demander-une-demo')"
%p.hero-phone-cta %p.hero-phone-cta
ou nous appeler au 01 40 15 68 49 ou nous appeler au 01 40 15 68 49
@ -132,10 +128,6 @@
%h1.cta-panel-title Commencez à dématerialiser vos procédures %h1.cta-panel-title Commencez à dématerialiser vos procédures
%p.cta-panel-explanation Nous vous accompagnons dans la prise en main de loutil %p.cta-panel-explanation Nous vous accompagnons dans la prise en main de loutil
%div %div
= link_to "Demander une démo", %a.cta-panel-button{ target: "_blank", onclick: "javascript: ga('send', 'pageview', '/demander-une-demo'); $crisp.push(['do', 'chat:open'])" } Demander une démo
"mailto:#{t('dynamics.contact_email')}?subject=Demande de démo TPS",
class: "cta-panel-button",
target: "_blank",
onclick: "javascript: ga('send', 'pageview', '/demander-une-demo')"
%p.cta-panel-phone-cta %p.cta-panel-phone-cta
ou nous appeler au 01 40 15 68 49 ou nous appeler au 01 40 15 68 49