Commit f8f4568d authored by dmscode's avatar dmscode
Browse files

完成文件读取

parent 3c5dbca1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@ Wiki in box
* 文件体系 ………… OK
* 网页模板 ………… OK
* 代码转换 ………… OK
* 文件获取
* 文件获取 ………… OK
* 样式定义
* 命名空间

## 使用说明: ##
+5 −1
Original line number Diff line number Diff line
/*为什么在写之前还有一点小激动呢?*/
*{
	font-family: Arial, 'Microsoft YaHei';
	font-style: 14px;
	font-size: 16px;
	line-height: 1.8em;
}
a {
	text-decoration: none;
@@ -43,3 +44,6 @@ body {
	-moz-box-shadow: 0 2px 2px 3px #EEE;
	box-shadow: 0 2px 2px 3px #EEE;
}
#mdcontent {
	display: none;
}
 No newline at end of file
+9 −5
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
		<title>Wiki in box</title>

		<!-- Bootstrap -->
@@ -18,16 +17,21 @@
		<script>
			$(document).ready(function(){
				hljs.initHighlightingOnLoad();
        $("#content").html(function(){
          // return marked('# Marked in browser\n\nRendered by **marked**.```js\n $(document).ready(function(){}); \n```');
          markdownString = '```html\n <a href="/"><h1>Wiki in box</h1></a>  \n```';
				marked.setOptions({
					highlight: function (code) {
						return hljs.highlightAuto(code).value;
					}
				});
				$.ajax({
					url:"data/test.md",
					async:true,
					dataType:"text",
					success:function(markdownString){
						$("#content").html(function(){
							return marked(markdownString);
						});
					}
				});
			});
		</script>
		<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
@@ -50,7 +54,7 @@
				</div>
			</div>
		</div><!-- #content End -->

		<div id="mdcontent"></div>
		
		<!-- Include all compiled plugins (below), or include individual files as needed -->
		<script src="files/js/bootstrap.min.js"></script>