免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 發帖

给sclub添加个完美的引导页

  1. 1、新模板名称为yindao,然后放入下边的代码
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">

  7. <style type="text/css">
  8. html,body{overflow:hidden;margin:0;background:#000!important;}
  9. #wrapper{position:absolute;left:0;width:320px!important;text-align:center!important;top:50%!important;left:50%!important;margin-left:-160px!important;margin-top:-160px!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;}
  10. h1{font-family:'Montserrat', 'Helvetica Neue', Arial, sans-serif!important;font-weight:700!important;font-size:30px!important;letter-spacing:9px!important;text-transform:uppercase;color:#eee!important;margin:12px 0!important;left:4px!important;}
  11. h2{color:#999!important;font-weight:normal!important;font-size:15px!important;letter-spacing:.12em!important;margin-bottom:30px!important;left:3px!important;}
  12. h1, h2{position:relative!important;}
  13. p{font-size:14px!important;line-height:2em!important;margin:0!important;letter-spacing:2px!important;}
  14. canvas{position:absolute!important;top:0!important;left:0!important;z-index:0;width:100%;height:100%;pointer-events:none;}
  15. a{color:#999!important;text-decoration:none!important;transition:color .2s ease!important;}
  16. a:hover{color:#f33!important;}
  17. </style>
  18. </head>

  19. <body>
  20. <script src="http://tlb.258club.com/templates/default/yindao_js.htm"></script>

  21. <div id="wrapper">
  22.         <h1>佳品水族社区</h1>
  23.         <h2>Design, Code &amp; Things in Between&nbsp;</h2>
  24.         <p><a href="http://jiapinshuizu.imotor.com/index.php" onclick="setcookie('yindao', 1, 86400);location.reload();">社区主页</a></p>
  25.         <p><a href="http://jiapinshuizu.imotor.com/forumdisplay.php?fid=16" onclick="setcookie('yindao', 1, 86400);location.reload();">鱼/虾/螺百科大全</a></p>
  26.         <p><a href="http://jiapinshuizu.imotor.com/forumdisplay.php?fid=13" onclick="setcookie('yindao', 1, 86400);location.reload();">养鱼知识大全</a></p>
  27.         <p><a href="http://jiapinshuizu.imotor.com/forumdisplay.php?fid=12" onclick="setcookie('yindao', 1, 86400);location.reload();">观赏鱼疾病</a></p>
  28. </div>

  29. <canvas width="1366" height="640"></canvas>

  30. <script type="text/javascript">
  31. document.addEventListener('touchmove', function (e) {
  32.         e.preventDefault()
  33. })
  34. var c = document.getElementsByTagName('canvas')[0],
  35.         x = c.getContext('2d'),
  36.         pr = window.devicePixelRatio || 1,
  37.         w = window.innerWidth,
  38.         h = window.innerHeight,
  39.         f = 90,
  40.         q,
  41.         m = Math,
  42.         r = 0,
  43.         u = m.PI*2,
  44.         v = m.cos,
  45.         z = m.random
  46. c.width = w*pr
  47. c.height = h*pr
  48. x.scale(pr, pr)
  49. x.globalAlpha = 0.6
  50. function i(){
  51.         x.clearRect(0,0,w,h)
  52.         q=[{x:0,y:h*.7+f},{x:0,y:h*.7-f}]
  53.         while(q[1].x<w+f) d(q[0], q[1])
  54. }
  55. function d(i,j){   
  56.         x.beginPath()
  57.         x.moveTo(i.x, i.y)
  58.         x.lineTo(j.x, j.y)
  59.         var k = j.x + (z()*2-0.25)*f,
  60.                 n = y(j.y)
  61.         x.lineTo(k, n)
  62.         x.closePath()
  63.         r-=u/-50
  64.         x.fillStyle = '#'+(v(r)*127+128<<16 | v(r+u/3)*127+128<<8 | v(r+u/3*2)*127+128).toString(16)
  65.         x.fill()
  66.         q[0] = q[1]
  67.         q[1] = {x:k,y:n}
  68. }
  69. function y(p){
  70.         var t = p + (z()*2-1.1)*f
  71.         return (t>h||t<0) ? y(p) : t
  72. }
  73. document.onclick = i
  74. document.ontouchstart = i
  75. i()
  76. </script>

  77. <script type="text/javascript">
  78. var snow = function() {
  79. if(1==1) {
  80. $("body").append('<canvas id="christmasCanvas" style="top: 0px; left: 0px; z-index: 5000; position: fixed; pointer-events: none;"></canvas>');
  81. var b = document.getElementById("christmasCanvas"), a = b.getContext("2d"), d = window.innerWidth, c = window.innerHeight;
  82. b.width = d;
  83. b.height = c;
  84. for(var e = [], b = 0;b < 70;b++) {
  85. e.push({x:Math.random() * d, y:Math.random() * c, r:Math.random() * 4 + 1, d:Math.random() * 70})
  86. }
  87. var h = 0;
  88. window.intervral4Christmas = setInterval(function() {
  89. a.clearRect(0, 0, d, c);
  90. a.fillStyle = "rgba(255, 255, 255, 0.6)";
  91. a.shadowBlur = 5;
  92. a.shadowColor = "rgba(255, 255, 255, 0.9)";
  93. a.beginPath();
  94. for(var b = 0;b < 70;b++) {
  95. var f = e[b];
  96. a.moveTo(f.x, f.y);
  97. a.arc(f.x, f.y, f.r, 0, Math.PI * 2, !0)
  98. }
  99. a.fill();
  100. h += 0.01;
  101. for(b = 0;b < 70;b++) {
  102. if(f = e[b], f.y += Math.cos(h + f.d) + 1 + f.r / 2, f.x += Math.sin(h) * 2, f.x > d + 5 || f.x < -5 || f.y > c) {
  103. e[b] = b % 3 > 0 ? {x:Math.random() * d, y:-10, r:f.r, d:f.d} : Math.sin(h) > 0 ? {x:-5, y:Math.random() * c, r:f.r, d:f.d} : {x:d + 5, y:Math.random() * c, r:f.r, d:f.d}
  104. }
  105. }
  106. }, 70)
  107. }
  108. }
  109. snow();
  110. </script>
  111. </body>
  112. </html>
  113. 复制代码
  114. 2、然后编辑discuz模版,在{subtemplate header}上边加
  115. {eval $yindao = $_COOKIE["yindao"];}
  116. <!--{if $yindao == ""}-->
  117. {subtemplate yindao}
  118. <!--{/if}-->
  119. 复制代码
複製代碼

返回列表