madowu 0.0.2 → 0.0.3

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.
@@ -0,0 +1,624 @@
1
+ /*
2
+ Title: Madowu css
3
+ Author: Ippei Kishida
4
+ Original Author: TAKEUCHI Hitoshi
5
+ License: GPL
6
+
7
+ Comment: Hikiのデフォルトテーマをベースに作成しました。
8
+ オリジナルテーマ作者のTAKEUCHI Hikiさんに感謝します。
9
+
10
+ Copyright 2002 (C) by TADA Tadashi <sho@spc.gr.jp>
11
+ Copyright 2002 (C) by NT <nt@24i.net>
12
+ Copyright 2004 (C) by TAKEUCHI Hitoshi <hitoshi@namaraii.com>
13
+ */
14
+
15
+ body {
16
+ background-color: #fff;
17
+ color: #000;
18
+ font-family: Arial,Verdana,Helvetica,'MS UI Gothic',sans-serif;
19
+ margin: 0;
20
+ padding: 0.5em;
21
+ padding-right: 1em;
22
+ }
23
+
24
+ a{
25
+ text-decoration: none;
26
+ }
27
+
28
+ a:link {
29
+ color: #22a;
30
+ }
31
+
32
+ a:visited {
33
+ color: #561464;
34
+ }
35
+
36
+ a:hover {
37
+ text-decoration: underline;
38
+ }
39
+
40
+ div.adminmenu {
41
+ text-align: right;
42
+ margin-top: 0px;
43
+ padding: 0.2em 0.5em 0.5em 0.5em;
44
+ padding-right: 0;
45
+ font-size: 75%;
46
+ line-height: 2.5em;
47
+ }
48
+
49
+ span.adminmenu {
50
+ background-color: #f0f0ff;
51
+ color: #ffffff;
52
+ border-color: #aaa;
53
+ border-style: solid;
54
+ border-width: 0px 1px 1px 0px;
55
+ padding: 2px;
56
+ white-space: nowrap;
57
+ }
58
+
59
+ /*
60
+ h1 {
61
+ height: 64px;
62
+ line-height: 64px;
63
+ text-align: left;
64
+ padding-bottom: 5px;
65
+ padding: 0.0em 0.4em 0.0em 0.4em;
66
+ }
67
+
68
+ h2 {
69
+ font-size: 160%;
70
+ }
71
+ */
72
+
73
+ div.body {
74
+ margin-left: 1.8em;
75
+ line-height: 120%;
76
+ font-size: 100%;
77
+ }
78
+
79
+ div.body h1 {
80
+ font-size: 160%;
81
+ }
82
+
83
+ div.body h2 {
84
+ font-size: 150%;
85
+ margin-top: 1.5em;
86
+ margin-bottom: 0.5em;
87
+ padding: 0.4em 0.4em 0.4em 0.4em;
88
+ border-top: solid 32px #48c;
89
+ border-left: solid 32px #48c;
90
+ border-right: solid 32px #48c;
91
+ }
92
+
93
+ div.body h3 {
94
+ font-size: 140%;
95
+ margin-top: 1.5em;
96
+ margin-bottom: 0.5em;
97
+ padding: 0.4em 0.4em 0.4em 0.4em;
98
+ border-top: solid 8px #48c;
99
+ border-left: solid 8px #48c;
100
+ border-right: solid 8px #48c;
101
+ }
102
+
103
+ div.body h4 {
104
+ font-size: 130%;
105
+ padding: 0.4em 0.4em 0.4em 0.4em;
106
+ border-top: solid 2px #48c;
107
+ border-left: solid 2px #48c;
108
+ border-right: solid 2px #48c;
109
+ }
110
+ div.body h5 {
111
+ font-size: 120%;
112
+ padding: 0.4em 0.4em 0.4em 0.4em;
113
+ border-top: solid 1px #48c;
114
+ border-left: solid 1px #48c;
115
+ border-right: solid 1px #48c;
116
+ }
117
+ div.body h6 {
118
+ font-size: 110%;
119
+ padding: 0.4em 0.4em 0.4em 0.4em;
120
+ border-top: solid 1px #48c;
121
+ }
122
+
123
+ div.body p {
124
+ margin-top: 0px;
125
+ margin-bottom: 0.5em;
126
+ color: #000;
127
+ background-color: transparent;
128
+ line-height: 150%;
129
+ }
130
+
131
+ div.body pre {
132
+ color: #000;
133
+ background-color: #f0f0ff;
134
+ border-style: solid;
135
+ border-width: 1px 1px 1px 6px;
136
+ border-color: #cccccc;
137
+ padding: 8px;
138
+ margin-left: 2em;
139
+ }
140
+
141
+ blockquote {
142
+ color: #000;
143
+ background-color: #f0f0ff;
144
+ border-style: solid;
145
+ border-color: #cccccc;
146
+ border-width: 2px 0px 2px 0px;
147
+ padding: 4px;
148
+ margin-left: 3em;
149
+ margin-right: 3em;
150
+ }
151
+
152
+ div.body blockquote p {
153
+ margin-left: 0em;
154
+ }
155
+
156
+ div.body li {
157
+ margin-left: 0.5em;
158
+ }
159
+
160
+ div.body dl {
161
+ margin-left: 0.5em;
162
+ }
163
+
164
+ div.body dt {
165
+ border-style: solid;
166
+ border-color: #eef;
167
+ border-width: 0px 0px 1px 0px;
168
+ margin-top: 0.7em;
169
+ }
170
+
171
+ div.body dd {
172
+ margin-top: 0.3em;
173
+ margin-bottom: 0.5em;
174
+ margin-left: 2em;
175
+ }
176
+
177
+ div.comment {
178
+ border-style: solid;
179
+ border-color: #ccc;
180
+ border-width: 1px;
181
+ color: #000;
182
+ background-color: #eef;
183
+ margin-top: 1em;
184
+ margin-bottom: 0.5em;
185
+ margin-left: 1em;
186
+ padding: 4px;
187
+ font-size: 90%;
188
+ }
189
+
190
+ div.form div.comment {
191
+ margin-right: 1em;
192
+ color: #000;
193
+ background-color: #fff;
194
+ }
195
+
196
+ div.comment p {
197
+ margin-top: 0px;
198
+ margin-bottom: 0.5em;
199
+ }
200
+
201
+ div.comment p.commenttitle {
202
+ border-style: dashed;
203
+ border-color: #ccc;
204
+ border-width: 0px 0px 1px 0px;
205
+ }
206
+
207
+
208
+ div.form {
209
+ border-style: solid;
210
+ border-color: #c0c0c0;
211
+ border-width: 1px;
212
+ color: #000;
213
+ background-color: #f0f0ff;
214
+ }
215
+
216
+ div.form form {
217
+ margin: 0;
218
+ padding: 4px 4px 4px 4px;
219
+ width: 100%;
220
+ }
221
+
222
+ div.form p {
223
+ margin-top: 0px;
224
+ margin-bottom: 0.5em;
225
+ padding-left: 4px;
226
+ }
227
+
228
+ div.form textarea {
229
+ margin-left: 2em;
230
+ }
231
+
232
+ hr {
233
+ margin-top: 0.5em;
234
+ border-style: solid;
235
+ border-width: 2px 0px 0px 0px;
236
+ border-color: #ccc;
237
+ }
238
+
239
+ hr.sep {
240
+ display: none;
241
+ }
242
+
243
+ div.footer {
244
+ text-align: right;
245
+ font-size: 80%;
246
+ color: #444;
247
+ }
248
+
249
+ form div.body {
250
+ border-style: solid;
251
+ border-color: #c0c0c0;
252
+ border-width: 1px;
253
+ color: #000;
254
+ background-color: #f0f0ff;
255
+ padding: 0px 4px 4px 4px;
256
+ }
257
+
258
+ table {
259
+ border-color: #ccc;
260
+ border-width: 1px;
261
+ padding: 0px;
262
+ border-collapse: collapse;
263
+ }
264
+ th, tr, td {
265
+ border-style: solid;
266
+ border-color: #ccc;
267
+ border-width: 1px;
268
+ padding-top: 4px;
269
+ padding-left: 4px;
270
+ }
271
+
272
+ /*
273
+ for plugins
274
+ */
275
+
276
+ /* calendar */
277
+ div.calendar {
278
+ font-size: x-small;
279
+ }
280
+
281
+ /* calendar2 */
282
+ table.calendar {
283
+ font-size: x-small;
284
+ line-height: 100%;
285
+ border-width: 0px;
286
+ }
287
+
288
+ table.calendar td {
289
+ margin: 0px;
290
+ text-align: right;
291
+ padding: 0px;
292
+ margin: 0px;
293
+ }
294
+
295
+ table.calendar td.calendar-prev-month, table.calendar td.calendar-current-month, table.calendar td.calendar-next-month {
296
+ text-align: center;
297
+ }
298
+
299
+ /* recent_list */
300
+ p.recentitem {
301
+ font-size: small;
302
+ margin-top: 0px;
303
+ margin-bottom: 0px;
304
+ }
305
+
306
+ div.recentsubtitles {
307
+ font-size: x-small;
308
+ margin-top: 0px;
309
+ margin-bottom: 1em;
310
+ margin-left: 1em;
311
+ }
312
+
313
+ /* footnote */
314
+ div.body span.footnote {
315
+ vertical-align: super;
316
+ font-size: 80%;
317
+ }
318
+
319
+ div.footnote {
320
+ border-style: solid;
321
+ border-color: #c0c0c0;
322
+ border-width: 1px 0px 0px 0px;
323
+ margin-left: 3em;
324
+ font-size: small;
325
+ }
326
+
327
+ /* amazon plugin */
328
+ img.left {
329
+ border-width: 1px;
330
+ border-color: #000080;
331
+ float: left;
332
+ }
333
+
334
+ img.right {
335
+ border-width: 1px;
336
+ border-color: #000080;
337
+ float: right;
338
+ }
339
+
340
+ /* similarity Plugin */
341
+ .bulkfeedsSimilarity {
342
+ width: 500px;
343
+ }
344
+
345
+ .bulkfeedsSimilarityHeader {
346
+ font-weight: bold;
347
+ background: #ccc;
348
+ padding: 0.2em;
349
+ margin-bottom: 0.2em;
350
+ }
351
+
352
+ .bulkfeedsSimilarityHeader a {
353
+ font-weight: bold;
354
+ color: #000;
355
+ }
356
+
357
+ .bulkfeedsSimilarityHeader a:visited {
358
+ color: #000;
359
+ }
360
+
361
+ .bulkfeedsSimilarityItems {
362
+ margin: 0;
363
+ padding-left: 1em;
364
+ list-style: none;
365
+ }
366
+
367
+ .bulkfeedsSimilarityFooter {
368
+ text-align: center;
369
+ margin-top: 0.5em;
370
+ }
371
+
372
+ .bulkfeedsSimilarityFooter a {
373
+ color: #000;
374
+ }
375
+
376
+ .bulkfeedsSimilarityFooter a:visited {
377
+ color: #000;
378
+ }
379
+
380
+ .comments-head {
381
+ padding: 0.4em;
382
+ background: #ccc;
383
+ }
384
+
385
+ .comments-head a {
386
+ font-weight: bold;
387
+ color: #000;
388
+ }
389
+
390
+ .comments-head a:visited {
391
+ font-weight: bold;
392
+ color: #000;
393
+ }
394
+
395
+ .comments-body {
396
+ padding: 0.5em;
397
+ }
398
+
399
+ .comments-body p {
400
+ margin: 0.2em;
401
+ }
402
+
403
+ .hilight {
404
+ color: black;
405
+ background: #ff6666;
406
+ }
407
+
408
+ div.main {
409
+ margin-left: 20%;
410
+ }
411
+
412
+ div.sidebar {
413
+ position: absolute;
414
+ top: 0px;
415
+ left: 0px;
416
+ width: 20%;
417
+ font-size: 75%;
418
+ padding: 2px 2px 100% 2px;
419
+ border-style: solid;
420
+ border-color: #c0c0c0;
421
+ border-width: 1px;
422
+ color: #000;
423
+ background-color: #f0f0ff;
424
+ }
425
+
426
+ div.sidebar ul {
427
+ margin: 20px;
428
+ padding: 0px;
429
+ }
430
+
431
+ div.sidebar form {
432
+ margin: 0em 0em 0.5em 0em;
433
+ padding: 0px;
434
+ }
435
+
436
+
437
+ /*
438
+ ツッコミ省略版本文
439
+ */
440
+ div.commentshort {
441
+ font-size: 0.9em;
442
+ margin-left: 0.5em;
443
+ }
444
+
445
+ span.commentator {
446
+ font-weight: bold;
447
+ }
448
+
449
+ div.commentshort p {
450
+ margin-top: 0.5em;
451
+ margin-bottom: 0.2em;
452
+ line-height: 1.2em;
453
+ }
454
+
455
+ /*
456
+ ツッコミ本体
457
+ */
458
+ div.commentbody {
459
+ font-size: 0.9em;
460
+ margin: 0.5em;
461
+ line-height: 1.2em;
462
+ }
463
+
464
+ /*
465
+ ツッコミした人の情報
466
+ */
467
+ div.commentator {
468
+ line-height: 1.5em;
469
+ }
470
+
471
+ /*
472
+ ツッコミ本文
473
+ */
474
+ div.commentbody p {
475
+ margin: 0.5em;
476
+ margin-left: 2em;
477
+ }
478
+
479
+ /*
480
+ フォームの設定
481
+ */
482
+ div.form form {
483
+ margin: 0em 0em 0em 2em;
484
+ }
485
+
486
+ div.form div.caption {
487
+ font-size: 0.9em;
488
+ margin: 0.5em;
489
+ }
490
+
491
+ div.form form.comment {
492
+ font-size: 0.9em;
493
+ }
494
+
495
+ div.field {
496
+ display: inline;
497
+ margin-right: 2em;
498
+ }
499
+
500
+ form.comment input {
501
+ margin-left: 1em;
502
+ }
503
+
504
+ div.textarea {
505
+ display: block;
506
+ vertical-align: top;
507
+ }
508
+
509
+ form.comment textarea {
510
+ display: block;
511
+ margin-left: 3em;
512
+ width: 30em;
513
+ height: 5em;
514
+ }
515
+
516
+ div.button {
517
+ display: block;
518
+ margin-left: 3em;
519
+ }
520
+
521
+ /*
522
+ 更新フォーム
523
+ */
524
+ form.update {
525
+ padding-top: 0.5em;
526
+ padding-bottom: 0.5em;
527
+ }
528
+
529
+ form.update input, form.update textarea, form.commentstat input {
530
+ }
531
+
532
+ form.update span.field {
533
+ display: inline;
534
+ margin-left: 0em;
535
+ margin-right: 0.5em;
536
+ }
537
+
538
+ form.update div.field.title {
539
+ display: block;
540
+ margin-top: 1em;
541
+ }
542
+
543
+ form.update div.field.title input {
544
+ margin-left: 0.5em;
545
+ }
546
+
547
+ form.update div.textarea {
548
+ display: block;
549
+ margin-top: 1em;
550
+ }
551
+
552
+ form.update textarea {
553
+ display: block;
554
+ margin-left: 3em;
555
+ margin-bottom: 1em;
556
+ width: 80%;
557
+ height: 15em;
558
+ }
559
+
560
+ form.update span.checkbox.hidediary {
561
+ margin-left: 1em;
562
+ }
563
+
564
+ /*
565
+ ツッコミ状態変更フォーム
566
+ */
567
+ div.comment form {
568
+ margin-top: 0em;
569
+ }
570
+
571
+ @media print {
572
+ div.main { margin-left: 0%;}
573
+ div.adminmenu { display: none; }
574
+ div.sidebar { display: none; }
575
+ div.comment { display: none; }
576
+ div.footer { display: none; }
577
+ div.referer { display: none; }
578
+ }
579
+
580
+ @media screen {
581
+ div.main { margin-left: 20%;}
582
+ div.adminmenu { display: block; }
583
+ div.sidebar { display: block; }
584
+ div.comment { display: block; }
585
+ div.footer { display: block; }
586
+ div.footer div { display: block; }
587
+ div.referer { display: block;}
588
+ }
589
+
590
+ div.hello {
591
+ text-align: right;
592
+ font-size: 80%;
593
+ margin-top: 0px;
594
+ }
595
+
596
+
597
+ div.header {
598
+ background-color: #f8f5f1;
599
+ padding: 1px 18px;
600
+ font-size : 12px;
601
+ line-height:18px;
602
+ margin-top: 0px;
603
+ }
604
+
605
+ div.header li,div.header li A:link,div.header li A:visited{
606
+ text-decoration : none;
607
+ }
608
+
609
+ div.header li A:hover{
610
+ text-decoration : underline;
611
+ }
612
+
613
+ div.header ul li{
614
+ list-style-image: url('./go_back_1.gif')
615
+ }
616
+
617
+ div.header ul li ul li{
618
+ list-style-image: url('./go_back_2.gif')
619
+ }
620
+
621
+ div.header ul li ul li ul li{
622
+ list-style-image: url('./go_back_3.gif')
623
+ }
624
+
@@ -0,0 +1,109 @@
1
+ # coding: utf-8
2
+ # Rakefile for Markdown documents.
3
+
4
+ DIRMAP_MD = '.dirmap.md'
5
+ ENCODING = "UTF-8"
6
+ HTML2PDF = "wkhtmltopdf"
7
+ TEX2IMAGE = "tex2image"
8
+ HTML2PDF_OPTIONS = "-B 1cm -L 1.5cm -R 1.5cm -T 1.5cm -s A4 --encoding #{ENCODING} "
9
+ CONVERT_COMMAND = "convert -alpha deactivate -density 150x150"
10
+
11
+ require "pp"
12
+ require "fileutils"
13
+ require "pathname"
14
+
15
+ ## .dirmap.md
16
+ # dirmap コマンドは必ず実行なので task タスク。
17
+ # これを file にすると存在するときに実行されない。
18
+ # 生成物の .dirmap.md から task タスクへの依存を設定すると、
19
+ # .dirmap.md に依存する file タスクに「必ず実行」が伝播して必ず実行になってしまう。
20
+ # DIRMAP_MD というファイルに対する file タスクへの依存として扱うことで、
21
+ # .dirmap.md に依存する file タスクに「必ず実行」が伝播するのを防いでいる。
22
+ desc "update .dirmap.md if directory changed."
23
+ file DIRMAP_MD => :dirmap_command
24
+ task :dirmap_command do
25
+ sh "dirmap"
26
+ end
27
+
28
+ ## *.html
29
+ md_files = FileList["*.md"]
30
+ html_files = md_files.ext("html")
31
+ html_tasks = []
32
+ html_files.each do |html_file|
33
+ md_file = html_file.ext("md")
34
+ md_path = Pathname.new( md_file)
35
+ dirpath = md_path.dirname
36
+ src = FileList[md_file, DIRMAP_MD]
37
+ file html_file => [DIRMAP_MD, md_file] do
38
+ sh "madowu -O -s .dirmap.md -c madowu.css -C UTF-8 #{md_file}"
39
+ end
40
+ html_tasks << html_file
41
+ end
42
+
43
+ desc "make *.html from *.md"
44
+ task :md2html => [DIRMAP_MD, * html_tasks]
45
+
46
+
47
+ desc "make *.pdf from *.html"
48
+ pdf_files = html_files.ext("pdf")
49
+ task :html2pdf => FileList[pdf_files]
50
+ pdf_files.each do |pdf_file|
51
+ html_file = pdf_file.ext("html")
52
+ file pdf_file => html_file do
53
+ sh "#{HTML2PDF} #{HTML2PDF_OPTIONS} #{html_file} #{pdf_file}"
54
+ end
55
+ end
56
+
57
+
58
+ desc "make .png from .eps."
59
+ eps_files = FileList["*.eps"]
60
+ png_files = eps_files.ext("png")
61
+ task :eps2png => FileList[png_files]
62
+ png_files.each do |png_file|
63
+ eps_file = png_file.ext("eps")
64
+ t = [eps_file]
65
+ file png_file => t do
66
+ sh "#{CONVERT_COMMAND} #{eps_file} #{png_file}"
67
+ end
68
+ end
69
+
70
+
71
+ desc "make *.png from *.tex"
72
+ tex_files = FileList["*.tex"]
73
+ png_files = tex_files.ext("png")
74
+ task :tex2png => FileList[png_files]
75
+ png_files.each do |png_file|
76
+ tex_file = png_file.ext("tex")
77
+ file png_file => tex_file do
78
+ #pp png_file, tex_file; exit
79
+ sh "#{TEX2IMAGE} #{tex_file}"
80
+ end
81
+ end
82
+
83
+
84
+ # recursive だと、サブディレクトリの Rakefile も
85
+ # recursive ターゲットを持っているという前提が必要。
86
+ desc "execute 'rake' in all subdirs with Rakefile"
87
+ rakefiles = FileList["**/Rakefile"]
88
+ dirs = rakefiles.map{|path| Pathname.new(path).dirname.to_s}
89
+ dirs.delete_if {|i| i == '.' }
90
+ dirs.map!{|path| File.absolute_path(path)}
91
+ task :subdir do
92
+ dirs.each do |dir|
93
+ Dir.chdir dir
94
+ system "rake"
95
+ end
96
+ end
97
+
98
+ task :all => [:md2html, :subdir]
99
+
100
+ task :pdf => :html2pdf
101
+ #task :default => [:tree, :tex2png, :eps2png]
102
+ task :default => [:md2html, :tex2png, :eps2png]
103
+
104
+ require "rake/clean"
105
+ CLEAN.include( [
106
+ html_files,
107
+ pdf_files,
108
+ ])
109
+