Преглед изворни кода

css for share field formatter

Bachir Soussi Chiadmi пре 9 година
родитељ
комит
2b0085405e

+ 13 - 0
sites/all/modules/gui/jeemod/jeemod.module

@@ -161,6 +161,7 @@ function jeemod_preprocess_jeemod_share_links(&$vars){
 
   $tags = explode(' ', str_replace('#', '', $entity->field_partager['und'][0]['value']));
 
+  // twitter
   $vars['twitter_url'] = url("https://twitter.com/intent/tweet", array(
     'absolute'=>true,
     'query'=>array(
@@ -171,6 +172,7 @@ function jeemod_preprocess_jeemod_share_links(&$vars){
   ));
   $vars['twitter_title'] = "Twitter $nodetitle";
 
+  // face book
   $vars['fb_url'] = url("https://www.facebook.com/sharer.php", array(
     'absolute'=>true,
     'query'=>array(
@@ -180,5 +182,16 @@ function jeemod_preprocess_jeemod_share_links(&$vars){
   ));
   $vars['fb_title'] = "Partager $nodetitle";
 
+  // mail
+  // $vars['mail_url'] = "mailto:?subject=$nodetitle&body=$text";
+  $vars['mail_url'] = url("mailto:", array(
+    'absolute'=>true,
+    'query'=>array(
+      "subject"=>$text,
+      "body"=>$text,
+    )
+  ));
+  $vars['mail_title'] = "Envoyer par email $nodetitle";
+
 
 }

+ 17 - 7
sites/all/modules/gui/jeemod/jeemod_share_links.tpl.php

@@ -1,7 +1,17 @@
-<a class="twitter-buttuon" href="<?php print $twitter_url; ?>" target="_blank">
-  <?php print $twitter_title; ?>
-</a>
-<br/>
-<a class="fb-button" href="<?php print $fb_url; ?>" target="_blank">
-  <?php print $fb_title; ?>
-</a>
+<ul>
+  <li>
+    <a class="twitter-button" href="<?php print $twitter_url; ?>" target="_blank">
+      <?php print $twitter_title; ?>
+    </a>
+  </li>
+  <li>
+    <a class="fb-button" href="<?php print $fb_url; ?>" target="_blank">
+      <?php print $fb_title; ?>
+    </a>
+  </li>
+  <li>
+    <a class="mail-button" href="<?php print $mail_url; ?>" target="_blank">
+      <?php print $mail_title; ?>
+    </a>
+  </li>
+</ul>

+ 78 - 42
sites/all/themes/gui/jee/css/jee.css

@@ -5102,6 +5102,42 @@ div.messages {
     cursor: move;
   }
 }
+/* line 943, jee.scss */
+#main #chapter-wrapper .field-name-field-partager ul, #main #chapter-wrapper .field-name-field-partager li {
+  margin: 0;
+  padding: 0;
+  list-style: none;
+}
+/* line 944, jee.scss */
+#main #chapter-wrapper .field-name-field-partager li {
+  display: inline-block;
+  width: 35px;
+  height: 35px;
+}
+/* line 948, jee.scss */
+#main #chapter-wrapper .field-name-field-partager a {
+  overflow: hidden;
+  text-indent: -3000px;
+  display: block;
+  width: 100%;
+  height: 100%;
+  background-color: red;
+}
+/* line 953, jee.scss */
+#main #chapter-wrapper .field-name-field-partager a.twitter-button {
+  background: transparent url("../assets/img/btn-twit.png") no-repeat center center;
+  background: none, url("../assets/img/btn-twit.svg") no-repeat center center;
+}
+/* line 954, jee.scss */
+#main #chapter-wrapper .field-name-field-partager a.fb-button {
+  background: transparent url("../assets/img/btn-fb.png") no-repeat center center;
+  background: none, url("../assets/img/btn-fb.svg") no-repeat center center;
+}
+/* line 955, jee.scss */
+#main #chapter-wrapper .field-name-field-partager a.mail-button {
+  background: transparent url("../assets/img/btn-mail.png") no-repeat center center;
+  background: none, url("../assets/img/btn-mail.svg") no-repeat center center;
+}
 
 /* ______________  ________________   _       ______  ___    ____  ____  __________
   / ___/_  __/   |/_  __/  _/ ____/  | |     / / __ \/   |  / __ \/ __ \/ ____/ __ \
@@ -5109,7 +5145,7 @@ div.messages {
  ___/ // / / ___ |/ / _/ // /___     | |/ |/ / _, _/ ___ |/ ____/ ____/ /___/ _, _/
 /____//_/ /_/  |_/_/ /___/\____/     |__/|__/_/ |_/_/  |_/_/   /_/   /_____/_/ |_|
 */
-/* line 951, jee.scss */
+/* line 969, jee.scss */
 #static-wrapper {
   position: absolute;
   background-color: #fff;
