forked from thejerf/markdir
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.go
More file actions
133 lines (113 loc) · 2.68 KB
/
index.go
File metadata and controls
133 lines (113 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package main
const MDTemplateIndex = `
<html>
<head>
<meta http-equiv="content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{TITLE}}</title>
<style>
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
margin: 0;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
color: #24292e;
background: #fafbfc;
}
.markdown-body {
max-width: 1000px;
margin: 0 auto;
padding: 24px 32px;
background: #fff;
border-radius: 6px;
box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.dir-list {
list-style: none;
margin: 0;
padding: 0;
}
.dir-list li {
margin-bottom: 10px;
}
.dir-list a {
font-size: 20px;
color: #0366d6;
text-decoration: none;
border-bottom: 1px solid transparent;
transition: color 0.2s ease, border-color 0.2s ease;
}
.dir-list a:hover {
color: #0256b9;
border-bottom-color: #0256b9;
}
.dir-list a:visited {
color: #8b5cf6;
}
.dir-list a:visited:hover {
color: #6d42e6;
border-bottom-color: #6d42e6;
}
@media (max-width: 600px) {
body {
padding: 0;
font-size: 15px;
}
.markdown-body {
padding: 12px 0;
border-radius: 0;
box-shadow: none;
}
.dir-list li {
border-bottom: 1px solid #f0f0f0;
}
.dir-list li:last-child {
border-bottom: none;
}
.dir-list li {
margin-bottom: 0;
}
.dir-list a {
display: block;
padding: 14px 16px;
font-size: 17px;
border-bottom: none;
transition: background 0.15s ease, color 0.15s ease;
}
.dir-list a:hover {
background: #f0f6ff;
color: #0256b9;
border-bottom: none;
}
.dir-list a:visited:hover {
background: #f5f0ff;
color: #6d42e6;
border-bottom: none;
}
}
@media print {
body {
background: #fff;
padding: 0;
}
.markdown-body {
box-shadow: none;
max-width: 100%;
padding: 20px 0;
border-radius: 0;
}
}
</style>
</head>
<body>
<div class="markdown-body">
`
const MDTemplateIndexTail = `
</div>
</body>
</html>`