m2m 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +39 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +23 -0
- data/LICENSE +21 -0
- data/README.md +89 -0
- data/bin/console +14 -0
- data/exe/m2m +51 -0
- data/exe/mailer.rb +21 -0
- data/exe/server.rb +21 -0
- data/exe/setup.rb +27 -0
- data/exe/site.rb +37 -0
- data/lib/article.rb +63 -0
- data/lib/compiler.rb +77 -0
- data/lib/generator.rb +176 -0
- data/lib/mailer.rb +235 -0
- data/lib/meta.rb +48 -0
- data/lib/product.rb +6 -0
- data/lib/scan.rb +48 -0
- data/lib/server.rb +18 -0
- data/lib/setup.rb +278 -0
- data/lib/store.rb +113 -0
- data/lib/themes/hyde/static/hyde.css +355 -0
- data/lib/themes/hyde/template/article.mustache +19 -0
- data/lib/themes/hyde/template/home.mustache +15 -0
- data/lib/themes/hyde/template/index.mustache +15 -0
- data/lib/themes/hyde/template/mail.mustache +5 -0
- data/lib/themes/hyde/template/page.mustache +17 -0
- data/lib/themes/hyde/template/partials/footer.mustache +1 -0
- data/lib/themes/hyde/template/partials/head.mustache +6 -0
- data/lib/themes/hyde/template/partials/header.mustache +22 -0
- data/lib/themes/hyde/template/partials/list.mustache +20 -0
- data/lib/toc.rb +55 -0
- data/lib/util.rb +119 -0
- data/m2m.gemspec +40 -0
- metadata +204 -0
@@ -0,0 +1,355 @@
|
|
1
|
+
/*
|
2
|
+
__ __
|
3
|
+
/\ \ /\ \
|
4
|
+
\ \ \___ __ __ \_\ \ __
|
5
|
+
\ \ _ `\/\ \/\ \ /'_` \ /'__`\
|
6
|
+
\ \ \ \ \ \ \_\ \/\ \_\ \/\ __/
|
7
|
+
\ \_\ \_\/`____ \ \___,_\ \____\
|
8
|
+
\/_/\/_/`/___/> \/__,_ /\/____/
|
9
|
+
/\___/
|
10
|
+
\/__/
|
11
|
+
|
12
|
+
Hyde is an elegant, open source, mobile first theme for Jekyll. It includes
|
13
|
+
lightweight styles and placeholder content to get you up and running with a
|
14
|
+
simple blog in no time.
|
15
|
+
|
16
|
+
Designed, built, and released under MIT license by @mdo.
|
17
|
+
|
18
|
+
Learn more at http://andhyde.com or https://github.com/mdo/hyde.
|
19
|
+
|
20
|
+
*/
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
/* Body resets
|
25
|
+
-------------------------------------------------- */
|
26
|
+
|
27
|
+
* {
|
28
|
+
-webkit-box-sizing: border-box;
|
29
|
+
-moz-box-sizing: border-box;
|
30
|
+
box-sizing: border-box;
|
31
|
+
}
|
32
|
+
|
33
|
+
html,
|
34
|
+
body {
|
35
|
+
margin: 0;
|
36
|
+
padding: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
body {
|
40
|
+
font-family: "Open Sans", Helvetica, Arial, sans-serif;
|
41
|
+
font-size: 16px;
|
42
|
+
line-height: 1.5;
|
43
|
+
color: #454441;
|
44
|
+
background-color: #fff;
|
45
|
+
}
|
46
|
+
|
47
|
+
h1, h2, h3, h4, h5, h6 {
|
48
|
+
margin: 0 0 10px;
|
49
|
+
font-weight: 500;
|
50
|
+
line-height: 1.25;
|
51
|
+
text-rendering: optimizeLegibility;
|
52
|
+
}
|
53
|
+
h1 {
|
54
|
+
font-size: 40px;
|
55
|
+
}
|
56
|
+
h2 {
|
57
|
+
margin-top: 20px;
|
58
|
+
font-size: 32px;
|
59
|
+
}
|
60
|
+
h3 {
|
61
|
+
margin-top: 24px;
|
62
|
+
font-size: 24px;
|
63
|
+
}
|
64
|
+
h4, h5, h6 {
|
65
|
+
margin-top: 16px;
|
66
|
+
font-size: 16px;
|
67
|
+
}
|
68
|
+
|
69
|
+
p {
|
70
|
+
margin: 0 0 15px;
|
71
|
+
}
|
72
|
+
|
73
|
+
ul, ol {
|
74
|
+
padding: 0;
|
75
|
+
margin: 0 0 15px;
|
76
|
+
}
|
77
|
+
li {
|
78
|
+
color: #888580;
|
79
|
+
}
|
80
|
+
|
81
|
+
hr {
|
82
|
+
position: relative;
|
83
|
+
margin: 40px 0;
|
84
|
+
border: 0;
|
85
|
+
border-top: 1px solid #eee;
|
86
|
+
border-bottom: 1px solid #fff;
|
87
|
+
}
|
88
|
+
|
89
|
+
strong {
|
90
|
+
color: #222;
|
91
|
+
}
|
92
|
+
|
93
|
+
abbr {
|
94
|
+
background-color: #eee;
|
95
|
+
display: inline-block;
|
96
|
+
padding: 3px;
|
97
|
+
font-size: 13px;
|
98
|
+
font-weight: bold;
|
99
|
+
color: #555;
|
100
|
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
|
101
|
+
text-transform: uppercase;
|
102
|
+
border-radius: 3px;
|
103
|
+
}
|
104
|
+
|
105
|
+
code, pre {
|
106
|
+
padding: 0 3px 2px;
|
107
|
+
font-family: Menlo, Monaco, "Courier New", monospace;
|
108
|
+
font-size: 14px;
|
109
|
+
border-radius: 3px;
|
110
|
+
}
|
111
|
+
code {
|
112
|
+
padding: 2px 4px;
|
113
|
+
color: #d14;
|
114
|
+
background-color: #f7f7f9;
|
115
|
+
border: 1px solid #e1e1e8;
|
116
|
+
}
|
117
|
+
|
118
|
+
pre {
|
119
|
+
display: block;
|
120
|
+
margin: 0 0 14px;
|
121
|
+
padding: 15px 20px;
|
122
|
+
line-height: 28px;
|
123
|
+
white-space: pre;
|
124
|
+
white-space: pre-wrap;
|
125
|
+
word-break: break-all;
|
126
|
+
word-wrap: break-word;
|
127
|
+
background-color: #eee;
|
128
|
+
}
|
129
|
+
pre code {
|
130
|
+
padding: 0;
|
131
|
+
color: inherit;
|
132
|
+
background-color: transparent;
|
133
|
+
border: 0;
|
134
|
+
}
|
135
|
+
.highlight {
|
136
|
+
margin-bottom: 15px;
|
137
|
+
padding: 15px;
|
138
|
+
border-radius: 5px;
|
139
|
+
}
|
140
|
+
.highlight pre {
|
141
|
+
margin-bottom: 0;
|
142
|
+
}
|
143
|
+
|
144
|
+
/* Quotes */
|
145
|
+
blockquote {
|
146
|
+
padding: 0 0 0 20px;
|
147
|
+
margin: 15px 30px 15px 0;
|
148
|
+
border-left: 5px solid #eee;
|
149
|
+
}
|
150
|
+
blockquote p {
|
151
|
+
margin-bottom: 0;
|
152
|
+
color: #7a7a7a;
|
153
|
+
text-indent: -0.4em;
|
154
|
+
}
|
155
|
+
blockquote p:before {
|
156
|
+
content: '\201C';
|
157
|
+
}
|
158
|
+
blockquote p:after {
|
159
|
+
content: '\201D';
|
160
|
+
}
|
161
|
+
|
162
|
+
img {
|
163
|
+
display: block;
|
164
|
+
margin: 0 0 15px;
|
165
|
+
border-radius: 5px;
|
166
|
+
}
|
167
|
+
|
168
|
+
|
169
|
+
/* Links
|
170
|
+
-------------------------------------------------- */
|
171
|
+
|
172
|
+
a {
|
173
|
+
font-weight: 600;
|
174
|
+
color: #222;
|
175
|
+
text-decoration: none;
|
176
|
+
}
|
177
|
+
a:hover {
|
178
|
+
text-decoration: underline;
|
179
|
+
}
|
180
|
+
|
181
|
+
|
182
|
+
/* Scaffolding
|
183
|
+
-------------------------------------------------- */
|
184
|
+
|
185
|
+
/* Header */
|
186
|
+
.masthead {
|
187
|
+
color: #fff;
|
188
|
+
background-color: #2a2a2a;
|
189
|
+
}
|
190
|
+
.masthead-inner {
|
191
|
+
padding: 20px;
|
192
|
+
}
|
193
|
+
.masthead h1 {
|
194
|
+
margin-top: 0;
|
195
|
+
font-family: "Abril Fatface";
|
196
|
+
}
|
197
|
+
.masthead .lead {
|
198
|
+
font-size: 20px;
|
199
|
+
font-weight: 300;
|
200
|
+
margin-bottom: 0;
|
201
|
+
}
|
202
|
+
.masthead a {
|
203
|
+
color: #fff;
|
204
|
+
}
|
205
|
+
|
206
|
+
/* Footer area of masthead */
|
207
|
+
.colophon {
|
208
|
+
margin-top: 20px;
|
209
|
+
color: #7a7a7a;
|
210
|
+
}
|
211
|
+
.colophon-links {
|
212
|
+
margin: 0 0 15px;
|
213
|
+
list-style: none;
|
214
|
+
}
|
215
|
+
|
216
|
+
|
217
|
+
/* Posts
|
218
|
+
-------------------------------------------------- */
|
219
|
+
|
220
|
+
/* Wrapper for all posts on homepage */
|
221
|
+
.posts {
|
222
|
+
margin-left: 20px;
|
223
|
+
margin-right: 20px;
|
224
|
+
}
|
225
|
+
|
226
|
+
/* Single post */
|
227
|
+
.post {
|
228
|
+
margin-top: 40px;
|
229
|
+
margin-bottom: 40px;
|
230
|
+
}
|
231
|
+
.post-date {
|
232
|
+
display: block;
|
233
|
+
margin: -10px 0 10px;
|
234
|
+
color: #9a9a9a;
|
235
|
+
}
|
236
|
+
|
237
|
+
/* Pagination
|
238
|
+
-------------------------------------------------- */
|
239
|
+
|
240
|
+
.pagination {
|
241
|
+
overflow: hidden; /* clearfix */
|
242
|
+
margin-top: 40px;
|
243
|
+
font-weight: bold;
|
244
|
+
color: #ccc;
|
245
|
+
text-align: center;
|
246
|
+
border-top: 1px solid #eee;
|
247
|
+
}
|
248
|
+
.pagination a,
|
249
|
+
.pagination span {
|
250
|
+
float: left;
|
251
|
+
width: 50%;
|
252
|
+
-webkit-box-sizing: border-box;
|
253
|
+
-moz-box-sizing: border-box;
|
254
|
+
box-sizing: border-box;
|
255
|
+
padding: 20px;
|
256
|
+
}
|
257
|
+
.pagination a:first-child,
|
258
|
+
.pagination span:first-child {
|
259
|
+
border-right: 1px solid #eee;
|
260
|
+
}
|
261
|
+
.pagination a:hover {
|
262
|
+
text-decoration: none;
|
263
|
+
background-color: #f5f5f5;
|
264
|
+
}
|
265
|
+
|
266
|
+
|
267
|
+
/* Responsive
|
268
|
+
-------------------------------------------------- */
|
269
|
+
|
270
|
+
@media (min-width: 768px) {
|
271
|
+
.masthead-inner {
|
272
|
+
padding: 40px;
|
273
|
+
}
|
274
|
+
.posts {
|
275
|
+
margin-left: 40px;
|
276
|
+
margin-right: 40px;
|
277
|
+
}
|
278
|
+
}
|
279
|
+
|
280
|
+
@media (min-width: 990px) {
|
281
|
+
|
282
|
+
body {
|
283
|
+
font-size: 18px;
|
284
|
+
}
|
285
|
+
.masthead h1 {
|
286
|
+
font-size: 64px;
|
287
|
+
}
|
288
|
+
|
289
|
+
/* Center container in available real estate */
|
290
|
+
.container {
|
291
|
+
margin-left: 35%;
|
292
|
+
margin-right: 10%;
|
293
|
+
width: 55%;
|
294
|
+
}
|
295
|
+
|
296
|
+
/* Fix the masthead to the side for impact and awesomeness */
|
297
|
+
.masthead {
|
298
|
+
position: fixed;
|
299
|
+
top: 0;
|
300
|
+
left: 0;
|
301
|
+
bottom: 0;
|
302
|
+
width: 25%;
|
303
|
+
margin-bottom: 0;
|
304
|
+
}
|
305
|
+
.masthead-inner {
|
306
|
+
position: absolute;
|
307
|
+
bottom: 0;
|
308
|
+
right: 0;
|
309
|
+
left: 0;
|
310
|
+
}
|
311
|
+
.masthead .lead {
|
312
|
+
font-size: 24px;
|
313
|
+
}
|
314
|
+
.colophon {
|
315
|
+
margin-top: 40px;
|
316
|
+
}
|
317
|
+
|
318
|
+
/* Remove mobile device padding from list of posts */
|
319
|
+
.posts {
|
320
|
+
margin-left: 0;
|
321
|
+
margin-right: 0;
|
322
|
+
}
|
323
|
+
/* Increase space between posts */
|
324
|
+
.post {
|
325
|
+
margin-top: 60px;
|
326
|
+
margin-bottom: 60px;
|
327
|
+
}
|
328
|
+
|
329
|
+
/* Make pagination stand alone */
|
330
|
+
.pagination {
|
331
|
+
margin-bottom: 60px;
|
332
|
+
border: 1px solid #eee;
|
333
|
+
}
|
334
|
+
|
335
|
+
}
|
336
|
+
|
337
|
+
/*附加*/
|
338
|
+
.poweredby {
|
339
|
+
font-size: 13px;
|
340
|
+
margin: 5px 0 0 0;
|
341
|
+
color: #555;
|
342
|
+
}
|
343
|
+
|
344
|
+
.not_found{
|
345
|
+
text-align: center;
|
346
|
+
margin-top: 10%;
|
347
|
+
}
|
348
|
+
|
349
|
+
.not_found h1{
|
350
|
+
font-size: 15em;
|
351
|
+
}
|
352
|
+
|
353
|
+
.toc li li{
|
354
|
+
padding-left: 16px;
|
355
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>{{article.meta.title}} - {{site.title}}</title>
|
5
|
+
{{>head}}
|
6
|
+
</head>
|
7
|
+
<body class="home-template">
|
8
|
+
{{>header}}
|
9
|
+
<div class="content container">
|
10
|
+
<div class="post">
|
11
|
+
<h1>{{article.meta.title}}</h1>
|
12
|
+
<span class="post-date">{{article.meta.publish_date}}</span>
|
13
|
+
|
14
|
+
{{{article.toc_html}}}
|
15
|
+
{{{article.body_html}}}
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>{{article.title}} - {{site.title}}</title>
|
5
|
+
{{>head}}
|
6
|
+
</head>
|
7
|
+
<body class="home-template">
|
8
|
+
{{>header}}
|
9
|
+
<div class="content container">
|
10
|
+
<div class="post">
|
11
|
+
<h1>{{article.title}}</h1>
|
12
|
+
{{{article.content}}}
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
{{>footer}}
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
{{{blog.scripts.end_body}}}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
2
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
3
|
+
<link rel="stylesheet" href="{{root/relative_path}}static/hyde.css">
|
4
|
+
<meta name="generator" content="{{purelog.generator}}" />
|
5
|
+
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{blog.rss}}">
|
6
|
+
{{{blog.scripts.end_head}}}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<header class="masthead">
|
2
|
+
<div class="masthead-inner">
|
3
|
+
<h1>{{blog.title}}</h1>
|
4
|
+
<p class="lead">{{blog.description}}</p>
|
5
|
+
|
6
|
+
<div class="colophon">
|
7
|
+
<ul class="colophon-links">
|
8
|
+
<li>
|
9
|
+
<a href="{{root/relative_path}}">首页</a>
|
10
|
+
</li>
|
11
|
+
{{#pages}}
|
12
|
+
<li>
|
13
|
+
<a href="{{link}}">{{title}}</a>
|
14
|
+
</li>
|
15
|
+
{{/pages}}
|
16
|
+
</ul>
|
17
|
+
<p class="poweredby">Proudly powered by <a href="{{product.url}}" target="_blank">{{product.name}}</a></p>
|
18
|
+
<p class="poweredby">Designed by <a href="https://github.com/mdo/hyde" target="_blank">andhyde.com</a></p>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
</div>
|
22
|
+
</header>
|