@@ -5120,7 +5156,7 @@ div.messages {
           transition-property: opacity;
 }
 @media only screen and (max-width: 40em) {
-  /* line 951, jee.scss */
+  /* line 969, jee.scss */
   #static-wrapper {
     top: 10%;
     bottom: 0;
@@ -5130,7 +5166,7 @@ div.messages {
   }
 }
 @media only screen and (min-width: 40.063em) {
-  /* line 951, jee.scss */
+  /* line 969, jee.scss */
   #static-wrapper {
     top: 15%;
     bottom: 0;
@@ -5140,14 +5176,14 @@ div.messages {
     z-index: -1;
   }
 }
-/* line 972, jee.scss */
+/* line 990, jee.scss */
 #static-wrapper.visible {
   opacity: 0.9;
   -webkit-transition: 1.5s ease-out;
           transition: 1.5s ease-out;
   z-index: 500;
 }
-/* line 978, jee.scss */
+/* line 996, jee.scss */
 #static-wrapper > .close {
   position: absolute;
   cursor: pointer;
@@ -5155,7 +5191,7 @@ div.messages {
   background: none, url("../assets/img/close.svg") no-repeat center center;
 }
 @media only screen and (max-width: 40em) {
-  /* line 978, jee.scss */
+  /* line 996, jee.scss */
   #static-wrapper > .close {
     top: 10px;
     right: 10px;
@@ -5165,7 +5201,7 @@ div.messages {
   }
 }
 @media only screen and (min-width: 40.063em) {
-  /* line 978, jee.scss */
+  /* line 996, jee.scss */
   #static-wrapper > .close {
     top: 20px;
     right: 20px;
@@ -5175,7 +5211,7 @@ div.messages {
   }
 }
 @media only screen and (max-width: 40em) {
-  /* line 994, jee.scss */
+  /* line 1012, jee.scss */
   #static-wrapper > .inner {
     padding: 1em 1em 1.5em;
     width: 100%;
@@ -5184,7 +5220,7 @@ div.messages {
   }
 }
 @media only screen and (min-width: 40.063em) {
-  /* line 994, jee.scss */
+  /* line 1012, jee.scss */
   #static-wrapper > .inner {
     padding: 5em 7em;
     width: 100%;
@@ -5192,7 +5228,7 @@ div.messages {
     overflow: hidden;
   }
 }
-/* line 1004, jee.scss */
+/* line 1022, jee.scss */
 #static-wrapper > .inner > .node {
   width: 100%;
   height: 100%;
@@ -5200,42 +5236,42 @@ div.messages {
   overflow-x: hidden;
   padding-right: 1.5em;
 }
-/* line 1011, jee.scss */
+/* line 1029, jee.scss */
 #static-wrapper h2.node-title {
   font-family: "epflulb";
   text-transform: uppercase !important;
   font-size: 3em;
   color: #000;
 }
-/* line 1019, jee.scss */
+/* line 1037, jee.scss */
 #static-wrapper .content h3 {
   font-family: "epflulb";
   font-size: 2em;
   text-transform: uppercase !important;
   color: #8d198f;
 }
-/* line 1026, jee.scss */
+/* line 1044, jee.scss */
 #static-wrapper .content h4 {
   font-size: 1em;
   font-weight: 700;
 }
-/* line 1033, jee.scss */
+/* line 1051, jee.scss */
 #static-wrapper .content p {
   font-family: "open_sans", sans-serif;
   font-weight: 600;
   font-size: 0.85em;
   line-height: 1.5em;
 }
-/* line 1040, jee.scss */
+/* line 1058, jee.scss */
 #static-wrapper .content a {
   text-decoration: underline;
 }
-/* line 1043, jee.scss */
+/* line 1061, jee.scss */
 #static-wrapper .content img.floatleft {
   float: left;
   margin-right: 1em;
 }
-/* line 1044, jee.scss */
+/* line 1062, jee.scss */
 #static-wrapper .content img.floatright {
   float: right;
   margin-left: 1em;
@@ -5247,82 +5283,82 @@ div.messages {
  / __/ / /_/ / /_/ / / / / /___/ _, _/
 /_/    \____/\____/ /_/ /_____/_/ |_|
 */
-/* line 1056, jee.scss */
+/* line 1074, jee.scss */
 #footer {
   position: fixed;
   bottom: 0;
   right: 20px;
   z-index: 900;
 }
-/* line 1061, jee.scss */
+/* line 1079, jee.scss */
 body.chapter-displayed #footer {
   display: none;
 }
-/* line 1065, jee.scss */
+/* line 1083, jee.scss */
 #footer .block {
   display: inline-block;
   vertical-align: top;
   font-size: 0.5em;
 }
-/* line 1069, jee.scss */
+/* line 1087, jee.scss */
 #footer .block p {
   font-size: inherit;
 }
-/* line 1070, jee.scss */
+/* line 1088, jee.scss */
 #footer .block a {
   color: #000;
 }
-/* line 1073, jee.scss */
+/* line 1091, jee.scss */
 #footer .block-menu {
   display: block;
   font-size: inherit;
 }
-/* line 1076, jee.scss */
+/* line 1094, jee.scss */
 #footer .block-menu ul {
   margin: 0;
   padding: 0;
 }
