Advertisement
anatolionobre

SPLASH

May 16th, 2014
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--
  2. imagem 1 320x480
  3. imagem 2 768x1024
  4. imagem 3 1024x768
  5. imagem 4 480x320
  6.  
  7. -->
  8.  
  9. <img src="%%VIEW_URL_UNESC%%" width="1" height="1" style="display:none"/>
  10.  
  11. <script type="text/javascript">
  12.  
  13. var dfp_interstitial_close_helper = function (el) {
  14.                 var element = document.getElementById(el);
  15.                 if (element != null) {
  16.                         element.style.display = 'none';
  17.         };
  18. };
  19.  
  20.  
  21. var dfp_interstitial_close_counter = (function () {
  22.         var count=10;
  23.         var counter=setInterval(timer, 1000);
  24.         function timer(){
  25.           count=count-1;
  26.           if (count <= 0)
  27.           {
  28.                  clearInterval(counter);
  29.                 dfp_interstitial_close_helper("interstitial")
  30.                  
  31.                  return;
  32.           }
  33.  
  34.               //  var el = document.getElementById("timer");
  35.               //  if (el != null) {
  36.                               //  el.innerHTML= 'Este anรบncio fecha em '+count+' segundos';
  37.               //  };
  38.                
  39.  
  40.         }
  41.  
  42. })();
  43.  
  44.  
  45. </script>
  46.  
  47. <style type="text/css">
  48.  
  49. /* http://stackoverflow.com/questions/6370690/media-queries-how-to-target-desktop-tablet-and-mobile
  50. @media (min-width:320px) { smartphones, iPhone, portrait 480x320 phones  }
  51. @media (min-width:481px) {  portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide.  }
  52. @media (min-width:641px) {  portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones  }
  53. @media (min-width:961px) { tablet, landscape iPad, lo-res laptops ands desktops  }
  54. @media (min-width:1025px) {  big landscape tablets, laptops, and desktops  }
  55. @media (min-width:1281px) { hi-res laptops and desktops }
  56.  
  57. */
  58.  
  59.  
  60.  
  61. #timer {
  62.  position:fixed;
  63.  width:100%;
  64.  background-color: #000;
  65.  color: #fff;
  66.  font-family: verdana, arial, sans-serf;
  67.  font-size: 95%;
  68.  text-align:center;
  69.  padding: 5px 0px;
  70.  z-index: 10001;
  71.  
  72. }
  73. .dfp_interstitial_close {
  74.         position:fixed;
  75.         top: 40px;
  76.         right:10px;
  77.             z-index: 9999999999999999;
  78.         cursor: pointer;
  79. }
  80.        
  81.        
  82.  
  83.        
  84.        
  85. #ad-portrait {
  86.         display:block;
  87.         background-size: 100% auto;
  88.         }
  89.        
  90.  
  91. #ad-portrait_container{
  92.         cursor:pointer;
  93.         width: 100%;
  94.         height: 100%;
  95.         z-index:99999999999;
  96.         position:fixed;
  97.         top: 0px;
  98.         left:0px
  99.        
  100.         }      
  101.        
  102. #ad-landscape {
  103.         display:block;
  104.         background-size: 100% auto;
  105.         }
  106.        
  107. #ad-landscape_container {
  108.         cursor:pointer;
  109.         width: 100%;
  110.         height: 100%;
  111.         z-index:99999999999;
  112.         position:fixed;
  113.         top: 0px;
  114.         left:0px
  115.        
  116.         }      
  117.        
  118.        
  119.        
  120. /* TABLETS -> Interstitial: 768x1024 (portrait), 1024x768 (landscape)*/
  121.  
  122.  
  123.  
  124. @media screen and (min-width:641px) and (orientation:portrait) {
  125.         #ad-portrait_container{
  126.                 background: black url(%%FILE:JPG2%%) no-repeat center center;
  127.         }
  128.         #ad-landscape {
  129.                 display:none;
  130.                 background-size: 100% auto;
  131.                 }
  132.  
  133.  
  134. }
  135.  
  136.  
  137. @media screen and (min-height: 767px) and  (orientation:landscape) {
  138.         #ad-portrait {
  139.                 display:none;
  140.                 }
  141.                
  142.         #ad-landscape_container {
  143.                 background: black url(%%FILE:JPG3%%) no-repeat center center;
  144.  
  145.                 }
  146. }
  147.  
  148.  
  149.  
  150.  
  151.        
  152. /* SMARTPHONES -> Interstitial: 320x480 (portrait), 480x320 (landscape)*/
  153.  
  154.  
  155. @media screen and (max-width: 640px) and (orientation:portrait) {
  156.         #ad-portrait_container{
  157.                 background: black url(%%FILE:JPG1%%) no-repeat center center;
  158.         }
  159.         #ad-landscape {
  160.                 display:none;
  161.                 background-size: 100% auto;
  162.                 }
  163.        
  164. }
  165.  
  166. @media screen and (max-height: 736px) and (orientation:landscape) {
  167.         #ad-portrait {
  168.                 display:none;
  169.                 }
  170.                
  171.         #ad-landscape_container {
  172.                 background: black url(%%FILE:JPG4%%) no-repeat center center;
  173.                 }
  174. }
  175.  
  176.  
  177.  
  178. </style>
  179.  
  180. <div id="interstitial">
  181.     <div id="ad-portrait">
  182.         <div id="ad-portrait_container" onclick="window.open('%%CLICK_URL_ESC%%%%DEST_URL%%')"></div>
  183.         <div class="dfp_interstitial_close" onclick="document.getElementById('ad-portrait').style.display = 'none';">
  184.             <img src="http://newsl.iol.pt/pub/mobile/intro/cr.png" width="30" height="30">
  185.         </div>
  186.     </div>
  187.     <div id="ad-landscape">
  188.         <div id="ad-landscape_container" onclick="window.open('%%CLICK_URL_ESC%%%%DEST_URL%%')"></div>
  189.         <div class="dfp_interstitial_close" onclick="document.getElementById('ad-landscape').style.display = 'none'; ">
  190.             <img src="http://newsl.iol.pt/pub/mobile/intro/cr.png" width="30" height="30">
  191.         </div>
  192.     </div>
  193. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement