浏览代码

优化样式

star7th 9 年之前
父节点
当前提交
edadb8c71e

+ 1 - 0
Application/Home/View/Common/footer.html

@@ -1,5 +1,6 @@
    
 	<script src="__PUBLIC__/js/common/jquery.min.js"></script>
     <script src="__PUBLIC__/bootstrap/js/bootstrap.min.js"></script>
+    <script src="__PUBLIC__/js/common/showdoc.js"></script>
   </body>
 </html> 

+ 0 - 25
Application/Home/View/Page/edit.html

@@ -2,32 +2,7 @@
 <link rel="stylesheet" href="__PUBLIC__/css/page/edit.css" />
 <link rel="stylesheet" href="__PUBLIC__/editor.md/css/editormd.css" />
 <style type="text/css">
-.btn-primary {
-    background-color: #006dcc;
-}
 
-.btn-primary:hover {
-    background-color: #04c;
-}
-
-#page_title,
-#cat_id,
-#order {
-    height: 30px;
-}
-
-#cat_id {
-    width: 150px;
-}
-
-#order {
-    width: 120px;
-    margin-right: 20px;
-}
-.markdown-body table thead tr{
-  background-color:#08c;
-  color:#fff;
-}
 </style>
 <div id="layout">
     <!-- 顶部条 -->

+ 2 - 18
Application/Home/View/Page/index.html

@@ -6,6 +6,7 @@
 body{
 	overflow-x:hidden;overflow-y:hidden
 }
+
 </style>
 <!-- 这里开始是内容 -->
 <div class="" style="padding-top:10px;">
@@ -18,21 +19,4 @@ body{
 
 
  <include file="Common/footer" />
-<script>
-
-$(function(){
-    hljs.initHighlightingOnLoad();
-
-    //为所有table标签添加bootstap支持的表格类
-    $("table").addClass("table table-bordered table-hover");
-
-    //超链接都在新窗口打开
-	$('a[href^="http"]').each(function() {
-				$(this).attr('target', '_blank');
-	});
-
-})
-
-
-
-</script>
+<script src="__PUBLIC__/js/page/index.js"></script>

文件差异内容过多而无法显示
+ 0 - 0
Public/bootstrap/js/bootstrap.min.js


+ 24 - 1
Public/css/page/edit.css

@@ -95,4 +95,27 @@ body {
 
 #json-templ{ position:fixed; float:left; top:100px; left:300px; border:2px solid #ccc; display:none; z-index:999999;}
 
-.markdown-body.editormd-preview-container table tr td{ max-width:300px;}
+.markdown-body.editormd-preview-container table tr td{ max-width:300px;}
+
+.btn-primary {
+    background-color: #006dcc;
+}
+
+.btn-primary:hover {
+    background-color: #04c;
+}
+
+#page_title,
+#cat_id,
+#order {
+    height: 30px;
+}
+
+#cat_id {
+    width: 150px;
+}
+
+#order {
+    width: 120px;
+    margin-right: 20px;
+}

+ 7 - 0
Public/js/common/showdoc.js

@@ -0,0 +1,7 @@
+
+/*判断是否是移动设备*/
+function isMobile(){
+return navigator.userAgent.match(/iPhone|iPad|iPod|Android|android|BlackBerry|IEMobile/i) ? true : false; 
+}
+
+

+ 0 - 3
Public/js/item/show.js

@@ -31,9 +31,6 @@ $(function(){
     })
   }
 
-  function isMobile(){
-    return navigator.userAgent.match(/iPhone|iPad|iPod|Android|android|BlackBerry|IEMobile/i) ? true : false; 
-  }
 
   //根据屏幕宽度进行响应(应对移动设备的访问)
   if( isMobile()){

+ 3 - 2
Public/js/page/edit.js

@@ -174,9 +174,10 @@ $(function() {
 
 	$(".editormd-preview-container").bind('DOMNodeInserted', function(e){
 		
-		$(".editormd-preview-container table tr").eq(0).css({"background-color":"#08c","color":"#fff"});
+		$(".editormd-preview-container table thead tr").css({"background-color":"#08c","color":"#fff"});
+    $(".editormd-preview-container table tr").eq(0).css({"background-color":"#08c","color":"#fff"});
 		$(".editormd-preview-container table tr").each(function(){
-			if($(this).find("td").eq(1).html()=="object[]")
+			if($(this).find("td").eq(1).html()=="object")
 			{
 				$(this).css({"background-color":"#99CC99","color":"#000"});
 			}

+ 25 - 0
Public/js/page/index.js

@@ -0,0 +1,25 @@
+
+$(function(){
+    hljs.initHighlightingOnLoad();
+
+    //为所有table标签添加bootstap支持的表格类
+    $("table").addClass("table table-bordered table-hover");
+
+      //超链接都在新窗口打开
+    $('a[href^="http"]').each(function() {
+          $(this).attr('target', '_blank');
+    });
+    if (!isMobile()) {
+      $("th").css("min-width","77px");
+    };
+
+    $("table thead tr").css({"background-color":"#08c","color":"#fff"});
+    $("table tr").each(function(){
+    if($(this).find("td").eq(1).html()=="object")
+    {
+      $(this).css({"background-color":"#99CC99","color":"#000"});
+    }
+
+    });
+
+})

部分文件因为文件数量过多而无法显示