dimitrilongo

footer

Feb 22nd, 2014
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.96 KB | None | 0 0
  1. <script type="text/javascript">
  2.  
  3. this.randomtip = function(){
  4.         var length = jQuery("#tips li").length;
  5.         var ran = Math.floor(Math.random()*length) + 1;
  6.         jQuery("#tips li:nth-child(" + ran + ")").show();
  7.         };
  8.  
  9. jQuery(document).ready(function() {
  10.     if (!readCookie('hide')) {    
  11.         randomtip();
  12.     }  
  13.    
  14. jQuery(document).on('click','.close_box',function(){
  15.         jQuery(this).parent().fadeTo(300,0,function(){
  16.           jQuery(this).remove();
  17.           createCookie('hide', true, 1)
  18.           return false;
  19.         });
  20.     });
  21. });
  22. function createCookie(name,value,days) {
  23.   if (days) {
  24.     var date = new Date();
  25.     date.setTime(date.getTime()+(days*24*60*60*1000));
  26.     var expires = "; expires="+date.toGMTString();
  27.   }
  28.   else var expires = "";
  29.   document.cookie = name+"="+value+expires+"; path=/";
  30. }
  31.  
  32. function readCookie(name) {
  33.   var nameEQ = name + "=";
  34.   var ca = document.cookie.split(';');
  35.   for(var i=0;i < ca.length;i++) {
  36.     var c = ca[i];
  37.     while (c.charAt(0)==' ') c = c.substring(1,c.length);
  38.     if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  39.   }
  40.   return null;
  41. }
  42.  
  43. function eraseCookie(name) {
  44.   createCookie(name,"",-1);
  45. }
  46. </script>  
  47.  
  48.     <div class="fixedBar">
  49. <div class="boxfloat">
  50. <div class="close_box">X</div>
  51. <ul id="tips">
  52.  
  53. <li>    <a href="http://www.emarketingparis.com/?code=partenariatweb">FRANCECOPYWRITER SERA PRESENT AU SALON STAND STARTUP 4A<img alt="salon e-marketing 2014" src="http://www.emarketing-expo.fr/upload/e-mktg-468x60.gif"></a>
  54. </li>
  55.  
  56. <li>    <a href="http://www.emarketingparis.com/?code=partenariatweb">FRANCECOPYWRITER SERA PRESENT AU SALON STAND STARTUP 4A<img alt="salon e-marketing 2014" src="http://www.emarketing-expo.fr/upload/e-mktg-468x60.gif"></a>
  57. </li>
  58.  
  59. </ul>
  60.  
  61. </div>
  62. </div>
  63. <?php if ( is_home() || is_page('offres') ) : ?>
  64.  
  65.     <div id="pre-footer">
  66.         <div class="container">
  67.             <p class="tagline"><?php bloginfo( 'description' ); ?></p>
  68.  
  69.            
  70.             <!-- Ajout dimitri CTA + tagline en dehors de #pre-footer pour éviter l'opacité -->
  71. <!--            <?php et_vertex_action_button(); ?>-->
  72.         </div> <!-- .container -->
  73.     </div> <!-- #pre-footer -->
  74.     <h1 class="centrer title pos_prefooter">Envie de profiter de contenu gratuit !
  75.                 <?php et_vertex_action_button(); ?></h1>
  76. <?php endif; ?>
  77. <?php // va récupérer la variable de function.php pour la class = display ou pas
  78. $footer_desc = footer_not_front_page();
  79. ?>
  80. <!--  Ajout Dimitri  Back to the Top button -->
  81. <a href="#" class="back-to-top">Haut de page</a>
  82. <footer id="main-footer" class="<?php echo $footer_desc ?>">
  83.         <div class="container">
  84.             <?php get_sidebar( 'footer' ); ?>
  85.             <p id="footer-info"><?php printf( __( 'Designed by %1$s | Powered by %2$s', 'Vertex' ), '<a href="http://www.elegantthemes.com" title="Premium WordPress Themes">Elegant Themes</a>', '<a href="http://www.wordpress.org">WordPress</a>' ); ?></p>
  86.         <!--</div>-->
  87.        
  88.     </footer> <!-- #main-footer -->
  89.  
  90.     <?php wp_footer(); ?>
  91.    
  92. </body>
  93. </html>
Advertisement
Add Comment
Please, Sign In to add comment