1 | <!DOCTYPE html>
|
2 | <html>
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>Mock.js</title>
|
6 | <meta name="keywords" content="模拟数据生成器,模拟数据,模拟请求,Simulation Data Generator" />
|
7 | <link rel="icon" href="/favicon.ico">
|
8 | <link href="./demo/assets/bootstrap/css/bootstrap.css" rel="stylesheet">
|
9 | <style type="text/css">
|
10 | body {
|
11 | font: 14px/1.7 'helvetica neue', 'hiragino sans gb', stheiti,'wenquanyi micro hei',\5FAE\8F6F\96C5\9ED1,\5B8B\4F53, sans-serif;
|
12 | }
|
13 |
|
14 | .page-catalog > ul {
|
15 | padding-left: 0px;
|
16 | }
|
17 | .page-catalog ul {
|
18 | padding-left: 20px;
|
19 |
|
20 | }
|
21 |
|
22 | .gist .gist-file .gist-data .line-numbers {
|
23 | line-height: 20px;
|
24 | }
|
25 | .gist .gist-file .gist-data .line-data {
|
26 | line-height: 20px;
|
27 | }
|
28 |
|
29 |
|
30 | div#sidebar {
|
31 | background: #fff;
|
32 | position: fixed;
|
33 | z-index: 10;
|
34 | top: 0; left: 0; bottom: 0;
|
35 | width: 220px;
|
36 | overflow-y: auto;
|
37 | overflow-x: hidden;
|
38 | -webkit-overflow-scrolling: touch;
|
39 | padding: 15px 0 30px 30px;
|
40 | border-right: 1px solid #bbb;
|
41 | box-shadow: 0 0 20px #ccc; -webkit-box-shadow: 0 0 20px #ccc; -moz-box-shadow: 0 0 20px #ccc;
|
42 | }
|
43 | div.container {
|
44 | position: relative;
|
45 | width: 700px;
|
46 | margin: 40px 0 50px 280px;
|
47 | padding-right: 40px;
|
48 | }
|
49 |
|
50 | .w250 {
|
51 | width: 250px;
|
52 | }
|
53 |
|
54 | h1, h2, h3 {
|
55 | margin-top: 20px;
|
56 | margin-bottom: 10px;
|
57 | }
|
58 |
|
59 | h4, h5, h6 {
|
60 | margin-top: 20px;
|
61 | margin-bottom: 10px;
|
62 | }
|
63 |
|
64 | </style>
|
65 | <style type="text/css">
|
66 | @font-face {
|
67 | font-family: 'logo';
|
68 | src: url('http://at.alicdn.com/t/font_1390195988_9420388.eot'); /* IE9*/
|
69 | src: url('http://at.alicdn.com/t/font_1390195988_9420388.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
70 | url('http://at.alicdn.com/t/font_1390195989_0386753.woff') format('woff'), /* chrome、firefox */
|
71 | url('http://at.alicdn.com/t/font_1390195988_7969282.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
|
72 | url('http://at.alicdn.com/t/font_1390195989_0668917.svg#svgFontName') format('svg'); /* iOS 4.1- */
|
73 | }
|
74 |
|
75 | .iconlogo {
|
76 | font-family: "logo";
|
77 | font-size: 60px;
|
78 | font-style: normal;
|
79 | font-weight: normal;
|
80 | font-variant: normal;
|
81 | display: inline-block;
|
82 | speak: none;
|
83 | -webkit-font-smoothing: antialiased;
|
84 | -moz-osx-font-smoothing: grayscale;
|
85 | color: #08C;
|
86 | }
|
87 | </style>
|
88 | </head>
|
89 | <body>
|
90 | <div id="sidebar" class="interface"></div>
|
91 |
|
92 | <script src="./bower_components/jquery/jquery.js"></script>
|
93 | <script src="./dist/mock.js"></script>
|
94 |
|
95 |
|
96 | <div class="container"><%=content%></div>
|
97 |
|
98 | <script src="./demo/assets/catalog.js"></script>
|
99 |
|
100 | <script type="text/javascript">
|
101 | $(function(){
|
102 | return
|
103 | function resize(){
|
104 | var h = $(window).height() - $('.catalog').offset().top - 20
|
105 | $('.catalog, .content').height(h)
|
106 | return resize
|
107 | }
|
108 | $(window).on('resize', resize());
|
109 | })
|
110 | </script>
|
111 | <script type="text/javascript">
|
112 | $(function(){
|
113 | $('table').addClass('table table-bordered')
|
114 | })
|
115 | </script>
|
116 |
|
117 | <link href="./node_modules/codemirror/lib/codemirror.css" rel="stylesheet">
|
118 | <link href="./node_modules/codemirror/theme/neat.css" rel="stylesheet">
|
119 | <script src="./node_modules/codemirror/lib/codemirror.js"></script>
|
120 | <script src="./node_modules/codemirror/addon/runmode/runmode.js"></script>
|
121 | <script src="./node_modules/codemirror/mode/javascript/javascript.js"></script>
|
122 | <script type="text/javascript">
|
123 | $('pre').each(function(index, el){
|
124 | $(this).hide()
|
125 | var ctn = $('<pre class="cm-s-neat">').insertAfter(this)
|
126 | CodeMirror.runMode($(this).find('code').text(), 'javascript',
|
127 | ctn.get(0));
|
128 | })
|
129 | </script>
|
130 |
|
131 | <script>
|
132 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
133 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
134 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
135 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
136 |
|
137 | ga('create', 'UA-27059428-2', 'mockjs.com');
|
138 | ga('send', 'pageview');
|
139 | </script>
|
140 | </body>
|
141 | </html>
|