-/* line 1078, jee.scss */
+/* line 1096, jee.scss */
 #footer .block-menu ul li {
   padding: 0;
   display: inline-block;
   list-style: none;
 }
 @media only screen and (max-width: 40em) {
-  /* line 1078, jee.scss */
+  /* line 1096, jee.scss */
   #footer .block-menu ul li {
     margin: 0 0.1em 0.5em 0;
   }
 }
 @media only screen and (min-width: 40.063em) {
-  /* line 1078, jee.scss */
+  /* line 1096, jee.scss */
   #footer .block-menu ul li {
     margin: 0 1em 0 0;
   }
 }
-/* line 1088, jee.scss */
+/* line 1106, jee.scss */
 #footer .block-menu ul li a {
   font-family: "epflulb";
   color: #000;
   text-transform: uppercase;
 }
 @media only screen and (max-width: 40em) {
-  /* line 1088, jee.scss */
+  /* line 1106, jee.scss */
   #footer .block-menu ul li a {
     font-size: 0.4em;
   }
 }
 @media only screen and (min-width: 40.063em) {
-  /* line 1088, jee.scss */
+  /* line 1106, jee.scss */
   #footer .block-menu ul li a {
     font-size: 0.6em;
   }
 }
-/* line 1103, jee.scss */
+/* line 1121, jee.scss */
 #footer p {
   margin: 0;
 }
-/* line 1107, jee.scss */
+/* line 1125, jee.scss */
 #footer #block-block-1 {
   display: none;
 }
@@ -5334,7 +5370,7 @@ body.chapter-displayed #footer {
  / /  / // / ___/ / /___
 /_/  /_/___//____/\____/
 */
-/* line 1116, jee.scss */
+/* line 1134, jee.scss */
 #loader {
   position: absolute;
   top: 50%;
@@ -5351,13 +5387,13 @@ body.chapter-displayed #footer {
   -webkit-transition-property: opacity;
           transition-property: opacity;
 }
-/* line 1127, jee.scss */
+/* line 1145, jee.scss */
 body.loading #loader {
   z-index: 1000;
   opacity: 1;
 }
 
-/* line 1133, jee.scss */
+/* line 1151, jee.scss */
 #fullscreen-btn {
   position: fixed;
   right: 20px;
@@ -5371,13 +5407,13 @@ body.loading #loader {
   background: transparent url("../assets/img/fullscreen-on.png") no-repeat center center;
   background: none, url("../assets/img/fullscreen-on.svg") no-repeat center center;
 }
-/* line 1142, jee.scss */
+/* line 1160, jee.scss */
 .fullscreen #fullscreen-btn {
   background: transparent url("../assets/img/fullscreen-off.png") no-repeat center center;
   background: none, url("../assets/img/fullscreen-off.svg") no-repeat center center;
 }
 
-/* line 1155, jee.scss */
+/* line 1173, jee.scss */
 .bubble-1 {
   position: absolute;
   z-index: 0;
@@ -5390,7 +5426,7 @@ body.loading #loader {
   left: -200px;
 }
 
-/* line 1159, jee.scss */
+/* line 1177, jee.scss */
 .bubble-2 {
   position: absolute;
   z-index: 0;
@@ -5403,7 +5439,7 @@ body.loading #loader {
   right: -400px;
 }
 
-/* line 1164, jee.scss */
+/* line 1182, jee.scss */
 .star {
   position: absolute;
   z-index: 0;
@@ -5416,7 +5452,7 @@ body.loading #loader {
 }
 
 /*Remove Mozilla Firefox Border – Remove Dotted Line Around Link */
-/* line 1174, jee.scss */
+/* line 1192, jee.scss */
 * {
   outline: 0 !important;
 }
@@ -5427,7 +5463,7 @@ body.loading #loader {
  / /_/ / /___/ /_/ / /_/ / /_/ /
 /_____/_____/_____/\____/\____/
 */
-/* line 1183, jee.scss */
+/* line 1201, jee.scss */
 #fps {
   position: fixed;
   bottom: 40px;
@@ -5435,7 +5471,7 @@ body.loading #loader {
   z-index: 1000;
 }
 
-/* line 1189, jee.scss */
+/* line 1207, jee.scss */
 #nav-cursor {
   position: absolute;
   width: 6px;

+ 18 - 0
sites/all/themes/gui/jee/css/jee.scss

@@ -938,6 +938,24 @@ div.messages{
         }
       }
     }
+
+    .field-name-field-partager{
+      ul,li{margin:0; padding:0; list-style: none;}
+      li{
+        display:inline-block;
+        width:35px; height:35px;
+      }
+      a{
+        overflow:hidden;
+        text-indent: -3000px;
+        display:block; width:100%; height:100%;
+        background-color: red;
+        &.twitter-button{@include bg-svg-png('btn-twit');}
+        &.fb-button{@include bg-svg-png('btn-fb');}
+        &.mail-button{@include bg-svg-png('btn-mail');}
+      }
+    }
+
   } // #chapter-wrapper
 } // #main