浏览代码

修改首页加载机制

dotos 9 年之前
父节点
当前提交
6a14143742
共有 2 个文件被更改,包括 11 次插入4 次删除
  1. 1 1
      public/css/style.css
  2. 10 3
      views/welcome.pug

+ 1 - 1
public/css/style.css

@@ -33,7 +33,7 @@ html,body{height:100%;overflow: hidden;background: -webkit-linear-gradient(300de
     margin-bottom:10px;
     text-shadow: 1px 1px 1px rgba(0,0,0,.3);
     font-weight: 100;
-    font-size: 72px;
+    font-size: 4.5rem;
 }
 .section-center .container .cover-description{    
     margin-bottom: 30px;

+ 10 - 3
views/welcome.pug

@@ -24,9 +24,16 @@ block content
 
 		var windowHalfX = window.innerWidth / 2;
 		var windowHalfY = window.innerHeight / 2;
-
-		init();
-		animate();
+		window.onload = function(){
+			init();
+			animate();
+			//- baidu Ans
+			var _hmt = _hmt || [];
+			var hm = document.createElement("script");
+			hm.src = "//hm.baidu.com/hm.js?99d1e1ee6b085485bc6ec3e23b821b49";
+			var s = document.getElementsByTagName("script")[0]; 
+			s.parentNode.insertBefore(hm, s);
+		};
 
 		function init() {