Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 0234f8d

Browse files
committed
Content reorganization
1 parent b00a5bd commit 0234f8d

24 files changed

+178
-179
lines changed

Makefile

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
all: html note quiz
66

77
SLIDES := $(basename $(notdir $(wildcard slide/lx*.md)))
8-
HTML_TMP := $(addprefix docs/tmp/, $(addsuffix .html, $(SLIDES)))
9-
HTML := $(addprefix docs/html/, $(addsuffix .html, $(SLIDES)))
10-
PDF := $(addprefix docs/pdf/, $(addsuffix .pdf, $(SLIDES)))
8+
HTML_TMP := $(addprefix docs/tmp/, $(addsuffix .html, $(SLIDES)))
9+
HTML := $(addprefix docs/slide/, $(addsuffix .html, $(SLIDES)))
10+
PDF := $(addprefix docs/pdf/, $(addsuffix .pdf, $(SLIDES)))
1111

1212
NOTES := $(basename $(notdir $(wildcard note/*.md)))
1313
NOTEHTML := $(addprefix docs/note/, $(addsuffix .html, $(NOTES)))
@@ -16,61 +16,59 @@ QUIZ := $(basename $(notdir $(wildcard quiz/*.md)))
1616
QUIZHTML := $(addprefix docs/quiz/, $(addsuffix .html, $(QUIZ)))
1717

1818
clean:
19-
rm -f $(HTML_TMP) $(HTML) $(NOTES) $(PDF)
19+
rm -f $(HTML_TMP) $(HTML) $(PDF) $(NOTEHTML) $(QUIZHTML)
2020

2121
# Markdown -> HTML is achieved in two-stages.
2222
html: server docs/index.html $(HTML)
2323

24-
docs/index.html: slide/index.md
25-
pandoc --smart --to html --standalone --output $@ $^
24+
HTML_DEP = docs/dev/kw.js lib/phantom.js lib/slide.yaml
2625

27-
HTML_DEV = docs/dev/kw.js docs/dev/phantom.js docs/dev/slide.yaml
28-
29-
docs/html/%.html: $(HTML_DEV) slide/%.md
26+
docs/slide/%.html: $(HTML_DEP) slide/%.md
3027
$(eval slide := $(basename $(notdir $@)))
3128
$(eval md := $(addprefix slide/, $(addsuffix .md, $(slide))))
3229
$(eval html1 := $(addprefix docs/tmp/, $(addsuffix .html, $(slide))))
33-
$(eval html2 := $(addprefix docs/html/, $(addsuffix .html, $(slide))))
30+
$(eval html2 := $(addprefix docs/slide/, $(addsuffix .html, $(slide))))
3431

3532
@# Firstly, Pandoc generates a temporary HTML file:
3633
@# slide/*.md -> tmp/*.html
37-
@echo "pandoc: $(md) => $(html1)"
34+
@echo "pandoc: $(md) => $(html1)"
3835
@pandoc lib/slide.yaml $(md) \
36+
--include-in-header=lib/slide.header \
37+
--include-after-body=lib/slide.footer \
3938
--to=revealjs --slide-level=2 \
4039
--standalone \
4140
--output=$(html1) \
4241
-V revealjs-url=/lecture/lib/reveal.js-3.5.0 \
4342
-V theme=serif \
4443
-V slideNumber=true \
45-
--css=/lecture/lib/kw.css \
4644
--mathjax \
4745
--smart
4846

4947
@# Then, PhantomJS is used to patch the temporary HTML and finishes it.
5048
@# tmp/*.html -> ../*.html
5149
@echo "phantomjs: $(html1) => $(html2)"
52-
@phantomjs docs/dev/phantom.js $(slide) $(html2)
50+
@phantomjs lib/phantom.js $(slide) $(html2)
5351
@echo
5452

5553
note: $(NOTEHTML)
5654
docs/note/%.html: note/%.md
5755
$(eval note := $(basename $(notdir $@)))
5856
$(eval md := $(addprefix note/, $(addsuffix .md, $(note))))
5957
$(eval html := $(addprefix docs/note/, $(addsuffix .html, $(note))))
60-
@pandoc docs/dev/note.yaml $(md) \
61-
--include-in-header=docs/dev/note.header \
62-
--include-after-body=docs/dev/note.footer \
58+
59+
@pandoc lib/note.yaml $(md) \
60+
--include-in-header=lib/note.header \
61+
--include-after-body=lib/note.footer \
6362
--standalone --to=html --output=$(html) \
64-
--highlight-style=espresso \
6563
--smart
6664

6765
quiz: $(QUIZHTML)
6866
docs/quiz/%.html: quiz/%.md
6967
$(eval quiz := $(basename $(notdir $@)))
7068
$(eval md := $(addprefix quiz/, $(addsuffix .md, $(quiz))))
7169
$(eval html := $(addprefix docs/quiz/, $(addsuffix .html, $(quiz))))
72-
pandoc $(md) \
73-
--include-in-header=docs/dev/quiz.header \
70+
@pandoc lib/quiz.yaml $(md) \
71+
--include-in-header=lib/quiz.header \
7472
--standalone --to=html --output=$(html) \
7573
--highlight-style=monochrome \
7674
--smart

docs/dev/note.header

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/dev/note.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/dev/quiz.header

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/dev/slide.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/index.html

Lines changed: 1 addition & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -2,93 +2,6 @@
22
<html xmlns="http://www.w3.org/1999/xhtml">
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5-
<meta http-equiv="Content-Style-Type" content="text/css" />
6-
<meta name="generator" content="pandoc" />
5+
<meta http-equiv="refresh" content="0; URL='https://is-prg1b.github.io/lecture/note/'" />
76
<title>プログラミング第一</title>
8-
<style type="text/css">code{white-space: pre;}</style>
9-
<style type="text/css">
10-
div.sourceCode { overflow-x: auto; }
11-
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12-
margin: 0; padding: 0; vertical-align: baseline; border: none; }
13-
table.sourceCode { width: 100%; line-height: 100%; }
14-
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15-
td.sourceCode { padding-left: 5px; }
16-
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17-
code > span.dt { color: #902000; } /* DataType */
18-
code > span.dv { color: #40a070; } /* DecVal */
19-
code > span.bn { color: #40a070; } /* BaseN */
20-
code > span.fl { color: #40a070; } /* Float */
21-
code > span.ch { color: #4070a0; } /* Char */
22-
code > span.st { color: #4070a0; } /* String */
23-
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24-
code > span.ot { color: #007020; } /* Other */
25-
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26-
code > span.fu { color: #06287e; } /* Function */
27-
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28-
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29-
code > span.cn { color: #880000; } /* Constant */
30-
code > span.sc { color: #4070a0; } /* SpecialChar */
31-
code > span.vs { color: #4070a0; } /* VerbatimString */
32-
code > span.ss { color: #bb6688; } /* SpecialString */
33-
code > span.im { } /* Import */
34-
code > span.va { color: #19177c; } /* Variable */
35-
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36-
code > span.op { color: #666666; } /* Operator */
37-
code > span.bu { } /* BuiltIn */
38-
code > span.ex { } /* Extension */
39-
code > span.pp { color: #bc7a00; } /* Preprocessor */
40-
code > span.at { color: #7d9029; } /* Attribute */
41-
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42-
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43-
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44-
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45-
</style>
46-
<link rel="stylesheet" href="lib/reveal.js-3.5.0/css/theme/solarized.css" type="text/css" />
47-
<link rel="stylesheet" href="dev/kw.css" type="text/css" />
487
</head>
49-
<body>
50-
<div id="header">
51-
<h1 class="title">プログラミング第一</h1>
52-
</div>
53-
<!--style>
54-
body {
55-
margin: 5em;
56-
}
57-
58-
code {
59-
color: #b44;
60-
}
61-
</style-->
62-
<script type="text/javascript" src="lib/reveal.js-3.5.0/plugin/highlight/highlight.js"></script>
63-
<script>hljs.initHightlightingOnLoad();</script>
64-
<h1 id="講義資料等">講義資料等</h1>
65-
<ul>
66-
<li><p>9月26日 — <a href="https://github.com/is-prg1b/lecture/raw/master/slide/day01.pdf">講義資料</a> / <a href="https://github.com/is-prg1b/lx01">サンプルコード</a> / <strong>次回小テスト</strong></p></li>
67-
<li><p>9月29日 — <a href="/is-prg1b/lecture/html/lx02-leapyear.html">講義資料</a></p></li>
68-
</ul>
69-
<h1 id="講義内容についての質問など">講義内容についての質問など</h1>
70-
<p><a href="https://github.com/is-prg1b/lecture/issues/new">質問,疑問等の受け付け先</a>.受け付けた質問は教員,TA,履修生で共有されます.これ以外の人々には公開されません.</p>
71-
<p>少ないスタッフで大勢を教育する都合上,質問,疑問,それへの対応は可能な限り共有する方針としています.羞恥心などの理由から授業や課題に直接関連する質問を<strong>メールで送付しないで</strong>下さい.以下に issue で対応したい問い合わせ例を示します.</p>
72-
<ul>
73-
<li><p>講義資料 <code>***.pdf</code> の X ページの説明は間違っていませんか</p></li>
74-
<li><p>講義資料 <code>***.pdf</code> の Y ページの説明がわかりません.</p></li>
75-
<li><p><code>lx??</code> リポジトリに含まれるサンプルコード <code>***.scala</code> を実行しようとしたが動きません</p></li>
76-
<li><p>自宅のパソコンに <code>sbt</code> をインストールしたが動きません</p></li>
77-
<li><p>講義資料 <code>***</code> を応用して,***なことをやってみたいが,***がわからない.ヒントを下さい.</p></li>
78-
</ul>
79-
<dl>
80-
<dt>以下のような例</dt>
81-
<dd><p>授業や課題の内容に直接関わらない相談については脇田&森へのメールでお願いします.</p>
82-
<ul>
83-
<li>病気のため休学することになったので特別な配慮をして欲しい</li>
84-
</ul>
85-
</dd>
86-
</dl>
87-
<h1 id="gitリポジトリの初期化">Gitリポジトリの初期化</h1>
88-
<p>以下のような要領で<code>git</code>コマンドを実行するとGitHub上のリポジトリを複製できます.</p>
89-
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> clone git@github.com:is-prg1b/lecture
90-
<span class="fu">git</span> clone git@github.com:is-prg1b/lx01</code></pre></div>
91-
<p>GitHubのデータが更新された場合は,適宜 <code>git pull</code> して下さい.最新版に更新できます.</p>
92-
<p>GitHubから複製したデータを直接変更すると <code>git pull</code> のときにエラーが出ます.</p>
93-
</body>
94-
</html>

docs/lib/kw.css

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
a, a:link, a:hover, a:active {
1+
body {
2+
padding-left: 6ex;
3+
padding-right: 4ex;
4+
}
5+
6+
a:-webkit-any-link {
27
font-weight: 900;
3-
color: #44f;
4-
background-color: #fff;
8+
color: #d66;
9+
text-decoration: none;
510
}
611

712
dl dd {
@@ -29,12 +34,10 @@ td {
2934
}
3035

3136
pre.src {
32-
//box-shadow: 1px 1px 10px #600;
3337
background-color: #ffe0e0;
3438
}
3539

3640
pre.test {
37-
//box-shadow: 1px 1px 10px #006;
3841
background-color: #e0e0ff;
3942
}
4043

docs/note/index.html

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<meta http-equiv="Content-Style-Type" content="text/css" />
6+
<meta name="generator" content="pandoc" />
7+
<meta name="author" content="Ken Wakita (https://is-prg1b.github.io/lecture/)" />
8+
<title>プログラミング第一</title>
9+
<style type="text/css">code{white-space: pre;}</style>
10+
<style type="text/css">
11+
div.sourceCode { overflow-x: auto; }
12+
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
13+
margin: 0; padding: 0; vertical-align: baseline; border: none; }
14+
table.sourceCode { width: 100%; line-height: 100%; }
15+
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
16+
td.sourceCode { padding-left: 5px; }
17+
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
18+
code > span.dt { color: #902000; } /* DataType */
19+
code > span.dv { color: #40a070; } /* DecVal */
20+
code > span.bn { color: #40a070; } /* BaseN */
21+
code > span.fl { color: #40a070; } /* Float */
22+
code > span.ch { color: #4070a0; } /* Char */
23+
code > span.st { color: #4070a0; } /* String */
24+
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
25+
code > span.ot { color: #007020; } /* Other */
26+
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
27+
code > span.fu { color: #06287e; } /* Function */
28+
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
29+
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
30+
code > span.cn { color: #880000; } /* Constant */
31+
code > span.sc { color: #4070a0; } /* SpecialChar */
32+
code > span.vs { color: #4070a0; } /* VerbatimString */
33+
code > span.ss { color: #bb6688; } /* SpecialString */
34+
code > span.im { } /* Import */
35+
code > span.va { color: #19177c; } /* Variable */
36+
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
37+
code > span.op { color: #666666; } /* Operator */
38+
code > span.bu { } /* BuiltIn */
39+
code > span.ex { } /* Extension */
40+
code > span.pp { color: #bc7a00; } /* Preprocessor */
41+
code > span.at { color: #7d9029; } /* Attribute */
42+
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
43+
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
44+
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
45+
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
46+
</style>
47+
<script type="text/javascript" src="/lecture/lib/reveal.js-3.5.0/plugin/highlight/highlight.js"></script>
48+
<script>hljs.initHighlightingOnLoad();</script>
49+
</head>
50+
<body>
51+
<div id="header">
52+
<h1 class="title">プログラミング第一</h1>
53+
<h2 class="author">Ken Wakita (<a href="https://is-prg1b.github.io/lecture/" class="uri">https://is-prg1b.github.io/lecture/</a>)</h2>
54+
</div>
55+
<h1 id="講義資料等">講義資料等</h1>
56+
<ul>
57+
<li><p>9月26日 — <a href="https://github.com/is-prg1b/lecture/raw/master/slide/day01.pdf">講義資料</a> / <a href="https://github.com/is-prg1b/lx01">サンプルコード</a> / <strong>次回小テスト</strong></p></li>
58+
<li><p>9月29日 — <a href="/lecture/slide/lx02.html">講義資料</a> / <a href="https://github.com/is-prg1b/lecture/">サンプルコード</a> (<code>lx02a</code> - <code>lx02k</code> projects)</p></li>
59+
</ul>
60+
<h1 id="講義内容についての質問など">講義内容についての質問など</h1>
61+
<p><a href="https://github.com/is-prg1b/lecture/issues/new">質問,疑問等の受け付け先</a>.受け付けた質問は教員,TA,履修生で共有されます.これ以外の人々には公開されません.</p>
62+
<p>少ないスタッフで大勢を教育する都合上,質問,疑問,それへの対応は可能な限り共有する方針としています.羞恥心などの理由から授業や課題に直接関連する質問を<strong>メールで送付しないで</strong>下さい.以下に issue で対応したい問い合わせ例を示します.</p>
63+
<ul>
64+
<li><p>講義資料 <code>***.pdf</code> の X ページの説明は間違っていませんか</p></li>
65+
<li><p>講義資料 <code>***.pdf</code> の Y ページの説明がわかりません.</p></li>
66+
<li><p><code>lx??</code> リポジトリに含まれるサンプルコード <code>***.scala</code> を実行しようとしたが動きません</p></li>
67+
<li><p>自宅のパソコンに <code>sbt</code> をインストールしたが動きません</p></li>
68+
<li><p>講義資料 <code>***</code> を応用して,***なことをやってみたいが,***がわからない.ヒントを下さい.</p></li>
69+
</ul>
70+
<dl>
71+
<dt>以下のような例</dt>
72+
<dd><p>授業や課題の内容に直接関わらない相談については脇田&森へのメールでお願いします.</p>
73+
<ul>
74+
<li>病気のため休学することになったので特別な配慮をして欲しい</li>
75+
</ul>
76+
</dd>
77+
</dl>
78+
<h1 id="gitリポジトリの初期化">Gitリポジトリの初期化</h1>
79+
<p>以下のような要領で<code>git</code>コマンドを実行するとGitHub上のリポジトリを複製できます.</p>
80+
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> clone git@github.com:is-prg1b/lecture
81+
<span class="fu">git</span> clone git@github.com:is-prg1b/lx01</code></pre></div>
82+
<p>GitHubのデータが更新された場合は,適宜 <code>git pull</code> して下さい.最新版に更新できます.</p>
83+
<p>GitHubから複製したデータを直接変更すると <code>git pull</code> のときにエラーが出ます.</p>
84+
<link rel="stylesheet" type="text/css" href="/lecture/lib/reveal.js-3.5.0/css/theme/solarized.css">
85+
<link rel="stylesheet" type="text/css" href="/lecture/lib/kw.css">
86+
</body>
87+
</html>

docs/note/lx02-tests.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
<meta name="author" content="Ken Wakita (https://is-prg1b.github.io/lecture/)" />
88
<title>lx02 のテスト実行結果</title>
99
<style type="text/css">code{white-space: pre;}</style>
10-
<link ref="stylesheet" type="text/css" href="../lib/reveal.js-3.5.0/css/theme/solarized.css">
11-
<link rel="stylesheet" type="text/css" href="../dev/kw.css">
10+
<script type="text/javascript" src="/lecture/lib/reveal.js-3.5.0/plugin/highlight/highlight.js"></script>
11+
<script>hljs.initHighlightingOnLoad();</script>
1212
</head>
1313
<body>
1414
<div id="header">
1515
<h1 class="title">lx02 のテスト実行結果</h1>
1616
<h2 class="author">Ken Wakita (<a href="https://is-prg1b.github.io/lecture/" class="uri">https://is-prg1b.github.io/lecture/</a>)</h2>
1717
<h3 class="date">2017年9月29日</h3>
1818
</div>
19+
<note>
1920
<h1 id="lx02a">lx02a</h1>
2021
<pre><code>sbt:lx02a&gt; test
2122
[info] LeapYearTest:
@@ -248,7 +249,8 @@ <h1 id="lx02k">lx02k</h1>
248249
[info] All tests passed.
249250
[info] Passed: Total 4, Failed 0, Errors 0, Passed 4
250251
[success] Total time: 2 s, completed Sep 29, 2017 12:24:24 PM</code></pre>
251-
<script src="//use.edgefonts.net/source-code-pro.js"></script>
252-
<script src="../dev/jquery-3.2.1.min.js"></script>
252+
</note>
253+
<link rel="stylesheet" type="text/css" href="/lecture/lib/reveal.js-3.5.0/css/theme/solarized.css">
254+
<link rel="stylesheet" type="text/css" href="/lecture/lib/kw.css">
253255
</body>
254256
</html>

0 commit comments

Comments
 (0)