dfaa356c459bc7f1b596f4cea3ad15515fe487a2
Makefile
... | ... | @@ -0,0 +1,107 @@ |
1 | +#################################################################################################### |
|
2 | +# Configuration |
|
3 | +#################################################################################################### |
|
4 | + |
|
5 | +# Build configuration |
|
6 | + |
|
7 | +BUILD = build |
|
8 | +MAKEFILE = Makefile |
|
9 | +OUTPUT_FILENAME = book |
|
10 | +METADATA = metadata.yml |
|
11 | +CHAPTERS = chapters/*.md |
|
12 | +TOC = --toc --toc-depth 2 |
|
13 | +METADATA_ARGS = --metadata-file $(METADATA) |
|
14 | +IMAGES = $(shell find images -type f) |
|
15 | +TEMPLATES = $(shell find templates/ -type f) |
|
16 | +COVER_IMAGE = images/cover.png |
|
17 | +MATH_FORMULAS = --webtex |
|
18 | + |
|
19 | +# Chapters content |
|
20 | +CONTENT = awk 'FNR==1 && NR!=1 {print "\n\n"}{print}' $(CHAPTERS) |
|
21 | +CONTENT_FILTERS = tee # Use this to add sed filters or other piped commands |
|
22 | +CONTENT_FILTERS = sed -i '/TOC/d' |
|
23 | + |
|
24 | +# Debugging |
|
25 | + |
|
26 | +# DEBUG_ARGS = --verbose |
|
27 | + |
|
28 | +# Pandoc filtes - uncomment the following variable to enable cross references filter. For more |
|
29 | +# information, check the "Cross references" section on the README.md file. |
|
30 | + |
|
31 | +# FILTER_ARGS = --filter pandoc-crossref |
|
32 | + |
|
33 | +# Combined arguments |
|
34 | + |
|
35 | +ARGS = $(TOC) $(MATH_FORMULAS) $(METADATA_ARGS) $(FILTER_ARGS) $(DEBUG_ARGS) |
|
36 | + |
|
37 | +PANDOC_COMMAND = /usr/bin/pandoc |
|
38 | + |
|
39 | +# Per-format options |
|
40 | + |
|
41 | +DOCX_ARGS = --standalone --reference-doc templates/docx.docx |
|
42 | +EPUB_ARGS = --template templates/epub.html --epub-cover-image $(COVER_IMAGE) |
|
43 | +HTML_ARGS = --template templates/html.html --standalone --to html5 |
|
44 | +PDF_ARGS = --template templates/pdf.latex --pdf-engine xelatex |
|
45 | + |
|
46 | +# Per-format file dependencies |
|
47 | + |
|
48 | +BASE_DEPENDENCIES = $(MAKEFILE) $(CHAPTERS) $(METADATA) $(IMAGES) $(TEMPLATES) |
|
49 | +DOCX_DEPENDENCIES = $(BASE_DEPENDENCIES) |
|
50 | +EPUB_DEPENDENCIES = $(BASE_DEPENDENCIES) |
|
51 | +HTML_DEPENDENCIES = $(BASE_DEPENDENCIES) |
|
52 | +PDF_DEPENDENCIES = $(BASE_DEPENDENCIES) |
|
53 | + |
|
54 | +#################################################################################################### |
|
55 | +# Basic actions |
|
56 | +#################################################################################################### |
|
57 | + |
|
58 | +.PHONY: all |
|
59 | +all: book |
|
60 | + |
|
61 | +.PHONY: book |
|
62 | +book: epub html pdf docx mdbook |
|
63 | + |
|
64 | +.PHONY: clean |
|
65 | +clean: |
|
66 | + rm -r $(BUILD) |
|
67 | + |
|
68 | +#################################################################################################### |
|
69 | +# File builders |
|
70 | +#################################################################################################### |
|
71 | + |
|
72 | +.PHONY: epub |
|
73 | +epub: $(BUILD)/epub/$(OUTPUT_FILENAME).epub |
|
74 | + |
|
75 | +.PHONY: html |
|
76 | +html: $(BUILD)/html/$(OUTPUT_FILENAME).html |
|
77 | + |
|
78 | +.PHONY: pdf |
|
79 | +pdf: $(BUILD)/pdf/$(OUTPUT_FILENAME).pdf |
|
80 | + |
|
81 | +.PHONY: docx |
|
82 | +docx: $(BUILD)/docx/$(OUTPUT_FILENAME).docx |
|
83 | + |
|
84 | +.PHONY: mdbook |
|
85 | +mdbook: |
|
86 | + mdbook build |
|
87 | + |
|
88 | +$(BUILD)/epub/$(OUTPUT_FILENAME).epub: $(EPUB_DEPENDENCIES) |
|
89 | + mkdir -p $(BUILD)/epub |
|
90 | + $(CONTENT) | $(CONTENT_FILTERS) | $(PANDOC_COMMAND) $(ARGS) $(EPUB_ARGS) -o $@ |
|
91 | + @echo "$@ was built" |
|
92 | + |
|
93 | +$(BUILD)/html/$(OUTPUT_FILENAME).html: $(HTML_DEPENDENCIES) |
|
94 | + mkdir -p $(BUILD)/html |
|
95 | + $(CONTENT) | $(CONTENT_FILTERS) | $(PANDOC_COMMAND) $(ARGS) $(HTML_ARGS) -o $@ |
|
96 | + cp --parent $(IMAGES) $(BUILD)/html/ |
|
97 | + @echo "$@ was built" |
|
98 | + |
|
99 | +$(BUILD)/pdf/$(OUTPUT_FILENAME).pdf: $(PDF_DEPENDENCIES) |
|
100 | + mkdir -p $(BUILD)/pdf |
|
101 | + $(CONTENT) | $(CONTENT_FILTERS) | $(PANDOC_COMMAND) $(ARGS) $(PDF_ARGS) -o $@ |
|
102 | + @echo "$@ was built" |
|
103 | + |
|
104 | +$(BUILD)/docx/$(OUTPUT_FILENAME).docx: $(DOCX_DEPENDENCIES) |
|
105 | + mkdir -p $(BUILD)/docx |
|
106 | + $(CONTENT) | $(CONTENT_FILTERS) | $(PANDOC_COMMAND) $(ARGS) $(DOCX_ARGS) -o $@ |
|
107 | + @echo "$@ was built" |
book.toml
... | ... | @@ -0,0 +1,31 @@ |
1 | +[book] |
|
2 | +authors = ["donghee"] |
|
3 | +language = "ko" |
|
4 | +multilingual = false |
|
5 | +src = "chapters" |
|
6 | +title = "비거니즘 전시 매뉴얼 ver.1" |
|
7 | + |
|
8 | +[output.html] |
|
9 | +default-theme = "vegan" |
|
10 | +#git-repository-url = "https://github.com/donghee/zeromakeszero/tree/master/wiki" |
|
11 | +#edit-url-template = "https://github.com/donghee/zeromakeszero/edit/master/wiki/{path}" |
|
12 | + |
|
13 | +[output.html.playground] |
|
14 | +editable = true |
|
15 | +line-numbers = true |
|
16 | + |
|
17 | +[output.html.search] |
|
18 | +enable = false |
|
19 | +#limit-results = 20 |
|
20 | +#use-boolean-and = true |
|
21 | +#boost-title = 2 |
|
22 | +#boost-hierarchy = 2 |
|
23 | +#boost-paragraph = 1 |
|
24 | +#expand = true |
|
25 | +#heading-split-level = 2 |
|
26 | + |
|
27 | +# https://github.com/badboy/mdbook-toc |
|
28 | +[preprocessor.toc] |
|
29 | +marker = "[[_TOC_]]" |
|
30 | +max-level = 3 |
|
31 | + |
config.rb
... | ... | @@ -0,0 +1,37 @@ |
1 | +# define the wiki options |
|
2 | +wiki_options = { |
|
3 | + :h1_title => true, |
|
4 | + :user_icons => 'gravatar', |
|
5 | + :live_preview => false, |
|
6 | + :allow_uploads => true, |
|
7 | + :per_page_uploads => true, |
|
8 | + :allow_editing => true, |
|
9 | + :css => true, |
|
10 | + :js => true, |
|
11 | + :mathjax => true, |
|
12 | + :emoji => true, |
|
13 | + :show_all => true, |
|
14 | + :template_dir => '/usr/local/share/gollum/templates' |
|
15 | +} |
|
16 | + |
|
17 | +# pass wiki options to the Gollum app |
|
18 | +Precious::App.set(:wiki_options, wiki_options) |
|
19 | + |
|
20 | +# if present, undefine the :FORMAT_NAMES constant to avoid the |
|
21 | +# "already initialized constant FORMAT_NAMES" warning |
|
22 | +Gollum::Page.send :remove_const, :FORMAT_NAMES if defined? Gollum::Page::FORMAT_NAMES |
|
23 | +# redefine the :FORMAT_NAMES constant to limit the available |
|
24 | +# formats on the editor to only markdown |
|
25 | +Gollum::Page::FORMAT_NAMES = { :markdown => "Markdown" } |
|
26 | + |
|
27 | +module Gollum |
|
28 | + class Markup |
|
29 | + mmd = proc { |content| |
|
30 | + MultiMarkdown.new(content).to_html |
|
31 | + } |
|
32 | + GitHub::Markup::Markdown::MARKDOWN_GEMS['kramdown'] = proc { |content| |
|
33 | + Kramdown::Document.new(content, :input => "kramdown", :auto_ids => true, :math_engine => nil, :smart_quotes => ["'", "'", '"', '"'].map{|char| char.codepoints.first}).to_html |
|
34 | + } |
|
35 | + end |
|
36 | +end |
|
37 | + |
metadata.yml
... | ... | @@ -0,0 +1,14 @@ |
1 | +--- |
|
2 | +title: "비거니즘 전시 매뉴얼" |
|
3 | +author: "저자이름" |
|
4 | +rights: MIT License |
|
5 | +lang: en-US |
|
6 | +tags: [vegan, manual] |
|
7 | +abstract: | |
|
8 | + Your summary. |
|
9 | +mainfont: THEJung130 |
|
10 | + |
|
11 | +# Filter preferences: |
|
12 | +# - pandoc-crossref |
|
13 | +linkReferences: true |
|
14 | +--- |
run-wiki.sh
... | ... | @@ -0,0 +1 @@ |
1 | +gollum --allow-uploads=dir --template-dir=templates --h1-title --css --adapter rugged |
templates/comments.mustache
... | ... | @@ -0,0 +1,19 @@ |
1 | +<div id="disqus_thread"></div> |
|
2 | +<script> |
|
3 | + /** |
|
4 | + * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. |
|
5 | + * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */ |
|
6 | + /* |
|
7 | + var disqus_config = function () { |
|
8 | + this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable |
|
9 | + this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable |
|
10 | + }; |
|
11 | + */ |
|
12 | + (function() { // DON'T EDIT BELOW THIS LINE |
|
13 | + var d = document, s = d.createElement('script'); |
|
14 | + s.src = 'https://wiki-0makes0-com.disqus.com/embed.js'; |
|
15 | + s.setAttribute('data-timestamp', +new Date()); |
|
16 | + (d.head || d.body).appendChild(s); |
|
17 | + })(); |
|
18 | +</script> |
|
19 | +<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> |
templates/commit.mustache
... | ... | @@ -0,0 +1,26 @@ |
1 | +<div id="wiki-wrapper" class="compare"> |
|
2 | + <div id="head"> |
|
3 | + <h1 class="py-4">{{message}}</h1> |
|
4 | + {{author}} commited {{authored_date}} |
|
5 | + <span class="px-2 float-right">commit <code>{{version}}</code></span> |
|
6 | + </div> |
|
7 | + |
|
8 | + <div id="compare-content"> |
|
9 | + {{#files}} |
|
10 | + <div class="Box data highlight my-3"> |
|
11 | + <div class="Box-header Box--condensed Box-header--gray"> |
|
12 | + <code>{{path}}</code> |
|
13 | + </div> |
|
14 | + <table> |
|
15 | + {{#lines}} |
|
16 | + <tr> |
|
17 | + <td class="line_numbers">{{ldln}}</td> |
|
18 | + <td class="line_numbers">{{rdln}}</td> |
|
19 | + <td><div class="{{class}} pl-2">{{line}}</div></td> |
|
20 | + </tr> |
|
21 | + {{/lines}} |
|
22 | + </table> |
|
23 | + </div> |
|
24 | + {{/files}} |
|
25 | + </div> |
|
26 | +</div> |
templates/compare.mustache
... | ... | @@ -0,0 +1,52 @@ |
1 | +<div id="wiki-wrapper" class="compare"> |
|
2 | + <div id="head"> |
|
3 | + {{>navbar}} |
|
4 | + <h1 class="py-4"><span class="f1-light text-gray-light">Comparing versions of</span> {{name}}</h1> |
|
5 | + </div> |
|
6 | + |
|
7 | +{{#message}} |
|
8 | + <p>{{message}}</p> |
|
9 | +{{/message}} |
|
10 | + |
|
11 | + <div id="compare-content"> |
|
12 | + |
|
13 | + <div class="py-4" id="actions"> |
|
14 | + {{#show_revert}} |
|
15 | + {{#allow_editing}} |
|
16 | + <form name="gollum-revert" action="{{revert_path}}/{{escaped_url_path}}/{{before}}/{{after}}" method="post" id="gollum-revert-form"></form> |
|
17 | + <span class="pb-4"> |
|
18 | + <button class="btn btn-sm" type="submit" onclick="$('#gollum-revert-form').submit()">Revert Changes</button> |
|
19 | + </span> |
|
20 | + {{/allow_editing}} |
|
21 | + {{/show_revert}} |
|
22 | + <a href="{{history_path}}/{{escaped_url_path}}" class="btn btn-sm action-page-history">Back to Page History</a> |
|
23 | + </div> |
|
24 | + |
|
25 | + <div class="Box data highlight"> |
|
26 | + <div class="Box-header Box--condensed Box-header--gray">{{path}} <span class="px-2 float-right">Comparing {{before}} to {{after}}</span></div> |
|
27 | + <table > |
|
28 | + {{#lines}} |
|
29 | + <tr> |
|
30 | + <td class="line_numbers">{{ldln}}</td> |
|
31 | + <td class="line_numbers">{{rdln}}</td> |
|
32 | + <td> |
|
33 | + <div class="{{class}} pl-2">{{line}}</div> |
|
34 | + </td> |
|
35 | + </tr> |
|
36 | + {{/lines}} |
|
37 | + </table> |
|
38 | + </div> |
|
39 | + </div> |
|
40 | + |
|
41 | + <div class="pt-4" id="footer"> |
|
42 | + {{#show_revert}} |
|
43 | + {{#allow_editing}} |
|
44 | + <span class="pt-4"><button class="btn btn-sm gollum-revert-button" type="submit" onclick="$('#gollum-revert-form').submit()">Revert Changes</button></span> |
|
45 | + {{/allow_editing}} |
|
46 | + {{/show_revert}} |
|
47 | + <div class="pt-4"> |
|
48 | + <a href="#">Back to Top</a> |
|
49 | + </div> |
|
50 | + </div> |
|
51 | +</div> |
|
52 | + |
templates/create.mustache
... | ... | @@ -0,0 +1,23 @@ |
1 | +<div id="wiki-wrapper" class="create"> |
|
2 | +<div id="head"> |
|
3 | + {{>navbar}} |
|
4 | + <h1 class="py-4">새 페이지 만들기</h1> |
|
5 | +</div> |
|
6 | +<div id="wiki-content" class="create edit"> |
|
7 | + <div class="tabnav"> |
|
8 | + <nav class="tabnav-tabs" aria-label="Toggle edit or preview mode"> |
|
9 | + <a href="#" id="edit" class="tabnav-tab selected" aria-current="page"> |
|
10 | + 편집 |
|
11 | + </a> |
|
12 | + <a href="#" id="preview" class="tabnav-tab">미리 보기</a> |
|
13 | + </nav> |
|
14 | + </div> |
|
15 | + |
|
16 | + <div class="has-sidebar tabnav-div" id="edit-content"> |
|
17 | + {{>editor}} |
|
18 | + </div> |
|
19 | + <div class="tabnav-div" id="preview-content"> |
|
20 | + </div> |
|
21 | +</div> |
|
22 | +</div> |
|
23 | +{{something}} |
templates/docx.docx
... | ... | Binary files /dev/null and b/templates/docx.docx differ |
templates/edit.mustache
... | ... | @@ -0,0 +1,16 @@ |
1 | +<div id="wiki-wrapper" class="edit"> |
|
2 | +<div id="head"> |
|
3 | + {{>navbar}} |
|
4 | + <h1 class="py-2" style="margin-top: 1.0em;">편집 <strong>{{title}}</strong></h1> |
|
5 | +</div> |
|
6 | +<div class="tabnav"> |
|
7 | + <nav class="tabnav-tabs"> |
|
8 | + <a href="#" id="edit" class="tabnav-tab selected" aria-current="page"> |
|
9 | + 편집 |
|
10 | + </a> |
|
11 | + <a href="#" id="preview" class="tabnav-tab">미리 보기</a> |
|
12 | + </nav> |
|
13 | +</div> |
|
14 | + <div class="tabnav-div" id="edit-content">{{>editor}}</div> |
|
15 | + <div class="tabnav-div" id="preview-content"></div> |
|
16 | +</div> |
templates/editor.mustache
... | ... | @@ -0,0 +1,154 @@ |
1 | +<div id="gollum-editor" data-escaped-name="{{escaped_name}}" class="{{#is_create_page}}create{{/is_create_page}}{{#is_edit_page}}edit{{/is_edit_page}} {{#allow_uploads}}uploads-allowed{{/allow_uploads}} tex2jax_ignore"> |
|
2 | +{{#is_create_page}} |
|
3 | +<form id="gollum-editor-form" name="gollum-editor" action="{{create_path}}" method="post"> |
|
4 | +{{/is_create_page}} |
|
5 | +{{#is_edit_page}} |
|
6 | +<form id="gollum-editor-form" name="gollum-editor" action="{{edit_path}}/{{escaped_name}}" method="post"> |
|
7 | +{{/is_edit_page}} |
|
8 | + <fieldset id="gollum-editor-fields"> |
|
9 | + {{#is_create_page}} |
|
10 | + <div id="gollum-editor-title-field" class="singleline"> |
|
11 | + <label for="page" class="jaws">Page Title</label> |
|
12 | + <input class="form-control input-lg" placeholder="Page title" type="text" name="page" id="gollum-editor-page-title" value="{{page_name}}"> |
|
13 | + {{#has_path}} |
|
14 | + <p class="path_note"><strong>NOTE:</strong> This page will be created within the "<strong>{{path}}</strong>" directory</p> |
|
15 | + {{/has_path}} |
|
16 | + </div> |
|
17 | + {{/is_create_page}} |
|
18 | + {{#is_edit_page}} |
|
19 | + <input type="hidden" name="page" id="gollum-editor-page-title" value="{{page_name}}"> |
|
20 | + <input type="hidden" name="etag" id="gollum-editor-etag" value="{{etag}}"> |
|
21 | + {{/is_edit_page}} |
|
22 | + <input type="hidden" name="path" id="gollum-editor-page-path" value="{{path}}"> |
|
23 | + |
|
24 | + <div id="gollum-editor-function-bar"> |
|
25 | + <div id="gollum-editor-function-buttons"> |
|
26 | + <button class="btn btn-sm function-button" id="function-bold" title="Bold">{{#octicon}}bold{{/octicon}}</button> |
|
27 | + <button class="btn btn-sm function-button" id="function-italic" title="Italic">{{#octicon}}italic{{/octicon}}</button> |
|
28 | + <button class="btn btn-sm function-button" id="function-code" title="Code">{{#octicon}}code{{/octicon}}</button> |
|
29 | + <span class="pr-2"></span> |
|
30 | + <button class="btn btn-sm function-button" id="function-ul" title="Unordered list">{{#octicon}}list-unordered{{/octicon}}</button> |
|
31 | + <button class="btn btn-sm function-button" id="function-ol" title="Ordered list">{{#octicon}}list-ordered{{/octicon}}</button> |
|
32 | + <button class="btn btn-sm function-button" id="function-blockquote" title="Blockquote">{{#octicon}}quote{{/octicon}}</button> |
|
33 | + <button class="btn btn-sm function-button" id="function-hr" title="Horizontal rule">{{#octicon}}horizontal-rule{{/octicon}}</button> |
|
34 | + <span class="pr-2"></span> |
|
35 | + <button class="btn btn-sm function-button" id="function-h1" title="Heading 1">h1</button> |
|
36 | + <button class="btn btn-sm function-button" id="function-h2" title="Heading 2">h2</button> |
|
37 | + <button class="btn btn-sm function-button" id="function-h3" title="Heading 3">h3</button> |
|
38 | + <span class="pr-2"></span> |
|
39 | + <button class="btn btn-sm function-button" id="function-link" title="Link">{{#octicon}}link{{/octicon}}</button> |
|
40 | + <button class="btn btn-sm function-button" id="function-image" title="Image">{{#octicon}}image{{/octicon}}</button> |
|
41 | + <span class="pr-2"></span> |
|
42 | + {{#critic_markup}} |
|
43 | + <button class="btn btn-sm function-button" id="function-critic-accept" title="Accept Selected CriticMarkup">{{#octicon}}plus{{/octicon}}</button> |
|
44 | + <button class="btn btn-sm function-button" id="function-critic-reject" title="Reject Selected CriticMarkup">{{#octicon}}dash{{/octicon}}</button> |
|
45 | + <span class="pr-2"></span> |
|
46 | + {{/critic_markup}} |
|
47 | + <button class="btn btn-sm function-button" id="function-text-direction" title="Reverse Text Direction">{{#octicon}}arrow-both{{/octicon}}</button> |
|
48 | + <button class="btn btn-sm function-button" id="function-help" title="Help">{{#octicon}}question{{/octicon}}</button> |
|
49 | + </div> |
|
50 | + |
|
51 | + <div id="gollum-editor-format-selector"> |
|
52 | + <label for="format">Keybinding</label> |
|
53 | + <select id="keybinding" name="keybinding" class="form-select input-sm"> |
|
54 | + <option selected="selected">default</option> |
|
55 | + <option>vim</option> |
|
56 | + <option>emacs</option> |
|
57 | + </select> |
|
58 | + <label for="format">Markup</label> |
|
59 | + <select id="wiki_format" name="format" class="form-select input-sm"> |
|
60 | + {{#formats}} |
|
61 | + {{#enabled}} |
|
62 | + <option {{#selected}}selected="selected" {{/selected}}value="{{id}}" data-ext="{{ext}}"> |
|
63 | + {{name}} |
|
64 | + </option> |
|
65 | + {{/enabled}} |
|
66 | + {{/formats}} |
|
67 | + {{#formats}} |
|
68 | + {{^enabled}} |
|
69 | + <option class="disabled" {{#selected}}selected="selected" {{/selected}}value="{{id}}" data-ext="{{ext}}"> |
|
70 | + {{name}} |
|
71 | + </option> |
|
72 | + {{/enabled}} |
|
73 | + {{/formats}} |
|
74 | + </select> |
|
75 | + </div> |
|
76 | + </div> |
|
77 | + |
|
78 | + <div id="gollum-editor-help" class="jaws"> |
|
79 | + <ul id="gollum-editor-help-parent"> |
|
80 | + <li><a href="javascript:void(0);" class="selected">Help 1</a></li> |
|
81 | + <li><a href="javascript:void(0);">Help 1</a></li> |
|
82 | + <li><a href="javascript:void(0);">Help 1</a></li> |
|
83 | + </ul> |
|
84 | + <ul id="gollum-editor-help-list"> |
|
85 | + <li><a href="javascript:void(0);">Help 2</a></li> |
|
86 | + <li><a href="javascript:void(0);">Help 3</a></li> |
|
87 | + <li><a href="javascript:void(0);">Help 4</a></li> |
|
88 | + <li><a href="javascript:void(0);">Help 5</a></li> |
|
89 | + <li><a href="javascript:void(0);">Help 6</a></li> |
|
90 | + <li><a href="javascript:void(0);">Help 7</a></li> |
|
91 | + <li><a href="javascript:void(0);">Help 8</a></li> |
|
92 | + </ul> |
|
93 | + <div id="gollum-editor-help-wrapper"> |
|
94 | + <div id="gollum-editor-help-content"> |
|
95 | + <p> |
|
96 | + </p> |
|
97 | + </div> |
|
98 | + </div> |
|
99 | + </div> |
|
100 | + <div id="gollum-autorecover-msg" class="flash" hidden> |
|
101 | + Autosaved text is available. Click the button to restore it. |
|
102 | + <button id="gollum-autorecover-button" class="btn btn-sm primary flash-action">Restore Text</button> |
|
103 | + </div> |
|
104 | + <textarea id="gollum-editor-body" class="form-control" |
|
105 | + data-markup-lang="{{format}}" name="content" class="mousetrap">{{content}}</textarea> |
|
106 | + <div id="uploading"> |
|
107 | + <p><div class="dotted-spinner"></div> Uploading file...</p> |
|
108 | + </div> |
|
109 | + |
|
110 | + {{#header}} |
|
111 | + |
|
112 | + <div id="gollum-editor-edit-header" class="collapsed"> |
|
113 | + <button class="btn btn-sm collapsable">{{#octicon}}triangle-down{{/octicon}}</button><button class="btn btn-sm collapsable" hidden>{{#octicon}}triangle-up{{/octicon}}</button> |
|
114 | + <h4>Header</h4> |
|
115 | + <textarea id="gollum-editor-header" name="header" class="form-control">{{header}}</textarea> |
|
116 | + </div> |
|
117 | + {{/header}} |
|
118 | + |
|
119 | + {{#footer}} |
|
120 | + <div id="gollum-editor-edit-footer" class="collapsed"> |
|
121 | + <button class="btn btn-sm collapsable">{{#octicon}}triangle-down{{/octicon}}</button><button class="btn btn-sm collapsable" hidden>{{#octicon}}triangle-up{{/octicon}}</button> |
|
122 | + <h4>Footer</h4> |
|
123 | + <textarea id="gollum-editor-footer" name="footer" class="form-control">{{footer}}</textarea> |
|
124 | + </div> |
|
125 | + {{/footer}} |
|
126 | + |
|
127 | + {{#sidebar}} |
|
128 | + <div id="gollum-editor-edit-sidebar" class="collapsed"> |
|
129 | + <button class="btn btn-sm collapsable">{{#octicon}}triangle-down{{/octicon}}</button><button class="btn btn-sm collapsable" hidden>{{#octicon}}triangle-up{{/octicon}}</button> |
|
130 | + <h4>Sidebar</h4> |
|
131 | + |
|
132 | + <textarea id="gollum-editor-sidebar" name="sidebar" class="form-control">{{sidebar}}</textarea> |
|
133 | + </div> |
|
134 | + {{/sidebar}} |
|
135 | + |
|
136 | + <div id="gollum-editor-edit-summary" class="singleline"> |
|
137 | + <label for="message" class="jaws">Edit message:</label> |
|
138 | + {{#is_create_page}} |
|
139 | + <input type="text" name="message" class="form-control input-block" id="gollum-editor-message-field" value="Created {{page_name}} ({{format}})"> |
|
140 | + {{/is_create_page}} |
|
141 | + {{#is_edit_page}} |
|
142 | + <input type="text" name="message" class="form-control input-block" id="gollum-editor-message-field" value="Updated {{page_name}} ({{format}})"> |
|
143 | + {{/is_edit_page}} |
|
144 | + </div> |
|
145 | + |
|
146 | + <span class="jaws"><br></span> |
|
147 | + <div class="form-actions"> |
|
148 | + <input type="submit" id="gollum-editor-submit" class="btn btn-primary" value="Save" title="Save current changes"> |
|
149 | + <a id="gollum-editor-cancel" class="btn" type="button" title="Cancel editing" onClick="window.history.back()">Cancel</a> |
|
150 | + </div> |
|
151 | + </fieldset> |
|
152 | +</form> |
|
153 | +</div> |
|
154 | +<div id="gollum-saved-msg" class="position-fixed bottom-0 left-0"></div> |
templates/epub.html
... | ... | @@ -0,0 +1,69 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> |
|
2 | +<!DOCTYPE html> |
|
3 | +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"$if(lang)$ xml:lang="$lang$"$endif$> |
|
4 | +<head> |
|
5 | + <meta charset="utf-8" /> |
|
6 | + <meta name="generator" content="pandoc" /> |
|
7 | + <title>$pagetitle$</title> |
|
8 | +$if(highlighting-css)$ |
|
9 | + <style> |
|
10 | +$highlighting-css$ |
|
11 | +$style.css()$ |
|
12 | + </style> |
|
13 | +$endif$ |
|
14 | +$for(css)$ |
|
15 | + <link rel="stylesheet" type="text/css" href="$css$" /> |
|
16 | +$endfor$ |
|
17 | +$for(header-includes)$ |
|
18 | + $header-includes$ |
|
19 | +$endfor$ |
|
20 | +</head> |
|
21 | +<body$if(coverpage)$ id="cover"$endif$$if(body-type)$ epub:type="$body-type$"$endif$> |
|
22 | +$if(titlepage)$ |
|
23 | +<section epub:type="titlepage" class="titlepage"> |
|
24 | +$for(title)$ |
|
25 | +$if(title.type)$ |
|
26 | + <h1 class="$title.type$">$title.text$</h1> |
|
27 | +$else$ |
|
28 | + <h1 class="title">$title$</h1> |
|
29 | +$endif$ |
|
30 | +$endfor$ |
|
31 | +$if(subtitle)$ |
|
32 | + <p class="subtitle">$subtitle$</p> |
|
33 | +$endif$ |
|
34 | +$for(author)$ |
|
35 | + <p class="author">$author$</p> |
|
36 | +$endfor$ |
|
37 | +$for(creator)$ |
|
38 | + <p class="$creator.role$">$creator.text$</p> |
|
39 | +$endfor$ |
|
40 | +$if(publisher)$ |
|
41 | + <p class="publisher">$publisher$</p> |
|
42 | +$endif$ |
|
43 | +$if(date)$ |
|
44 | + <p class="date">$date$</p> |
|
45 | +$endif$ |
|
46 | +$if(rights)$ |
|
47 | + <div class="rights">$rights$</div> |
|
48 | +$endif$ |
|
49 | +</section> |
|
50 | +$else$ |
|
51 | +$if(coverpage)$ |
|
52 | +<div id="cover-image"> |
|
53 | +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="none"> |
|
54 | +<image width="$cover-image-width$" height="$cover-image-height$" xlink:href="../media/$cover-image$" /> |
|
55 | +</svg> |
|
56 | +</div> |
|
57 | +$else$ |
|
58 | +$for(include-before)$ |
|
59 | +$include-before$ |
|
60 | +$endfor$ |
|
61 | +$body$ |
|
62 | +$for(include-after)$ |
|
63 | +$include-after$ |
|
64 | +$endfor$ |
|
65 | +$endif$ |
|
66 | +$endif$ |
|
67 | +</body> |
|
68 | +</html> |
|
69 | + |
templates/error.mustache
... | ... | @@ -0,0 +1,8 @@ |
1 | +<div id="wiki-wrapper" class="error"> |
|
2 | + <div id="error"> |
|
3 | + <h1>Error</h1> |
|
4 | + <p> |
|
5 | + {{message}} |
|
6 | + </p> |
|
7 | + </div> |
|
8 | +</div> |
|
... | ... | \ No newline at end of file |
templates/history.mustache
... | ... | @@ -0,0 +1,38 @@ |
1 | +<div id="wiki-wrapper" class="history"> |
|
2 | +<div id="head"> |
|
3 | + {{>navbar}} |
|
4 | + <h1 class="py-4"><span class="f1-light text-gray-light">History for</span> {{name}}</h1> |
|
5 | +</div> |
|
6 | +<div id="page-history"> |
|
7 | + |
|
8 | + {{>pagination}} |
|
9 | + |
|
10 | + <form name="selection-form" id="selection-form" method="get" action="{{compare_path}}/{{escaped_url_path}}"></form> |
|
11 | + |
|
12 | + <div id="page-history-list" class="Box Box--condensed flex-auto"> |
|
13 | + <form id="version-form"> |
|
14 | + <ul> |
|
15 | + {{#versions}} |
|
16 | + <li class="Box-row border-top Box-row--hover-gray d-flex flex-items-center"> |
|
17 | + <span class="pr-2"><input class="checkbox" type="checkbox" name="versions[]" value="{{id}}"></span> |
|
18 | + <span class="float-left col-2" id="user-icons">{{>author_template}}</span> |
|
19 | + <span class="flex-auto col-1 text-gray-light">{{date}}</span> |
|
20 | + <span class="flex-auto col-5">{{message}}</span> |
|
21 | + <span class="pl-4 float-right"> |
|
22 | + <a href="{{href}}" class="btn btn-outline text-mono">{{id7}}</a> |
|
23 | + <a href="{{href_page}}" title="Browse the page at this point in the history" class="btn btn-outline">{{#octicon}}code{{/octicon}}</a> |
|
24 | + </span> |
|
25 | + </li> |
|
26 | + {{/versions}} |
|
27 | + </ul> |
|
28 | + </form> |
|
29 | + </div> |
|
30 | + |
|
31 | + |
|
32 | + |
|
33 | +<div id="footer"> |
|
34 | + <div class="pt-4"> |
|
35 | + <button class="btn btn-sm action-compare-revision" type="submit">Compare Revisions</button> |
|
36 | + </div> |
|
37 | +</div> |
|
38 | +</div> |
templates/history_authors/gravatar.mustache
... | ... | @@ -0,0 +1,2 @@ |
1 | +<img src="https://secure.gravatar.com/avatar/{{user_icon}}?s=20" class="mini-gravatar" onerror="brokenAvatarImage(this);" /> |
|
2 | + <a href="https://gravatar.com/{{user_icon}}">{{author}}</a> |
|
... | ... | \ No newline at end of file |
templates/history_authors/identicon.mustache
... | ... | @@ -0,0 +1,2 @@ |
1 | +<img src="" alt="avatar: {{author}}" class="identicon" data-identicon="{{user_icon}}" onerror="brokenAvatarImage(this);" /> |
|
2 | + <span>{{author}}</span> |
|
... | ... | \ No newline at end of file |
templates/history_authors/none.mustache
... | ... | @@ -0,0 +1,2 @@ |
1 | +{{#octicon}}person{{/octicon}} |
|
2 | + <span>{{author}}</span> |
|
... | ... | \ No newline at end of file |
templates/html.html
... | ... | @@ -0,0 +1,65 @@ |
1 | +<!DOCTYPE html> |
|
2 | +<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$> |
|
3 | +<head> |
|
4 | + <meta charset="utf-8" /> |
|
5 | + <meta name="generator" content="pandoc" /> |
|
6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> |
|
7 | +$for(author-meta)$ |
|
8 | + <meta name="author" content="$author-meta$" /> |
|
9 | +$endfor$ |
|
10 | +$if(date-meta)$ |
|
11 | + <meta name="dcterms.date" content="$date-meta$" /> |
|
12 | +$endif$ |
|
13 | +$if(keywords)$ |
|
14 | + <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" /> |
|
15 | +$endif$ |
|
16 | + <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title> |
|
17 | + <style> |
|
18 | + $styles.html()$ |
|
19 | + $style.css()$ |
|
20 | + </style> |
|
21 | +$for(css)$ |
|
22 | + <link rel="stylesheet" href="$css$" /> |
|
23 | +$endfor$ |
|
24 | +$if(math)$ |
|
25 | + $math$ |
|
26 | +$endif$ |
|
27 | + <!--[if lt IE 9]> |
|
28 | + <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> |
|
29 | + <![endif]--> |
|
30 | +$for(header-includes)$ |
|
31 | + $header-includes$ |
|
32 | +$endfor$ |
|
33 | +</head> |
|
34 | +<body> |
|
35 | +$for(include-before)$ |
|
36 | +$include-before$ |
|
37 | +$endfor$ |
|
38 | +$if(title)$ |
|
39 | +<header id="title-block-header"> |
|
40 | +<h1 class="title">$title$</h1> |
|
41 | +$if(subtitle)$ |
|
42 | +<p class="subtitle">$subtitle$</p> |
|
43 | +$endif$ |
|
44 | +$for(author)$ |
|
45 | +<p class="author">$author$</p> |
|
46 | +$endfor$ |
|
47 | +$if(date)$ |
|
48 | +<p class="date">$date$</p> |
|
49 | +$endif$ |
|
50 | +</header> |
|
51 | +$endif$ |
|
52 | +$if(toc)$ |
|
53 | +<nav id="$idprefix$TOC" role="doc-toc"> |
|
54 | +$if(toc-title)$ |
|
55 | +<h2 id="$idprefix$toc-title">$toc-title$</h2> |
|
56 | +$endif$ |
|
57 | +$table-of-contents$ |
|
58 | +</nav> |
|
59 | +$endif$ |
|
60 | +$body$ |
|
61 | +$for(include-after)$ |
|
62 | +$include-after$ |
|
63 | +$endfor$ |
|
64 | +</body> |
|
65 | +</html> |
templates/latest_changes.mustache
... | ... | @@ -0,0 +1,33 @@ |
1 | +<div id="wiki-wrapper" class="history"> |
|
2 | +<div id="head"> |
|
3 | + {{>navbar}} |
|
4 | + <h1 class="py-4">{{title}}</h1> |
|
5 | +</div> |
|
6 | + |
|
7 | +{{>pagination}} |
|
8 | + |
|
9 | +<div id="wiki-history"> |
|
10 | + |
|
11 | +<ul class="Box flex-auto"> |
|
12 | + {{#versions}} |
|
13 | + <li class="Box-row Box-row--hover-gray border-top d-flex flex-items-center"> |
|
14 | + <span class="float-left col-2" id="user-icons">{{>author_template}}</span> |
|
15 | + <span class="flex-auto col-1 text-gray-light">{{date}}</span> |
|
16 | + <span class="flex-auto col-5">{{message}}<br/> |
|
17 | + {{#files}} |
|
18 | + <span class="flex-auto col-2">{{#renamed}}{{renamed}} -> {{/renamed}}<a href="{{link}}">{{file}}</a></span><br/> |
|
19 | + {{/files}} |
|
20 | + </span> |
|
21 | + <span class="pl-4 float-right"> |
|
22 | + <a href="{{href}}" class="btn btn-outline text-mono">{{id7}}</a> |
|
23 | + </span> |
|
24 | + </li> |
|
25 | + {{/versions}} |
|
26 | +</ul> |
|
27 | + |
|
28 | + |
|
29 | +</div> |
|
30 | +<div id="footer"> |
|
31 | + |
|
32 | +</div> |
|
33 | +</div> |
templates/layout.mustache
... | ... | @@ -0,0 +1,106 @@ |
1 | +<!DOCTYPE html> |
|
2 | +<html> |
|
3 | +<head> |
|
4 | + <meta http-equiv="Content-type" content="text/html;charset=utf-8"> |
|
5 | + <meta name="MobileOptimized" content="width"> |
|
6 | + <meta name="HandheldFriendly" content="true"> |
|
7 | + <meta name="viewport" content="width=device-width"> |
|
8 | + {{#sprockets_stylesheet_tag}}app{{/sprockets_stylesheet_tag}} |
|
9 | + {{#sprockets_stylesheet_tag}}print print{{/sprockets_stylesheet_tag}} |
|
10 | + |
|
11 | + {{#css}}<link rel="stylesheet" type="text/css" href="{{custom_css}}" media="all">{{/css}} |
|
12 | + {{#noindex}}<meta name="robots" content="noindex, nofollow" />{{/noindex}} |
|
13 | + <link rel="stylesheet" href="https://0makes0.com/css/tailwind-without-preflight.css"> |
|
14 | + |
|
15 | + <script> |
|
16 | + var criticMarkup = '{{critic_markup}}'; |
|
17 | + var baseUrl = '{{base_url}}'; |
|
18 | + var uploadDest = 'uploads'; |
|
19 | + var perPageUploads = '{{per_page_uploads}}'; |
|
20 | + if (perPageUploads == 'true') { |
|
21 | + uploadDest = uploadDest + window.location.pathname.replace(/.*gollum\/[-\w]+\//, "/").replace(/\.[^/.]+$/, "").replace(baseUrl, "") |
|
22 | + } |
|
23 | + {{#page}} |
|
24 | + var pageFullPath = '{{escaped_url_path}}'; |
|
25 | + var pageFormat = '{{format}}'; |
|
26 | + {{/page}} |
|
27 | + {{#has_search_terms}} |
|
28 | + var searchTerms = [{{#search_terms}}'{{.}}', {{/search_terms}} |
|
29 | + ]; |
|
30 | + {{/has_search_terms}} |
|
31 | + {{#is_create_page}} |
|
32 | + var default_markup = '{{default_markup}}'; |
|
33 | + {{/is_create_page}} |
|
34 | + |
|
35 | + </script> |
|
36 | + {{#sprockets_javascript_tag}}app{{/sprockets_javascript_tag}} |
|
37 | + {{#has_editor}} |
|
38 | + {{#sprockets_javascript_tag}}editor{{/sprockets_javascript_tag}} |
|
39 | + {{/has_editor}} |
|
40 | + {{#mathjax}} |
|
41 | + <script type="text/javascript"> |
|
42 | + window.MathJax = { |
|
43 | + tex2jax: { |
|
44 | + inlineMath: [ ['$','$'], ['\\(','\\)'] ], |
|
45 | + displayMath: [ ['$$','$$'], ['\\[','\\]'] ], |
|
46 | + processEscapes: true |
|
47 | + }, |
|
48 | + TeX: { extensions: ["autoload-all.js"] } |
|
49 | + }; |
|
50 | + </script> |
|
51 | + {{#mathjax_config}} |
|
52 | + <script type="text/javascript" src="{{mathjax_config_path}}"></script> |
|
53 | + {{/mathjax_config}} |
|
54 | + <script defer src="{{mathjax_js}}"></script> |
|
55 | + {{/mathjax}} |
|
56 | + {{#js}}<script type="text/javascript" src="{{custom_js}}"></script>{{/js}} |
|
57 | + |
|
58 | + <title>{{title}}</title> |
|
59 | +</head> |
|
60 | +<body class="leading-relaxed"> |
|
61 | + <div id="battery" style="height: var(--battery);"> |
|
62 | + <div class="inline-block bg-pink-300 border border-pink-300 text-white p-1"> |
|
63 | + <span class="font-semibold px-1">배터리: </span><span class="px-1" id="level">?</span><span> %</span> |
|
64 | + </div> |
|
65 | + </div> |
|
66 | + |
|
67 | +<!-- |
|
68 | + <a href="/"> |
|
69 | + <img width=480 class="h-8 md:h-6 m-4" src="https://wiki.0makes0.com/uploads/0makes0_비거니즘매뉴얼_image.jpg" alt="비거니즘 전시 매뉴얼"> |
|
70 | + </a> |
|
71 | +--> |
|
72 | + |
|
73 | +<header class="lg:flex lg:max-w-screen-lg m-auto items-end justify-between px-6"> |
|
74 | + <div class="flex flex-row justify-between"> |
|
75 | + <div> |
|
76 | + <a href="http://wiki.0makes0.com/wiki"> |
|
77 | + <img class="h-50 md:h-40" src="https://wiki.0makes0.com/uploads/0makes0_비거니즘매뉴얼_image.png" alt="비거니즘 전시 매뉴얼"> |
|
78 | + </a> |
|
79 | + </div> |
|
80 | + </div> |
|
81 | + |
|
82 | + <nav class="align-text-bottom pt-4 pb-0 hidden md:flex"> |
|
83 | + <div class="w-full block flex-grow md:flex md:items-center md:w-auto"> |
|
84 | + <div class="text-base md:flex-grow"> |
|
85 | + <a href="/" class="pr-4 font-semibold text-black hover:text-gray-800 block mt-4 md:inline-block md:mt-0 ">위키</a> |
|
86 | + <a href="/book" class=" pr-4 font-semibold text-black hover:text-gray-800 block mt-4 md:inline-block md:mt-0 "><span>ver.1</span></a> |
|
87 | + <a href="https://0makes0.com" class="pr-4 font-semibold text-black hover:text-gray-800 block mt-4 md:inline-block md:mt-0"><span>제로의 예술</span></a> |
|
88 | + <a href="https://nothingmakesitself.art/Satellite-Project"> |
|
89 | + <img class="h-12 block md:inline-block md:mt-0" src="https://freight.cargo.site/t/original/i/abcd0824382cdb1e6c2efca6e3d5ae4dd8fc33f6ed88bddbfa25923073865abf/12313123100.png"> |
|
90 | + </a> |
|
91 | + </div> |
|
92 | + </div> |
|
93 | + </nav> |
|
94 | +</header> |
|
95 | + <!-- |
|
96 | + {{< user}} |
|
97 | + --> |
|
98 | +<div class="border-t-2 border-black mt-4" style="border-top-width: 2px;border-top-style: solid;"> |
|
99 | + <div class="lg:max-w-screen-lg m-auto p-2 xl:p-4"> |
|
100 | + {{{yield}}} |
|
101 | + </div> |
|
102 | + |
|
103 | +{{>server}} |
|
104 | +</div> |
|
105 | +</body> |
|
106 | +</html> |
templates/mobilenav.mustache
... | ... | @@ -0,0 +1,72 @@ |
1 | +<details class="details-reset details-overlay"> |
|
2 | + <summary class="btn btn-invisible px-2" aria-haspopup="true"> |
|
3 | + <span aria-label="Open menu" class="font-semibold text-black text-3xl">☰</span> |
|
4 | + </summary> |
|
5 | + |
|
6 | + <div class="SelectMenu mx-sm-2"> |
|
7 | + <div class="SelectMenu-modal"> |
|
8 | + <div class="SelectMenu-divider py-3"> |
|
9 | + <h2 class="h6">Current Page</h2> |
|
10 | + <div>{{page_header}}</div> |
|
11 | + </div> |
|
12 | + |
|
13 | + {{#history}} |
|
14 | + <a |
|
15 | + class="SelectMenu-item" |
|
16 | + href="{{history_path}}/{{escaped_url_path}}" |
|
17 | + role="menuitem" |
|
18 | + > |
|
19 | + <span>역사</span> |
|
20 | + </a> |
|
21 | + {{/history}} |
|
22 | + |
|
23 | + {{#allow_editing}} |
|
24 | + {{#allow_uploads}} |
|
25 | + <a class="SelectMenu-item minibutton-upload-page" role="menuitem"> |
|
26 | + <span>파일 업로드</span> |
|
27 | + </a> |
|
28 | + {{/allow_uploads}} |
|
29 | + |
|
30 | + {{#editable}} |
|
31 | + <a class="SelectMenu-item minibutton-rename-page" role="menuitem"> |
|
32 | + <span>이름 변경</span> |
|
33 | + </a> |
|
34 | + |
|
35 | + <a |
|
36 | + class="SelectMenu-item minibutton-edit-page" |
|
37 | + href="{{edit_path}}/{{escaped_url_path}}" |
|
38 | + role="menuitem" |
|
39 | + > |
|
40 | + <span>편집</span> |
|
41 | + </a> |
|
42 | + {{/editable}} |
|
43 | + {{/allow_editing}} |
|
44 | + |
|
45 | + <div class="SelectMenu-divider py-3"> |
|
46 | + <h2 class="h6">Main Menu</h2> |
|
47 | + </div> |
|
48 | + |
|
49 | + <div class="SelectMenu-list"> |
|
50 | + <a class="SelectMenu-item" role="menuitem" href="{{page_route}}"> |
|
51 | + 대문 |
|
52 | + </a> |
|
53 | + |
|
54 | + {{#overview}} |
|
55 | + <a class="SelectMenu-item" role="menuitem" href="{{overview_path}}"> |
|
56 | + 페이지 목록 |
|
57 | + </a> |
|
58 | + {{/overview}} |
|
59 | + |
|
60 | + {{#latest_changes}} |
|
61 | + <a |
|
62 | + class="SelectMenu-item" |
|
63 | + href="{{latest_changes_path}}" |
|
64 | + role="menuitem" |
|
65 | + > |
|
66 | + 최근 변경 |
|
67 | + </a> |
|
68 | + {{/latest_changes}} |
|
69 | + </div> |
|
70 | + </div> |
|
71 | + </div> |
|
72 | +</details> |
templates/navbar.mustache
... | ... | @@ -0,0 +1,107 @@ |
1 | +<nav class="TableObject actions pt-4 px-2 px-lg-0 overflow-x-scroll"> |
|
2 | + <div class="TableObject-item hide-lg hide-xl"> |
|
3 | + {{>mobilenav}} |
|
4 | + </div> |
|
5 | + |
|
6 | + <div class="TableObject-item hide-sm hide-md"> |
|
7 | + <a class="font-semibold py-2 pr-4 hover:text-black" |
|
8 | + id="minibutton-home" href="{{page_route}}"> |
|
9 | + 홈 |
|
10 | + </a> |
|
11 | + </div> |
|
12 | + |
|
13 | + <div |
|
14 | + class="TableObject-item TableObject-item--primary px-2 rounded-full" |
|
15 | + {{^search}}style="visibility:hidden"{{/search}} |
|
16 | + > |
|
17 | + {{>searchbar}} |
|
18 | + </div> |
|
19 | + |
|
20 | + <div class="TableObject-item hide-sm hide-md"> |
|
21 | + <div class="BtnGroup d-flex"> |
|
22 | + {{#overview}} |
|
23 | + <a |
|
24 | + class="font-semibold py-2 px-3 pl-5 hover:text-black" |
|
25 | + href="{{overview_path}}" |
|
26 | + id="minibutton-overview" |
|
27 | + > |
|
28 | + 페이지 목록 |
|
29 | + </a> |
|
30 | + {{/overview}} |
|
31 | + |
|
32 | + {{#latest_changes}} |
|
33 | + <a |
|
34 | + class="font-semibold py-2 px-3 hover:text-black" |
|
35 | + href="{{latest_changes_path}}" |
|
36 | + id="minibutton-latest-changes" |
|
37 | + > |
|
38 | + 최근 변경 |
|
39 | + </a> |
|
40 | + {{/latest_changes}} |
|
41 | + </div> |
|
42 | + </div> |
|
43 | + |
|
44 | + <div class="TableObject-item px-2"> |
|
45 | + <div class="BtnGroup d-flex"> |
|
46 | + {{#history}} |
|
47 | + <a |
|
48 | + class="font-semibold py-2 px-3 hidden md:inline hover:text-black" |
|
49 | + href="{{history_path}}/{{escaped_url_path}}" |
|
50 | + id="minibutton-history" |
|
51 | + > |
|
52 | + 역사 |
|
53 | + </a> |
|
54 | + {{/history}} |
|
55 | + |
|
56 | + {{#allow_editing}} |
|
57 | + {{#allow_uploads}} |
|
58 | + <button |
|
59 | + class="bg-transparent border-0 font-semibold py-2 px-3 hidden md:inline hover:underline hover:text-black |
|
60 | + minibutton-upload-page" |
|
61 | + > |
|
62 | + 파일 업로드 |
|
63 | + </button> |
|
64 | + {{/allow_uploads}} |
|
65 | + |
|
66 | + {{#editable}} |
|
67 | + <button |
|
68 | + class="bg-transparent border-0 font-semibold py-2 px-3 hidden md:inline hover:underline hover:text-black |
|
69 | + minibutton-rename-page" |
|
70 | + > |
|
71 | + 이름 변경 |
|
72 | + </button> |
|
73 | + <a |
|
74 | + class="bg-gray-300 hover:bg-gray-300 text-black font-semibold px-3 rounded inline items-center hover:text-black" |
|
75 | + href="{{edit_path}}/{{escaped_url_path}}" |
|
76 | + id="minibutton-edit-page" |
|
77 | + style="padding: 0.50rem !important; padding-left: 1rem !important; padding-right: 1rem !important;" |
|
78 | + > |
|
79 | + 편집 |
|
80 | + </a> |
|
81 | + {{/editable}} |
|
82 | + {{/allow_editing}} |
|
83 | + </div> |
|
84 | + </div> |
|
85 | + |
|
86 | + {{#allow_editing}} |
|
87 | + {{#editable}} |
|
88 | + <div class="TableObject-item"> |
|
89 | + <a |
|
90 | + class="ml-2 bg-pink-400 text-white font-semibold border border-pink-600 px-3 rounded |
|
91 | + minibutton-new-page" href="#" style="padding: 0.70rem !important;"> |
|
92 | + 새 페이지 |
|
93 | + </a> |
|
94 | + </div> |
|
95 | + {{/editable}} |
|
96 | + |
|
97 | + {{^editable}} |
|
98 | + {{#newable}} |
|
99 | + <div class="TableObject-item"> |
|
100 | + <a class="btn btn-primary btn-sm minibutton-new-page" href="#"> |
|
101 | + New |
|
102 | + </a> |
|
103 | + </div> |
|
104 | + {{/newable}} |
|
105 | + {{/editable}} |
|
106 | + {{/allow_editing}} |
|
107 | +</nav> |
templates/overview.mustache
... | ... | @@ -0,0 +1,42 @@ |
1 | +<div id="wiki-wrapper" class="results"> |
|
2 | +<div id="head" class="overview"> |
|
3 | + {{>navbar}} |
|
4 | + <h1 class="py-4">{{title}}</h1> |
|
5 | +</div> |
|
6 | +<div id="overview"> |
|
7 | + |
|
8 | +{{#has_results}} |
|
9 | + <div id="file-browser"> |
|
10 | + <div class="breadcrumb pb-4"> |
|
11 | + {{{breadcrumb}}} |
|
12 | + </div> |
|
13 | + |
|
14 | + <div class="Box"> |
|
15 | + <ul> |
|
16 | + {{#files_folders}} |
|
17 | + <li class="Box-row"> |
|
18 | + <span class="pr-2">{{{icon}}}</span> |
|
19 | + <span><a href="{{url}}">{{name}}</a></span> |
|
20 | + {{#allow_editing}} |
|
21 | + {{#is_file}}<button class="btn btn-sm float-right delete-file" data-file-path="{{file_path}}" data-confirm="Are you sure you want to delete {{name}}?">{{#octicon}}trash{{/octicon}}</button>{{/is_file}} |
|
22 | + {{/allow_editing}} |
|
23 | + </li> |
|
24 | + {{/files_folders}} |
|
25 | + </ul> |
|
26 | + </div> |
|
27 | + |
|
28 | + |
|
29 | +{{/has_results}} |
|
30 | + |
|
31 | +{{#no_results}} |
|
32 | + <p id="no-results"> |
|
33 | + There are no pages in <strong>{{current_path}}</strong> on <strong>{{ref}}</strong>. |
|
34 | + </p> |
|
35 | +{{/no_results}} |
|
36 | + |
|
37 | +</div> |
|
38 | +<div class="pt-4" id="footer"> |
|
39 | + <a href="#">Back to Top</a> |
|
40 | +</div> |
|
41 | +</div> |
|
42 | + |
templates/page.mustache
... | ... | @@ -0,0 +1,13 @@ |
1 | +<div id="wiki-wrapper" class="page"> |
|
2 | +<div id="head"> |
|
3 | + {{#navbar?}}{{>navbar}}{{/navbar?}} |
|
4 | +</div> |
|
5 | + |
|
6 | +{{>wiki_content}} |
|
7 | + |
|
8 | +<form name="rename" method="POST" action="{{rename_path}}/{{escaped_url_path}}"> |
|
9 | + <input type="hidden" name="rename"/> |
|
10 | + <input type="hidden" name="message"/> |
|
11 | +</form> |
|
12 | + |
|
13 | +</div> |
templates/pagination.mustache
... | ... | @@ -0,0 +1,6 @@ |
1 | +<nav class="paginate-container" aria-label="Pagination"> |
|
2 | + <div class="pagination" id="pagination"> |
|
3 | + <a id="prev" href="?page_num={{previous_page}}{{query_string}}" class="previous_page {{^previous_page}}disabled{{/previous_page}}">Previous</span> |
|
4 | + <a id="next" href="?page_num={{next_page}}{{query_string}}" class="next_page {{^next_page}}disabled{{/next_page}}" rel="next" aria-label="Next Page">Next</a> |
|
5 | + </div> |
|
6 | +</nav> |
|
... | ... | \ No newline at end of file |
templates/pdf.latex
... | ... | @@ -0,0 +1,497 @@ |
1 | +% Options for packages loaded elsewhere |
|
2 | +\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} |
|
3 | +\PassOptionsToPackage{hyphens}{url} |
|
4 | +$if(colorlinks)$ |
|
5 | +\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} |
|
6 | +$endif$ |
|
7 | +$if(dir)$ |
|
8 | +$if(latex-dir-rtl)$ |
|
9 | +\PassOptionsToPackage{RTLdocument}{bidi} |
|
10 | +$endif$ |
|
11 | +$endif$ |
|
12 | +$if(CJKmainfont)$ |
|
13 | +\PassOptionsToPackage{space}{xeCJK} |
|
14 | +$endif$ |
|
15 | +% |
|
16 | +\documentclass[ |
|
17 | +$if(fontsize)$ |
|
18 | + $fontsize$, |
|
19 | +$endif$ |
|
20 | +$if(lang)$ |
|
21 | + $babel-lang$, |
|
22 | +$endif$ |
|
23 | +$if(papersize)$ |
|
24 | + $papersize$paper, |
|
25 | +$endif$ |
|
26 | +$if(beamer)$ |
|
27 | + ignorenonframetext, |
|
28 | +$if(handout)$ |
|
29 | + handout, |
|
30 | +$endif$ |
|
31 | +$if(aspectratio)$ |
|
32 | + aspectratio=$aspectratio$, |
|
33 | +$endif$ |
|
34 | +$endif$ |
|
35 | +$for(classoption)$ |
|
36 | + $classoption$$sep$, |
|
37 | +$endfor$ |
|
38 | +]{$documentclass$} |
|
39 | +$if(beamer)$ |
|
40 | +$if(background-image)$ |
|
41 | +\usebackgroundtemplate{% |
|
42 | + \includegraphics[width=\paperwidth]{$background-image$}% |
|
43 | +} |
|
44 | +$endif$ |
|
45 | +\usepackage{pgfpages} |
|
46 | +\setbeamertemplate{caption}[numbered] |
|
47 | +\setbeamertemplate{caption label separator}{: } |
|
48 | +\setbeamercolor{caption name}{fg=normal text.fg} |
|
49 | +\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ |
|
50 | +$for(beameroption)$ |
|
51 | +\setbeameroption{$beameroption$} |
|
52 | +$endfor$ |
|
53 | +% Prevent slide breaks in the middle of a paragraph |
|
54 | +\widowpenalties 1 10000 |
|
55 | +\raggedbottom |
|
56 | +$if(section-titles)$ |
|
57 | +\setbeamertemplate{part page}{ |
|
58 | + \centering |
|
59 | + \begin{beamercolorbox}[sep=16pt,center]{part title} |
|
60 | + \usebeamerfont{part title}\insertpart\par |
|
61 | + \end{beamercolorbox} |
|
62 | +} |
|
63 | +\setbeamertemplate{section page}{ |
|
64 | + \centering |
|
65 | + \begin{beamercolorbox}[sep=12pt,center]{part title} |
|
66 | + \usebeamerfont{section title}\insertsection\par |
|
67 | + \end{beamercolorbox} |
|
68 | +} |
|
69 | +\setbeamertemplate{subsection page}{ |
|
70 | + \centering |
|
71 | + \begin{beamercolorbox}[sep=8pt,center]{part title} |
|
72 | + \usebeamerfont{subsection title}\insertsubsection\par |
|
73 | + \end{beamercolorbox} |
|
74 | +} |
|
75 | +\AtBeginPart{ |
|
76 | + \frame{\partpage} |
|
77 | +} |
|
78 | +\AtBeginSection{ |
|
79 | + \ifbibliography |
|
80 | + \else |
|
81 | + \frame{\sectionpage} |
|
82 | + \fi |
|
83 | +} |
|
84 | +\AtBeginSubsection{ |
|
85 | + \frame{\subsectionpage} |
|
86 | +} |
|
87 | +$endif$ |
|
88 | +$endif$ |
|
89 | +$if(beamerarticle)$ |
|
90 | +\usepackage{beamerarticle} % needs to be loaded first |
|
91 | +$endif$ |
|
92 | +$if(fontfamily)$ |
|
93 | +\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} |
|
94 | +$else$ |
|
95 | +\usepackage{lmodern} |
|
96 | +$endif$ |
|
97 | +$if(linestretch)$ |
|
98 | +\usepackage{setspace} |
|
99 | +$endif$ |
|
100 | +\usepackage{amssymb,amsmath} |
|
101 | +\usepackage{ifxetex,ifluatex} |
|
102 | +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex |
|
103 | + \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} |
|
104 | + \usepackage[utf8]{inputenc} |
|
105 | + \usepackage{textcomp} % provide euro and other symbols |
|
106 | +\else % if luatex or xetex |
|
107 | +$if(mathspec)$ |
|
108 | + \ifxetex |
|
109 | + \usepackage{mathspec} |
|
110 | + \else |
|
111 | + \usepackage{unicode-math} |
|
112 | + \fi |
|
113 | +$else$ |
|
114 | + \usepackage{unicode-math} |
|
115 | +$endif$ |
|
116 | + \defaultfontfeatures{Scale=MatchLowercase} |
|
117 | + \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} |
|
118 | +$if(mainfont)$ |
|
119 | + \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} |
|
120 | +$endif$ |
|
121 | +$if(sansfont)$ |
|
122 | + \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} |
|
123 | +$endif$ |
|
124 | +$if(monofont)$ |
|
125 | + \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$} |
|
126 | +$endif$ |
|
127 | +$for(fontfamilies)$ |
|
128 | + \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} |
|
129 | +$endfor$ |
|
130 | +$if(mathfont)$ |
|
131 | +$if(mathspec)$ |
|
132 | + \ifxetex |
|
133 | + \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} |
|
134 | + \else |
|
135 | + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} |
|
136 | + \fi |
|
137 | +$else$ |
|
138 | + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} |
|
139 | +$endif$ |
|
140 | +$endif$ |
|
141 | +$if(CJKmainfont)$ |
|
142 | + \ifxetex |
|
143 | + \usepackage{xeCJK} |
|
144 | + \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} |
|
145 | + \fi |
|
146 | +$endif$ |
|
147 | +$if(luatexjapresetoptions)$ |
|
148 | + \ifluatex |
|
149 | + \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} |
|
150 | + \fi |
|
151 | +$endif$ |
|
152 | +$if(CJKmainfont)$ |
|
153 | + \ifluatex |
|
154 | + \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} |
|
155 | + \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} |
|
156 | + \fi |
|
157 | +$endif$ |
|
158 | +\fi |
|
159 | +$if(beamer)$ |
|
160 | +$if(theme)$ |
|
161 | +\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} |
|
162 | +$endif$ |
|
163 | +$if(colortheme)$ |
|
164 | +\usecolortheme{$colortheme$} |
|
165 | +$endif$ |
|
166 | +$if(fonttheme)$ |
|
167 | +\usefonttheme{$fonttheme$} |
|
168 | +$endif$ |
|
169 | +$if(mainfont)$ |
|
170 | +\usefonttheme{serif} % use mainfont rather than sansfont for slide text |
|
171 | +$endif$ |
|
172 | +$if(innertheme)$ |
|
173 | +\useinnertheme{$innertheme$} |
|
174 | +$endif$ |
|
175 | +$if(outertheme)$ |
|
176 | +\useoutertheme{$outertheme$} |
|
177 | +$endif$ |
|
178 | +$endif$ |
|
179 | +% Use upquote if available, for straight quotes in verbatim environments |
|
180 | +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} |
|
181 | +\IfFileExists{microtype.sty}{% use microtype if available |
|
182 | + \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} |
|
183 | + \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts |
|
184 | +}{} |
|
185 | +$if(indent)$ |
|
186 | +$else$ |
|
187 | +\makeatletter |
|
188 | +\@ifundefined{KOMAClassName}{% if non-KOMA class |
|
189 | + \IfFileExists{parskip.sty}{% |
|
190 | + \usepackage{parskip} |
|
191 | + }{% else |
|
192 | + \setlength{\parindent}{0pt} |
|
193 | + \setlength{\parskip}{6pt plus 2pt minus 1pt}} |
|
194 | +}{% if KOMA class |
|
195 | + \KOMAoptions{parskip=half}} |
|
196 | +\makeatother |
|
197 | +$endif$ |
|
198 | +$if(verbatim-in-note)$ |
|
199 | +\usepackage{fancyvrb} |
|
200 | +$endif$ |
|
201 | +\usepackage{xcolor} |
|
202 | +\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available |
|
203 | +\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} |
|
204 | +\hypersetup{ |
|
205 | +$if(title-meta)$ |
|
206 | + pdftitle={$title-meta$}, |
|
207 | +$endif$ |
|
208 | +$if(author-meta)$ |
|
209 | + pdfauthor={$author-meta$}, |
|
210 | +$endif$ |
|
211 | +$if(lang)$ |
|
212 | + pdflang={$lang$}, |
|
213 | +$endif$ |
|
214 | +$if(subject)$ |
|
215 | + pdfsubject={$subject$}, |
|
216 | +$endif$ |
|
217 | +$if(keywords)$ |
|
218 | + pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, |
|
219 | +$endif$ |
|
220 | +$if(colorlinks)$ |
|
221 | + colorlinks=true, |
|
222 | + linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, |
|
223 | + filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$, |
|
224 | + citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, |
|
225 | + urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, |
|
226 | +$else$ |
|
227 | + hidelinks, |
|
228 | +$endif$ |
|
229 | + pdfcreator={LaTeX via pandoc}} |
|
230 | +\urlstyle{same} % disable monospaced font for URLs |
|
231 | +$if(verbatim-in-note)$ |
|
232 | +\VerbatimFootnotes % allow verbatim text in footnotes |
|
233 | +$endif$ |
|
234 | +$if(geometry)$ |
|
235 | +$if(beamer)$ |
|
236 | +\geometry{$for(geometry)$$geometry$$sep$,$endfor$} |
|
237 | +$else$ |
|
238 | +\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} |
|
239 | +$endif$ |
|
240 | +$endif$ |
|
241 | +$if(beamer)$ |
|
242 | +\newif\ifbibliography |
|
243 | +$endif$ |
|
244 | +$if(listings)$ |
|
245 | +\usepackage{listings} |
|
246 | +\newcommand{\passthrough}[1]{#1} |
|
247 | +\lstset{defaultdialect=[5.3]Lua} |
|
248 | +\lstset{defaultdialect=[x86masm]Assembler} |
|
249 | +$endif$ |
|
250 | +$if(lhs)$ |
|
251 | +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} |
|
252 | +$endif$ |
|
253 | +$if(highlighting-macros)$ |
|
254 | +$highlighting-macros$ |
|
255 | +$endif$ |
|
256 | +$if(tables)$ |
|
257 | +\usepackage{longtable,booktabs} |
|
258 | +$if(beamer)$ |
|
259 | +\usepackage{caption} |
|
260 | +% Make caption package work with longtable |
|
261 | +\makeatletter |
|
262 | +\def\fnum@table{\tablename~\thetable} |
|
263 | +\makeatother |
|
264 | +$else$ |
|
265 | +% Correct order of tables after \paragraph or \subparagraph |
|
266 | +\usepackage{etoolbox} |
|
267 | +\makeatletter |
|
268 | +\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} |
|
269 | +\makeatother |
|
270 | +% Allow footnotes in longtable head/foot |
|
271 | +\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} |
|
272 | +\makesavenoteenv{longtable} |
|
273 | +$endif$ |
|
274 | +$endif$ |
|
275 | +$if(graphics)$ |
|
276 | +\usepackage{graphicx} |
|
277 | +\makeatletter |
|
278 | +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} |
|
279 | +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} |
|
280 | +\makeatother |
|
281 | +% Scale images if necessary, so that they will not overflow the page |
|
282 | +% margins by default, and it is still possible to overwrite the defaults |
|
283 | +% using explicit options in \includegraphics[width, height, ...]{} |
|
284 | +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} |
|
285 | +% Set default figure placement to htbp |
|
286 | +\makeatletter |
|
287 | +\def\fps@figure{htbp} |
|
288 | +\makeatother |
|
289 | +$endif$ |
|
290 | +$if(links-as-notes)$ |
|
291 | +% Make links footnotes instead of hotlinks: |
|
292 | +\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} |
|
293 | +$endif$ |
|
294 | +$if(strikeout)$ |
|
295 | +\usepackage[normalem]{ulem} |
|
296 | +% Avoid problems with \sout in headers with hyperref |
|
297 | +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} |
|
298 | +$endif$ |
|
299 | +\setlength{\emergencystretch}{3em} % prevent overfull lines |
|
300 | +\providecommand{\tightlist}{% |
|
301 | + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} |
|
302 | +$if(numbersections)$ |
|
303 | +\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} |
|
304 | +$else$ |
|
305 | +\setcounter{secnumdepth}{-\maxdimen} % remove section numbering |
|
306 | +$endif$ |
|
307 | +$if(beamer)$ |
|
308 | +$else$ |
|
309 | +$if(block-headings)$ |
|
310 | +% Make \paragraph and \subparagraph free-standing |
|
311 | +\ifx\paragraph\undefined\else |
|
312 | + \let\oldparagraph\paragraph |
|
313 | + \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} |
|
314 | +\fi |
|
315 | +\ifx\subparagraph\undefined\else |
|
316 | + \let\oldsubparagraph\subparagraph |
|
317 | + \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} |
|
318 | +\fi |
|
319 | +$endif$ |
|
320 | +$endif$ |
|
321 | +$if(pagestyle)$ |
|
322 | +\pagestyle{$pagestyle$} |
|
323 | +$endif$ |
|
324 | +$for(header-includes)$ |
|
325 | +$header-includes$ |
|
326 | +$endfor$ |
|
327 | +$if(lang)$ |
|
328 | +\ifxetex |
|
329 | + % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic) |
|
330 | + \usepackage{polyglossia} |
|
331 | + \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} |
|
332 | +$for(polyglossia-otherlangs)$ |
|
333 | + \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} |
|
334 | +$endfor$ |
|
335 | +\else |
|
336 | + \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} |
|
337 | +$if(babel-newcommands)$ |
|
338 | + $babel-newcommands$ |
|
339 | +$endif$ |
|
340 | +\fi |
|
341 | +$endif$ |
|
342 | +$if(dir)$ |
|
343 | +\ifxetex |
|
344 | + % Load bidi as late as possible as it modifies e.g. graphicx |
|
345 | + \usepackage{bidi} |
|
346 | +\fi |
|
347 | +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex |
|
348 | + \TeXXeTstate=1 |
|
349 | + \newcommand{\RL}[1]{\beginR #1\endR} |
|
350 | + \newcommand{\LR}[1]{\beginL #1\endL} |
|
351 | + \newenvironment{RTL}{\beginR}{\endR} |
|
352 | + \newenvironment{LTR}{\beginL}{\endL} |
|
353 | +\fi |
|
354 | +$endif$ |
|
355 | +$if(natbib)$ |
|
356 | +\usepackage[$natbiboptions$]{natbib} |
|
357 | +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} |
|
358 | +$endif$ |
|
359 | +$if(biblatex)$ |
|
360 | +\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} |
|
361 | +$for(bibliography)$ |
|
362 | +\addbibresource{$bibliography$} |
|
363 | +$endfor$ |
|
364 | +$endif$ |
|
365 | +$if(csl-refs)$ |
|
366 | +\newlength{\cslhangindent} |
|
367 | +\setlength{\cslhangindent}{1.5em} |
|
368 | +\newenvironment{cslreferences}% |
|
369 | + {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% |
|
370 | + \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% |
|
371 | + {\par} |
|
372 | +$endif$ |
|
373 | + |
|
374 | +$if(title)$ |
|
375 | +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} |
|
376 | +$endif$ |
|
377 | +$if(subtitle)$ |
|
378 | +$if(beamer)$ |
|
379 | +$else$ |
|
380 | +\usepackage{etoolbox} |
|
381 | +\makeatletter |
|
382 | +\providecommand{\subtitle}[1]{% add subtitle to \maketitle |
|
383 | + \apptocmd{\@title}{\par {\large #1 \par}}{}{} |
|
384 | +} |
|
385 | +\makeatother |
|
386 | +$endif$ |
|
387 | +\subtitle{$subtitle$} |
|
388 | +$endif$ |
|
389 | +\author{$for(author)$$author$$sep$ \and $endfor$} |
|
390 | +\date{$date$} |
|
391 | +$if(beamer)$ |
|
392 | +$if(institute)$ |
|
393 | +\institute{$for(institute)$$institute$$sep$ \and $endfor$} |
|
394 | +$endif$ |
|
395 | +$if(titlegraphic)$ |
|
396 | +\titlegraphic{\includegraphics{$titlegraphic$}} |
|
397 | +$endif$ |
|
398 | +$if(logo)$ |
|
399 | +\logo{\includegraphics{$logo$}} |
|
400 | +$endif$ |
|
401 | +$endif$ |
|
402 | + |
|
403 | +\begin{document} |
|
404 | +$if(has-frontmatter)$ |
|
405 | +\frontmatter |
|
406 | +$endif$ |
|
407 | +$if(title)$ |
|
408 | +$if(beamer)$ |
|
409 | +\frame{\titlepage} |
|
410 | +$else$ |
|
411 | +\maketitle |
|
412 | +$endif$ |
|
413 | +$if(abstract)$ |
|
414 | +\begin{abstract} |
|
415 | +$abstract$ |
|
416 | +\end{abstract} |
|
417 | +$endif$ |
|
418 | +$endif$ |
|
419 | + |
|
420 | +$for(include-before)$ |
|
421 | +$include-before$ |
|
422 | + |
|
423 | +$endfor$ |
|
424 | +$if(toc)$ |
|
425 | +$if(toc-title)$ |
|
426 | +\renewcommand*\contentsname{$toc-title$} |
|
427 | +$endif$ |
|
428 | +$if(beamer)$ |
|
429 | +\begin{frame}[allowframebreaks] |
|
430 | +$if(toc-title)$ |
|
431 | + \frametitle{$toc-title$} |
|
432 | +$endif$ |
|
433 | + \tableofcontents[hideallsubsections] |
|
434 | +\end{frame} |
|
435 | +$else$ |
|
436 | +{ |
|
437 | +$if(colorlinks)$ |
|
438 | +\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} |
|
439 | +$endif$ |
|
440 | +\setcounter{tocdepth}{$toc-depth$} |
|
441 | +\tableofcontents |
|
442 | +} |
|
443 | +$endif$ |
|
444 | +$endif$ |
|
445 | +$if(lot)$ |
|
446 | +\listoftables |
|
447 | +$endif$ |
|
448 | +$if(lof)$ |
|
449 | +\listoffigures |
|
450 | +$endif$ |
|
451 | +$if(linestretch)$ |
|
452 | +\setstretch{$linestretch$} |
|
453 | +$endif$ |
|
454 | +$if(has-frontmatter)$ |
|
455 | +\mainmatter |
|
456 | +$endif$ |
|
457 | +$body$ |
|
458 | + |
|
459 | +$if(has-frontmatter)$ |
|
460 | +\backmatter |
|
461 | +$endif$ |
|
462 | +$if(natbib)$ |
|
463 | +$if(bibliography)$ |
|
464 | +$if(biblio-title)$ |
|
465 | +$if(has-chapters)$ |
|
466 | +\renewcommand\bibname{$biblio-title$} |
|
467 | +$else$ |
|
468 | +\renewcommand\refname{$biblio-title$} |
|
469 | +$endif$ |
|
470 | +$endif$ |
|
471 | +$if(beamer)$ |
|
472 | +\begin{frame}[allowframebreaks]{$biblio-title$} |
|
473 | + \bibliographytrue |
|
474 | +$endif$ |
|
475 | + \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} |
|
476 | +$if(beamer)$ |
|
477 | +\end{frame} |
|
478 | +$endif$ |
|
479 | + |
|
480 | +$endif$ |
|
481 | +$endif$ |
|
482 | +$if(biblatex)$ |
|
483 | +$if(beamer)$ |
|
484 | +\begin{frame}[allowframebreaks]{$biblio-title$} |
|
485 | + \bibliographytrue |
|
486 | + \printbibliography[heading=none] |
|
487 | +\end{frame} |
|
488 | +$else$ |
|
489 | +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ |
|
490 | +$endif$ |
|
491 | + |
|
492 | +$endif$ |
|
493 | +$for(include-after)$ |
|
494 | +$include-after$ |
|
495 | + |
|
496 | +$endfor$ |
|
497 | +\end{document} |
templates/search.mustache
... | ... | @@ -0,0 +1,44 @@ |
1 | +<div id="wiki-wrapper" class="results"> |
|
2 | + <div id="head"> |
|
3 | + {{>navbar}} |
|
4 | + <h1 class="py-4"><span class="f1-light text-gray-light">Search results for</span> {{name}}</h1> |
|
5 | + </div> |
|
6 | + |
|
7 | +{{#has_results}} |
|
8 | + |
|
9 | + {{>pagination}} |
|
10 | + |
|
11 | +<div class="Box Box--condensed search-results" id="search-results"> |
|
12 | + <ul> |
|
13 | + <div class="Box-header border-bottom p-0"></div> |
|
14 | + {{#results}} |
|
15 | + <li class="Box-row Box-row--gray"> |
|
16 | + <span class="Counter Counter--gray tooltipped tooltipped-w" aria-label="{{filename_count}} hits in filename - {{count}} hits in content">{{filename_count}} - {{count}}</span> |
|
17 | + <span class="text-bold"><a href="{{href}}">{{name}}</a></span> |
|
18 | + <button class="btn-link tooltipped tooltipped-w float-right toggle-context" aria-label="Show all {{count}} hits in this page">{{#octicon}}search{{/octicon}}</button> |
|
19 | + </li> |
|
20 | + |
|
21 | + <div class="search-context"> |
|
22 | + {{#context}} |
|
23 | + <li class="Box-row border-0"><span class="text-italic">{{.}}</span></li> |
|
24 | + {{/context}} |
|
25 | + </div> |
|
26 | + |
|
27 | + {{/results}} |
|
28 | + </ul> |
|
29 | +</div> |
|
30 | +{{/has_results}} |
|
31 | + |
|
32 | +{{#no_results}} |
|
33 | + <p id="no-results"> |
|
34 | + There are no results for your search <strong>{{query}}</strong>. |
|
35 | + </p> |
|
36 | +{{/no_results}} |
|
37 | + |
|
38 | +<div id="footer" class="mt-4"> |
|
39 | + <a class="btn" href="#">Back to Top</a> |
|
40 | +</div> |
|
41 | + |
|
42 | +</div> |
|
43 | +</div> |
|
44 | + |
templates/searchbar.mustache
... | ... | @@ -0,0 +1,3 @@ |
1 | +<form class="search-form" action="{{search_path}}" method="get" id="search-form"> |
|
2 | + <input type="text" class="form-control input-block border-black border-2 p-2 mx-1" name="q" id="search-query" placeholder="검색" aria-label="Search site" autocomplete="off"> |
|
3 | +</form> |
templates/server.mustache
... | ... | @@ -0,0 +1,54 @@ |
1 | +<div class="my-4" style="border-top-width: 2px;border-top-style: solid;" > |
|
2 | +<div class="lg:flex lg:max-w-screen-lg m-auto p-4 justify-between" > |
|
3 | + <div class="lg:mt-0" id="server"> |
|
4 | + <h2 class="font-semibold text-lg mb-2">태양광 웹 서버</h2> |
|
5 | + <span>배터리 남은 용량: </span><span id="batteryInfo"></span> <span>%</span><br/> |
|
6 | + <span>배터리 전압: </span><span id="voltage"></span> <span>V</span><br/> |
|
7 | + <span>전기 사용: </span><span id="powerConsumption"></span> <span>Watt</span><br/> |
|
8 | + <span>서버 시간: </span><span id="date"></span><br/> |
|
9 | + <span>날씨(구름량): </span><span id="forecast"></span><br/> |
|
10 | + <span id="address"> 위치: 위도 37.493423, 경도 126.834054</span><br/> |
|
11 | + </div> |
|
12 | + <div class="lg:mt-0"> |
|
13 | + <h2 class="font-semibold text-lg mb-1">제로의 예술</h2> |
|
14 | + <a href="https://barimart.wordpress.com" target="_blank"><span>바림</span></a> (광주광역시 동구 대의동 80-2 3층) <br> |
|
15 | + <a href="http://womanopentechlab.kr" target="_blank"><span>여성을 위한 열린 기술랩</span></a> (서울시 중구 을지로 157 대림상가 세운메이커스큐브 대림-동측 306호) |
|
16 | + </br> |
|
17 | + <div> |
|
18 | + <a href="https://nothingmakesitself.art/Satellite-Project"><img class="inline md:hidden mt-4 mb-1 h-16" src="https://freight.cargo.site/t/original/i/abcd0824382cdb1e6c2efca6e3d5ae4dd8fc33f6ed88bddbfa25923073865abf/12313123100.png"></a> |
|
19 | + </br> |
|
20 | + <h2 class="hidden md:block font-semibold text-lg mt-2 mb-1">한국문화예술위원회</h2> |
|
21 | + <span class="">2021 아르코 융복합 예술 페스티벌 《횡단하는 물질의 세계》</span> <br/> |
|
22 | + <span class="">2021 ARKO Art & Tech Festival Nothing Makes Itself</span> |
|
23 | + </div> |
|
24 | + </div> |
|
25 | +</div> |
|
26 | +</div> |
|
27 | +<script> |
|
28 | +var xhr = new XMLHttpRequest(); |
|
29 | +xhr.open('GET', '/server', true); |
|
30 | + |
|
31 | +// If specified, responseType must be empty string or "text" |
|
32 | +xhr.responseType = 'text'; |
|
33 | + |
|
34 | +xhr.onload = function () { |
|
35 | + if (xhr.readyState === xhr.DONE) { |
|
36 | + if (xhr.status === 200) { |
|
37 | + console.log(xhr.responseText); |
|
38 | + const res = JSON.parse(xhr.responseText); |
|
39 | + console.log(res.battery); |
|
40 | + //document.getElementById('server').innerText = xhr.responseText; |
|
41 | + document.getElementById('batteryInfo').innerText = res.battery.toString(); |
|
42 | + document.getElementById('voltage').innerText = res.voltage; |
|
43 | + document.getElementById('powerConsumption').innerText = res.powerConsumption; |
|
44 | + document.getElementById('date').innerText = res.date; |
|
45 | + document.getElementById('forecast').innerText = res.forecast; |
|
46 | + var r = document.querySelector(':root'); |
|
47 | + r.style.setProperty('--battery', res.battery.toString() + '%'); |
|
48 | + document.getElementById('level').innerText = res.battery; |
|
49 | + } |
|
50 | + } |
|
51 | +}; |
|
52 | + |
|
53 | +xhr.send(null); |
|
54 | +</script> |
templates/style.css
... | ... | @@ -0,0 +1,361 @@ |
1 | +/* |
|
2 | + * Custom CSS file. Override it as you like. |
|
3 | + * |
|
4 | + * Credits to @killercup (https://gist.github.com/killercup); Extracted from this Gist: |
|
5 | + * https://gist.github.com/killercup/5917178 |
|
6 | + */ |
|
7 | + |
|
8 | +html { |
|
9 | + font-size: 100%; |
|
10 | + overflow-y: scroll; |
|
11 | + -webkit-text-size-adjust: 100%; |
|
12 | + -ms-text-size-adjust: 100%; |
|
13 | +} |
|
14 | + |
|
15 | +body { |
|
16 | + color: #444; |
|
17 | + font-family: Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif; |
|
18 | + font-size: 12px; |
|
19 | + line-height: 1.7; |
|
20 | + padding: 1em; |
|
21 | + margin: auto; |
|
22 | + max-width: 42em; |
|
23 | + background: #fefefe; |
|
24 | +} |
|
25 | + |
|
26 | +a { |
|
27 | + color: #0645ad; |
|
28 | + text-decoration: none; |
|
29 | +} |
|
30 | + |
|
31 | +a:visited { |
|
32 | + color: #0b0080; |
|
33 | +} |
|
34 | + |
|
35 | +a:hover { |
|
36 | + color: #06e; |
|
37 | +} |
|
38 | + |
|
39 | +a:active { |
|
40 | + color: #faa700; |
|
41 | +} |
|
42 | + |
|
43 | +a:focus { |
|
44 | + outline: thin dotted; |
|
45 | +} |
|
46 | + |
|
47 | +*::-moz-selection { |
|
48 | + background: rgba(255, 255, 0, 0.3); |
|
49 | + color: #000; |
|
50 | +} |
|
51 | + |
|
52 | +*::selection { |
|
53 | + background: rgba(255, 255, 0, 0.3); |
|
54 | + color: #000; |
|
55 | +} |
|
56 | + |
|
57 | +a::-moz-selection { |
|
58 | + background: rgba(255, 255, 0, 0.3); |
|
59 | + color: #0645ad; |
|
60 | +} |
|
61 | + |
|
62 | +a::selection { |
|
63 | + background: rgba(255, 255, 0, 0.3); |
|
64 | + color: #0645ad; |
|
65 | +} |
|
66 | + |
|
67 | +p { |
|
68 | + margin: 1em 0; |
|
69 | +} |
|
70 | + |
|
71 | +img { |
|
72 | + max-width: 100%; |
|
73 | +} |
|
74 | + |
|
75 | +h1, |
|
76 | +h2, |
|
77 | +h3, |
|
78 | +h4, |
|
79 | +h5, |
|
80 | +h6 { |
|
81 | + color: #111; |
|
82 | + line-height: 125%; |
|
83 | + margin-top: 2em; |
|
84 | + font-weight: normal; |
|
85 | +} |
|
86 | + |
|
87 | +h4, |
|
88 | +h5, |
|
89 | +h6 { |
|
90 | + font-weight: bold; |
|
91 | +} |
|
92 | + |
|
93 | +h1 { |
|
94 | + font-size: 2.5em; |
|
95 | +} |
|
96 | + |
|
97 | +h2 { |
|
98 | + font-size: 2em; |
|
99 | +} |
|
100 | + |
|
101 | +h3 { |
|
102 | + font-size: 1.5em; |
|
103 | +} |
|
104 | + |
|
105 | +h4 { |
|
106 | + font-size: 1.2em; |
|
107 | +} |
|
108 | + |
|
109 | +h5 { |
|
110 | + font-size: 1em; |
|
111 | +} |
|
112 | + |
|
113 | +h6 { |
|
114 | + font-size: 0.9em; |
|
115 | +} |
|
116 | + |
|
117 | +blockquote { |
|
118 | + color: #666666; |
|
119 | + margin: 0; |
|
120 | + padding-left: 3em; |
|
121 | + border-left: 0.5em #EEE solid; |
|
122 | +} |
|
123 | + |
|
124 | +hr { |
|
125 | + display: block; |
|
126 | + height: 2px; |
|
127 | + border: 0; |
|
128 | + border-top: 1px solid #aaa; |
|
129 | + border-bottom: 1px solid #eee; |
|
130 | + margin: 1em 0; |
|
131 | + padding: 0; |
|
132 | +} |
|
133 | + |
|
134 | +pre, |
|
135 | +code, |
|
136 | +kbd, |
|
137 | +samp { |
|
138 | + color: #000; |
|
139 | + font-family: monospace, monospace; |
|
140 | + _font-family: 'courier new', monospace; |
|
141 | + font-size: 0.98em; |
|
142 | +} |
|
143 | + |
|
144 | +pre { |
|
145 | + white-space: pre; |
|
146 | + white-space: pre-wrap; |
|
147 | + word-wrap: break-word; |
|
148 | +} |
|
149 | + |
|
150 | +b, |
|
151 | +strong { |
|
152 | + font-weight: bold; |
|
153 | +} |
|
154 | + |
|
155 | +dfn { |
|
156 | + font-style: italic; |
|
157 | +} |
|
158 | + |
|
159 | +ins { |
|
160 | + background: #ff9; |
|
161 | + color: #000; |
|
162 | + text-decoration: none; |
|
163 | +} |
|
164 | + |
|
165 | +mark { |
|
166 | + background: #ff0; |
|
167 | + color: #000; |
|
168 | + font-style: italic; |
|
169 | + font-weight: bold; |
|
170 | +} |
|
171 | + |
|
172 | +sub, |
|
173 | +sup { |
|
174 | + font-size: 75%; |
|
175 | + line-height: 0; |
|
176 | + position: relative; |
|
177 | + vertical-align: baseline; |
|
178 | +} |
|
179 | + |
|
180 | +sup { |
|
181 | + top: -0.5em; |
|
182 | +} |
|
183 | + |
|
184 | +sub { |
|
185 | + bottom: -0.25em; |
|
186 | +} |
|
187 | + |
|
188 | +ul, |
|
189 | +ol { |
|
190 | + margin: 1em 0; |
|
191 | + padding: 0 0 0 2em; |
|
192 | +} |
|
193 | + |
|
194 | +li p:last-child { |
|
195 | + margin-bottom: 0; |
|
196 | +} |
|
197 | + |
|
198 | +ul ul, |
|
199 | +ol ol { |
|
200 | + margin: .3em 0; |
|
201 | +} |
|
202 | + |
|
203 | +dl { |
|
204 | + margin-bottom: 1em; |
|
205 | +} |
|
206 | + |
|
207 | +dt { |
|
208 | + font-weight: bold; |
|
209 | + margin-bottom: .8em; |
|
210 | +} |
|
211 | + |
|
212 | +dd { |
|
213 | + margin: 0 0 .8em 2em; |
|
214 | +} |
|
215 | + |
|
216 | +dd:last-child { |
|
217 | + margin-bottom: 0; |
|
218 | +} |
|
219 | + |
|
220 | +img { |
|
221 | + border: 0; |
|
222 | + -ms-interpolation-mode: bicubic; |
|
223 | + vertical-align: middle; |
|
224 | +} |
|
225 | + |
|
226 | +figure { |
|
227 | + display: block; |
|
228 | + text-align: center; |
|
229 | + margin: 1em 0; |
|
230 | +} |
|
231 | + |
|
232 | +figure img { |
|
233 | + border: none; |
|
234 | + margin: 0 auto; |
|
235 | +} |
|
236 | + |
|
237 | +figcaption { |
|
238 | + font-size: 0.8em; |
|
239 | + font-style: italic; |
|
240 | + margin: 0 0 .8em; |
|
241 | +} |
|
242 | + |
|
243 | +table { |
|
244 | + margin-bottom: 2em; |
|
245 | + border-bottom: 1px solid #ddd; |
|
246 | + border-right: 1px solid #ddd; |
|
247 | + border-spacing: 0; |
|
248 | + border-collapse: collapse; |
|
249 | +} |
|
250 | + |
|
251 | +table th { |
|
252 | + padding: .2em 1em; |
|
253 | + background-color: #eee; |
|
254 | + border-top: 1px solid #ddd; |
|
255 | + border-left: 1px solid #ddd; |
|
256 | +} |
|
257 | + |
|
258 | +table td { |
|
259 | + padding: .2em 1em; |
|
260 | + border-top: 1px solid #ddd; |
|
261 | + border-left: 1px solid #ddd; |
|
262 | + vertical-align: top; |
|
263 | +} |
|
264 | + |
|
265 | +.author { |
|
266 | + font-size: 1.2em; |
|
267 | + text-align: center; |
|
268 | +} |
|
269 | + |
|
270 | +@media only screen and (min-width: 480px) { |
|
271 | + body { |
|
272 | + font-size: 14px; |
|
273 | + } |
|
274 | +} |
|
275 | + |
|
276 | +@media only screen and (min-width: 768px) { |
|
277 | + body { |
|
278 | + font-size: 16px; |
|
279 | + } |
|
280 | +} |
|
281 | + |
|
282 | +@media print { |
|
283 | + * { |
|
284 | + background: transparent !important; |
|
285 | + color: black !important; |
|
286 | + filter: none !important; |
|
287 | + -ms-filter: none !important; |
|
288 | + } |
|
289 | + body { |
|
290 | + font-size: 12pt; |
|
291 | + max-width: 100%; |
|
292 | + } |
|
293 | + a, |
|
294 | + a:visited { |
|
295 | + text-decoration: underline; |
|
296 | + } |
|
297 | + hr { |
|
298 | + height: 1px; |
|
299 | + border: 0; |
|
300 | + border-bottom: 1px solid black; |
|
301 | + } |
|
302 | + a[href]:after { |
|
303 | + content: " (" attr(href) ")"; |
|
304 | + } |
|
305 | + abbr[title]:after { |
|
306 | + content: " (" attr(title) ")"; |
|
307 | + } |
|
308 | + .ir a:after, |
|
309 | + a[href^="javascript:"]:after, |
|
310 | + a[href^="#"]:after { |
|
311 | + content: ""; |
|
312 | + } |
|
313 | + pre, |
|
314 | + blockquote { |
|
315 | + border: 1px solid #999; |
|
316 | + padding-right: 1em; |
|
317 | + page-break-inside: avoid; |
|
318 | + } |
|
319 | + tr, |
|
320 | + img { |
|
321 | + page-break-inside: avoid; |
|
322 | + } |
|
323 | + img { |
|
324 | + max-width: 100% !important; |
|
325 | + } |
|
326 | + @page :left { |
|
327 | + margin: 15mm 20mm 15mm 10mm; |
|
328 | + } |
|
329 | + @page :right { |
|
330 | + margin: 15mm 10mm 15mm 20mm; |
|
331 | + } |
|
332 | + p, |
|
333 | + h2, |
|
334 | + h3 { |
|
335 | + orphans: 3; |
|
336 | + widows: 3; |
|
337 | + } |
|
338 | + h2, |
|
339 | + h3 { |
|
340 | + page-break-after: avoid; |
|
341 | + } |
|
342 | +} |
|
343 | + |
|
344 | +/* vegan wiki */ |
|
345 | +/* @section user */ |
|
346 | +#user p { |
|
347 | + text-align: right; |
|
348 | + padding-right:0.5em; |
|
349 | + font-size: .8em; |
|
350 | + line-height: 2.0em; |
|
351 | + color: #999; |
|
352 | +} |
|
353 | + |
|
354 | +:root { |
|
355 | + --blue: #1e90ff; |
|
356 | + --white: #ffffff; |
|
357 | +} |
|
358 | + |
|
359 | +body { |
|
360 | + background-color: var(--blue); |
|
361 | +} |
templates/user.mustache
... | ... | @@ -0,0 +1,10 @@ |
1 | +<div id="user"> |
|
2 | + <p> |
|
3 | + {{#user_authed}} |
|
4 | + {{user_name}} | {{user_provider}} | <strong><a href="/__omnigollum__/logout">[Logout]</a></strong> |
|
5 | + {{/user_authed}} |
|
6 | + {{^user_authed}} |
|
7 | + not logged in | <strong><a href="/__omnigollum__/login">[Login]</a></strong> |
|
8 | + {{/user_authed}} |
|
9 | + <p> |
|
10 | +</div> |
templates/wiki_content.mustache
... | ... | @@ -0,0 +1,61 @@ |
1 | +<div id="wiki-content" class="px-2 px-lg-0"> |
|
2 | + <h1 class="py-2" style="margin-top: 1.0em;">{{page_header}}</h1> |
|
3 | + <div class="breadcrumb">{{{breadcrumb}}}</div> |
|
4 | + |
|
5 | + <div class="{{#has_header}}has-header{{/has_header}}{{#has_footer}} has-footer{{/has_footer}}{{#has_sidebar}} has-sidebar has-{{bar_side}}bar{{/has_sidebar}}{{#has_toc}} has-toc{{/has_toc}}"> |
|
6 | + {{#has_toc}} |
|
7 | + <div id="wiki-toc-main"> |
|
8 | + {{{toc_content}}} |
|
9 | + </div> |
|
10 | + {{/has_toc}} |
|
11 | + <div id="wiki-body" class="gollum-{{format}}-content"> |
|
12 | + {{#has_header}} |
|
13 | + <div id="wiki-header" class="gollum-{{header_format}}-content"> |
|
14 | + <div id="header-content" class="markdown-body"> |
|
15 | + {{{header_content}}} |
|
16 | + </div> |
|
17 | + </div> |
|
18 | + {{/has_header}} |
|
19 | + <div class="main-content"> |
|
20 | + <div class="markdown-body {{#header_enum?}}header-enum{{/header_enum?}} {{#has_sidebar}}float-md-{{body_side}} col-md-9{{/has_sidebar}}" {{#header_enum?}}style="--header-enum-style:{{header_enum_style}};"{{/header_enum?}}> |
|
21 | + {{{rendered_metadata}}} |
|
22 | + {{{content}}} |
|
23 | + </div> |
|
24 | + {{#has_sidebar}} |
|
25 | + <div id="wiki-sidebar" class="Box Box--condensed float-md-{{body_side}} col-md-3"> |
|
26 | + <div id="sidebar-content" class="gollum-{{sidebar_format}}-content markdown-body px-4"> |
|
27 | + {{{sidebar_content}}} |
|
28 | + </div> |
|
29 | + </div> |
|
30 | + {{/has_sidebar}} |
|
31 | + </div> |
|
32 | + </div> |
|
33 | + {{#has_footer}} |
|
34 | + <div id="wiki-footer" class="gollum-{{footer_format}}-content my-2"> |
|
35 | + <div id="footer-content" class="Box Box-condensed markdown-body px-4"> |
|
36 | + {{{footer_content}}} |
|
37 | + </div> |
|
38 | + </div> |
|
39 | + {{/has_footer}} |
|
40 | + |
|
41 | + </div> |
|
42 | + |
|
43 | + <!-- |
|
44 | + <div id="footer" class="pt-4"> |
|
45 | + {{^historical}} |
|
46 | + {{^preview}} |
|
47 | + <p id="last-edit"><div class="dotted-spinner hidden"></div> <a id="page-info-toggle" data-pagepath="{{escaped_url_path}}">When was this page last modified?</a></p> |
|
48 | + {{#allow_editing}} |
|
49 | + <p> |
|
50 | + <a id="delete-link" href="{{escaped_url_path}}" data-confirm="Are you sure you want to delete this page?"><span>Delete this Page</span></a> |
|
51 | + </p> |
|
52 | + {{/allow_editing}} |
|
53 | + {{/preview}} |
|
54 | + {{/historical}} |
|
55 | + {{#historical}} |
|
56 | + <p>This version of the page was edited by <b>{{author}}</b> at {{date}}. <a href="{{full_url_path}}">View the most recent version.</a></p> |
|
57 | + {{/historical}} |
|
58 | + </div> |
|
59 | + --> |
|
60 | + |
|
61 | +</div> |
theme/css/general.css
... | ... | @@ -0,0 +1,181 @@ |
1 | +/* Base styles and content styles */ |
|
2 | + |
|
3 | +@import 'variables.css'; |
|
4 | + |
|
5 | +:root { |
|
6 | + /* Browser default font-size is 16px, this way 1 rem = 10px */ |
|
7 | + font-size: 62.5%; |
|
8 | +} |
|
9 | + |
|
10 | +html { |
|
11 | + font-family: "Open Sans", sans-serif; |
|
12 | + color: var(--fg); |
|
13 | + background-color: var(--bg); |
|
14 | + text-size-adjust: none; |
|
15 | +} |
|
16 | + |
|
17 | +body { |
|
18 | + margin: 0; |
|
19 | + font-size: 1.6rem; |
|
20 | + overflow-x: hidden; |
|
21 | +} |
|
22 | + |
|
23 | +code { |
|
24 | + font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important; |
|
25 | + font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */ |
|
26 | +} |
|
27 | + |
|
28 | +/* Don't change font size in headers. */ |
|
29 | +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { |
|
30 | + font-size: unset; |
|
31 | +} |
|
32 | + |
|
33 | +.left { float: left; } |
|
34 | +.right { float: right; } |
|
35 | +.boring { opacity: 0.6; } |
|
36 | +.hide-boring .boring { display: none; } |
|
37 | +.hidden { display: none !important; } |
|
38 | + |
|
39 | +h2, h3 { margin-top: 2.5em; } |
|
40 | +h4, h5 { margin-top: 2em; } |
|
41 | + |
|
42 | +.header + .header h3, |
|
43 | +.header + .header h4, |
|
44 | +.header + .header h5 { |
|
45 | + margin-top: 1em; |
|
46 | +} |
|
47 | + |
|
48 | +h1:target::before, |
|
49 | +h2:target::before, |
|
50 | +h3:target::before, |
|
51 | +h4:target::before, |
|
52 | +h5:target::before, |
|
53 | +h6:target::before { |
|
54 | + display: inline-block; |
|
55 | + content: "»"; |
|
56 | + margin-left: -30px; |
|
57 | + width: 30px; |
|
58 | +} |
|
59 | + |
|
60 | +/* This is broken on Safari as of version 14, but is fixed |
|
61 | + in Safari Technology Preview 117 which I think will be Safari 14.2. |
|
62 | + https://bugs.webkit.org/show_bug.cgi?id=218076 |
|
63 | +*/ |
|
64 | +:target { |
|
65 | + scroll-margin-top: calc(var(--menu-bar-height) + 0.5em); |
|
66 | +} |
|
67 | + |
|
68 | +.page { |
|
69 | + outline: 0; |
|
70 | + padding: 0 var(--page-padding); |
|
71 | + margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */ |
|
72 | +} |
|
73 | +.page-wrapper { |
|
74 | + box-sizing: border-box; |
|
75 | +} |
|
76 | +.js:not(.sidebar-resizing) .page-wrapper { |
|
77 | + transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */ |
|
78 | +} |
|
79 | + |
|
80 | +.content { |
|
81 | + overflow-y: auto; |
|
82 | + padding: 0 15px; |
|
83 | + padding-bottom: 50px; |
|
84 | +} |
|
85 | +.content main { |
|
86 | + margin-left: auto; |
|
87 | + margin-right: auto; |
|
88 | + max-width: var(--content-max-width); |
|
89 | +} |
|
90 | +.content p { line-height: 2.0em; } |
|
91 | +.content ol { line-height: 2.0em; } |
|
92 | +.content ul { line-height: 2.0em; } |
|
93 | +.content a { text-decoration: none; } |
|
94 | +.content a:hover { text-decoration: underline; } |
|
95 | +.content img, .content video { max-width: 100%; } |
|
96 | +.content .header:link, |
|
97 | +.content .header:visited { |
|
98 | + color: var(--fg); |
|
99 | +} |
|
100 | +.content .header:link, |
|
101 | +.content .header:visited:hover { |
|
102 | + text-decoration: none; |
|
103 | +} |
|
104 | + |
|
105 | +table { |
|
106 | + margin: 0 auto; |
|
107 | + border-collapse: collapse; |
|
108 | +} |
|
109 | +table td { |
|
110 | + padding: 3px 20px; |
|
111 | + border: 1px var(--table-border-color) solid; |
|
112 | +} |
|
113 | +table thead { |
|
114 | + background: var(--table-header-bg); |
|
115 | +} |
|
116 | +table thead td { |
|
117 | + font-weight: 700; |
|
118 | + border: none; |
|
119 | +} |
|
120 | +table thead th { |
|
121 | + padding: 3px 20px; |
|
122 | +} |
|
123 | +table thead tr { |
|
124 | + border: 1px var(--table-header-bg) solid; |
|
125 | +} |
|
126 | +/* Alternate background colors for rows */ |
|
127 | +table tbody tr:nth-child(2n) { |
|
128 | + background: var(--table-alternate-bg); |
|
129 | +} |
|
130 | + |
|
131 | + |
|
132 | +blockquote { |
|
133 | + margin: 20px 0; |
|
134 | + padding: 0 20px; |
|
135 | + color: var(--fg); |
|
136 | + background-color: var(--quote-bg); |
|
137 | + border-top: .1em solid var(--quote-border); |
|
138 | + border-bottom: .1em solid var(--quote-border); |
|
139 | +} |
|
140 | + |
|
141 | + |
|
142 | +:not(.footnote-definition) + .footnote-definition, |
|
143 | +.footnote-definition + :not(.footnote-definition) { |
|
144 | + margin-top: 2em; |
|
145 | +} |
|
146 | +.footnote-definition { |
|
147 | + font-size: 0.9em; |
|
148 | + margin: 0.5em 0; |
|
149 | +} |
|
150 | +.footnote-definition p { |
|
151 | + display: inline; |
|
152 | +} |
|
153 | + |
|
154 | +.tooltiptext { |
|
155 | + position: absolute; |
|
156 | + visibility: hidden; |
|
157 | + color: #fff; |
|
158 | + background-color: #333; |
|
159 | + transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */ |
|
160 | + left: -8px; /* Half of the width of the icon */ |
|
161 | + top: -35px; |
|
162 | + font-size: 0.8em; |
|
163 | + text-align: center; |
|
164 | + border-radius: 6px; |
|
165 | + padding: 5px 8px; |
|
166 | + margin: 5px; |
|
167 | + z-index: 1000; |
|
168 | +} |
|
169 | +.tooltipped .tooltiptext { |
|
170 | + visibility: visible; |
|
171 | +} |
|
172 | + |
|
173 | +.chapter li.part-title { |
|
174 | + color: var(--sidebar-fg); |
|
175 | + margin: 5px 0px; |
|
176 | + font-weight: bold; |
|
177 | +} |
|
178 | + |
|
179 | +.result-no-output { |
|
180 | + font-style: italic; |
|
181 | +} |
theme/css/variables.css
... | ... | @@ -0,0 +1,295 @@ |
1 | + |
|
2 | +/* Globals */ |
|
3 | + |
|
4 | +:root { |
|
5 | + --sidebar-width: 300px; |
|
6 | + --page-padding: 15px; |
|
7 | + --content-max-width: 750px; |
|
8 | + --menu-bar-height: 50px; |
|
9 | +} |
|
10 | + |
|
11 | +/* Themes */ |
|
12 | + |
|
13 | +.ayu { |
|
14 | + --bg: hsl(210, 25%, 8%); |
|
15 | + --fg: #c5c5c5; |
|
16 | + |
|
17 | + --sidebar-bg: #14191f; |
|
18 | + --sidebar-fg: #c8c9db; |
|
19 | + --sidebar-non-existant: #5c6773; |
|
20 | + --sidebar-active: #ffb454; |
|
21 | + --sidebar-spacer: #2d334f; |
|
22 | + |
|
23 | + --scrollbar: var(--sidebar-fg); |
|
24 | + |
|
25 | + --icons: #737480; |
|
26 | + --icons-hover: #b7b9cc; |
|
27 | + |
|
28 | + --links: #0096cf; |
|
29 | + |
|
30 | + --inline-code-color: #ffb454; |
|
31 | + |
|
32 | + --theme-popup-bg: #14191f; |
|
33 | + --theme-popup-border: #5c6773; |
|
34 | + --theme-hover: #191f26; |
|
35 | + |
|
36 | + --quote-bg: hsl(226, 15%, 17%); |
|
37 | + --quote-border: hsl(226, 15%, 22%); |
|
38 | + |
|
39 | + --table-border-color: hsl(210, 25%, 13%); |
|
40 | + --table-header-bg: hsl(210, 25%, 28%); |
|
41 | + --table-alternate-bg: hsl(210, 25%, 11%); |
|
42 | + |
|
43 | + --searchbar-border-color: #848484; |
|
44 | + --searchbar-bg: #424242; |
|
45 | + --searchbar-fg: #fff; |
|
46 | + --searchbar-shadow-color: #d4c89f; |
|
47 | + --searchresults-header-fg: #666; |
|
48 | + --searchresults-border-color: #888; |
|
49 | + --searchresults-li-bg: #252932; |
|
50 | + --search-mark-bg: #e3b171; |
|
51 | +} |
|
52 | + |
|
53 | +.coal { |
|
54 | + --bg: hsl(200, 7%, 8%); |
|
55 | + --fg: #98a3ad; |
|
56 | + |
|
57 | + --sidebar-bg: #292c2f; |
|
58 | + --sidebar-fg: #a1adb8; |
|
59 | + --sidebar-non-existant: #505254; |
|
60 | + --sidebar-active: #3473ad; |
|
61 | + --sidebar-spacer: #393939; |
|
62 | + |
|
63 | + --scrollbar: var(--sidebar-fg); |
|
64 | + |
|
65 | + --icons: #43484d; |
|
66 | + --icons-hover: #b3c0cc; |
|
67 | + |
|
68 | + --links: #2b79a2; |
|
69 | + |
|
70 | + --inline-code-color: #c5c8c6;; |
|
71 | + |
|
72 | + --theme-popup-bg: #141617; |
|
73 | + --theme-popup-border: #43484d; |
|
74 | + --theme-hover: #1f2124; |
|
75 | + |
|
76 | + --quote-bg: hsl(234, 21%, 18%); |
|
77 | + --quote-border: hsl(234, 21%, 23%); |
|
78 | + |
|
79 | + --table-border-color: hsl(200, 7%, 13%); |
|
80 | + --table-header-bg: hsl(200, 7%, 28%); |
|
81 | + --table-alternate-bg: hsl(200, 7%, 11%); |
|
82 | + |
|
83 | + --searchbar-border-color: #aaa; |
|
84 | + --searchbar-bg: #b7b7b7; |
|
85 | + --searchbar-fg: #000; |
|
86 | + --searchbar-shadow-color: #aaa; |
|
87 | + --searchresults-header-fg: #666; |
|
88 | + --searchresults-border-color: #98a3ad; |
|
89 | + --searchresults-li-bg: #2b2b2f; |
|
90 | + --search-mark-bg: #355c7d; |
|
91 | +} |
|
92 | + |
|
93 | +.light { |
|
94 | + --bg: hsl(0, 0%, 100%); |
|
95 | + --fg: hsl(0, 0%, 0%); |
|
96 | + |
|
97 | + --sidebar-bg: #fafafa; |
|
98 | + --sidebar-fg: hsl(0, 0%, 0%); |
|
99 | + --sidebar-non-existant: #aaaaaa; |
|
100 | + --sidebar-active: #1f1fff; |
|
101 | + --sidebar-spacer: #f4f4f4; |
|
102 | + |
|
103 | + --scrollbar: #8F8F8F; |
|
104 | + |
|
105 | + --icons: #747474; |
|
106 | + --icons-hover: #000000; |
|
107 | + |
|
108 | + --links: #20609f; |
|
109 | + |
|
110 | + --inline-code-color: #301900; |
|
111 | + |
|
112 | + --theme-popup-bg: #fafafa; |
|
113 | + --theme-popup-border: #cccccc; |
|
114 | + --theme-hover: #e6e6e6; |
|
115 | + |
|
116 | + --quote-bg: hsl(197, 37%, 96%); |
|
117 | + --quote-border: hsl(197, 37%, 91%); |
|
118 | + |
|
119 | + --table-border-color: hsl(0, 0%, 95%); |
|
120 | + --table-header-bg: hsl(0, 0%, 80%); |
|
121 | + --table-alternate-bg: hsl(0, 0%, 97%); |
|
122 | + |
|
123 | + --searchbar-border-color: #aaa; |
|
124 | + --searchbar-bg: #fafafa; |
|
125 | + --searchbar-fg: #000; |
|
126 | + --searchbar-shadow-color: #aaa; |
|
127 | + --searchresults-header-fg: #666; |
|
128 | + --searchresults-border-color: #888; |
|
129 | + --searchresults-li-bg: #e4f2fe; |
|
130 | + --search-mark-bg: #a2cff5; |
|
131 | +} |
|
132 | + |
|
133 | +.navy { |
|
134 | + --bg: hsl(226, 23%, 11%); |
|
135 | + --fg: #bcbdd0; |
|
136 | + |
|
137 | + --sidebar-bg: #282d3f; |
|
138 | + --sidebar-fg: #c8c9db; |
|
139 | + --sidebar-non-existant: #505274; |
|
140 | + --sidebar-active: #2b79a2; |
|
141 | + --sidebar-spacer: #2d334f; |
|
142 | + |
|
143 | + --scrollbar: var(--sidebar-fg); |
|
144 | + |
|
145 | + --icons: #737480; |
|
146 | + --icons-hover: #b7b9cc; |
|
147 | + |
|
148 | + --links: #2b79a2; |
|
149 | + |
|
150 | + --inline-code-color: #c5c8c6;; |
|
151 | + |
|
152 | + --theme-popup-bg: #161923; |
|
153 | + --theme-popup-border: #737480; |
|
154 | + --theme-hover: #282e40; |
|
155 | + |
|
156 | + --quote-bg: hsl(226, 15%, 17%); |
|
157 | + --quote-border: hsl(226, 15%, 22%); |
|
158 | + |
|
159 | + --table-border-color: hsl(226, 23%, 16%); |
|
160 | + --table-header-bg: hsl(226, 23%, 31%); |
|
161 | + --table-alternate-bg: hsl(226, 23%, 14%); |
|
162 | + |
|
163 | + --searchbar-border-color: #aaa; |
|
164 | + --searchbar-bg: #aeaec6; |
|
165 | + --searchbar-fg: #000; |
|
166 | + --searchbar-shadow-color: #aaa; |
|
167 | + --searchresults-header-fg: #5f5f71; |
|
168 | + --searchresults-border-color: #5c5c68; |
|
169 | + --searchresults-li-bg: #242430; |
|
170 | + --search-mark-bg: #a2cff5; |
|
171 | +} |
|
172 | + |
|
173 | +.rust { |
|
174 | + --bg: hsl(60, 9%, 87%); |
|
175 | + --fg: #262625; |
|
176 | + |
|
177 | + --sidebar-bg: #3b2e2a; |
|
178 | + --sidebar-fg: #c8c9db; |
|
179 | + --sidebar-non-existant: #505254; |
|
180 | + --sidebar-active: #e69f67; |
|
181 | + --sidebar-spacer: #45373a; |
|
182 | + |
|
183 | + --scrollbar: var(--sidebar-fg); |
|
184 | + |
|
185 | + --icons: #737480; |
|
186 | + --icons-hover: #262625; |
|
187 | + |
|
188 | + --links: #2b79a2; |
|
189 | + |
|
190 | + --inline-code-color: #6e6b5e; |
|
191 | + |
|
192 | + --theme-popup-bg: #e1e1db; |
|
193 | + --theme-popup-border: #b38f6b; |
|
194 | + --theme-hover: #99908a; |
|
195 | + |
|
196 | + --quote-bg: hsl(60, 5%, 75%); |
|
197 | + --quote-border: hsl(60, 5%, 70%); |
|
198 | + |
|
199 | + --table-border-color: hsl(60, 9%, 82%); |
|
200 | + --table-header-bg: #b3a497; |
|
201 | + --table-alternate-bg: hsl(60, 9%, 84%); |
|
202 | + |
|
203 | + --searchbar-border-color: #aaa; |
|
204 | + --searchbar-bg: #fafafa; |
|
205 | + --searchbar-fg: #000; |
|
206 | + --searchbar-shadow-color: #aaa; |
|
207 | + --searchresults-header-fg: #666; |
|
208 | + --searchresults-border-color: #888; |
|
209 | + --searchresults-li-bg: #dec2a2; |
|
210 | + --search-mark-bg: #e69f67; |
|
211 | +} |
|
212 | + |
|
213 | +@media (prefers-color-scheme: dark) { |
|
214 | + .light.no-js { |
|
215 | + --bg: hsl(200, 7%, 8%); |
|
216 | + --fg: #98a3ad; |
|
217 | + |
|
218 | + --sidebar-bg: #292c2f; |
|
219 | + --sidebar-fg: #a1adb8; |
|
220 | + --sidebar-non-existant: #505254; |
|
221 | + --sidebar-active: #3473ad; |
|
222 | + --sidebar-spacer: #393939; |
|
223 | + |
|
224 | + --scrollbar: var(--sidebar-fg); |
|
225 | + |
|
226 | + --icons: #43484d; |
|
227 | + --icons-hover: #b3c0cc; |
|
228 | + |
|
229 | + --links: #2b79a2; |
|
230 | + |
|
231 | + --inline-code-color: #c5c8c6;; |
|
232 | + |
|
233 | + --theme-popup-bg: #141617; |
|
234 | + --theme-popup-border: #43484d; |
|
235 | + --theme-hover: #1f2124; |
|
236 | + |
|
237 | + --quote-bg: hsl(234, 21%, 18%); |
|
238 | + --quote-border: hsl(234, 21%, 23%); |
|
239 | + |
|
240 | + --table-border-color: hsl(200, 7%, 13%); |
|
241 | + --table-header-bg: hsl(200, 7%, 28%); |
|
242 | + --table-alternate-bg: hsl(200, 7%, 11%); |
|
243 | + |
|
244 | + --searchbar-border-color: #aaa; |
|
245 | + --searchbar-bg: #b7b7b7; |
|
246 | + --searchbar-fg: #000; |
|
247 | + --searchbar-shadow-color: #aaa; |
|
248 | + --searchresults-header-fg: #666; |
|
249 | + --searchresults-border-color: #98a3ad; |
|
250 | + --searchresults-li-bg: #2b2b2f; |
|
251 | + --search-mark-bg: #355c7d; |
|
252 | + } |
|
253 | +} |
|
254 | + |
|
255 | +.vegan { |
|
256 | + --bg: hsl(0, 0%, 100%); |
|
257 | + --fg: hsl(0, 0%, 0%); |
|
258 | + |
|
259 | + --sidebar-bg: #ff00ff11; |
|
260 | + --sidebar-fg: hsl(0, 0%, 33%); |
|
261 | + --sidebar-non-existant: #aaaaaa; |
|
262 | + --sidebar-active: #111; |
|
263 | + --sidebar-spacer: #f4f4f4; |
|
264 | + |
|
265 | + --scrollbar: #8F8F8F; |
|
266 | + |
|
267 | + --icons: #747474; |
|
268 | + --icons-hover: #000000; |
|
269 | + |
|
270 | + --links: #20609f; |
|
271 | + |
|
272 | + --inline-code-color: #301900; |
|
273 | + |
|
274 | + --theme-popup-bg: #fafafa; |
|
275 | + --theme-popup-border: #cccccc; |
|
276 | + --theme-hover: #f6d9d1; |
|
277 | + |
|
278 | + --quote-bg: hsl(197, 37%, 96%); |
|
279 | + --quote-border: hsl(197, 37%, 91%); |
|
280 | + |
|
281 | + --table-border-color: hsl(0, 0%, 95%); |
|
282 | + --table-header-bg: hsl(0, 0%, 80%); |
|
283 | + --table-alternate-bg: hsl(0, 0%, 97%); |
|
284 | + |
|
285 | + --searchbar-border-color: #aaa; |
|
286 | + --searchbar-bg: #fafafa; |
|
287 | + --searchbar-fg: #000; |
|
288 | + --searchbar-shadow-color: #aaa; |
|
289 | + --searchresults-header-fg: #666; |
|
290 | + --searchresults-border-color: #888; |
|
291 | + --searchresults-li-bg: #e4f2fe; |
|
292 | + --search-mark-bg: #a2cff5; |
|
293 | +} |
|
294 | + |
|
295 | + |
theme/head.hbs
... | ... | @@ -0,0 +1,4 @@ |
1 | +{{!-- Put your head HTML text here --}} |
|
2 | +<link rel="stylesheet" href="https://0makes0.com/css/tailwind-without-preflight.css"> |
|
3 | +<style> |
|
4 | +</style> |
theme/header.hbs
... | ... | @@ -0,0 +1,27 @@ |
1 | +{{!-- Put your header HTML text here --}} |
|
2 | + |
|
3 | +<header class="mt-20 mb-0 py-6 border-b-2 border-gray-300" style="border-bottom-width: 2px;border-bottom-style: solid;" > |
|
4 | +<div class="lg:flex max-w-screen-md m-auto items-end justify-between"> |
|
5 | + <div> |
|
6 | + <a href="/wiki"> |
|
7 | + <img class="h-56" src="https://wiki.0makes0.com/uploads/0makes0_%EB%B9%84%EA%B1%B0%EB%8B%88%EC%A6%98%EB%A7%A4%EB%89%B4%EC%96%BC_image.jpg" alt="비거니즘 전시 매뉴얼"> |
|
8 | + </a> |
|
9 | + </div> |
|
10 | + |
|
11 | + <div id="nav" class="flex text-3xl items-center"> |
|
12 | + <a href="/" class="pr-9 pb-4 font-semibold text-black no-underline visited:text-black hover:text-gray-800 mt-4 inline-block" style="font-size: 16px; color: #000 !important;">위키</a> |
|
13 | + <a href="/book" class="pr-9 pb-4 font-semibold text-black no-underline visited:text-black hover:text-gray-800 mt-4 inline-block" style="font-size: 16px; color: #000 !important;">ver.1</a> |
|
14 | + <a href="https://0makes0.com" class="pr-8 pb-4 font-semibold text-black no-underline visited:text-black hover:text-gray-800 block mt-4 inline-block" style="font-size: 16px; color: #000 !important;">제로의 예술</a> |
|
15 | + <a class="pt-5" href="https://nothingmakesitself.art/Satellite-Project"> |
|
16 | + <img class="pb-4 h-16 block md:inline-block md:mt-0" src="https://freight.cargo.site/t/original/i/abcd0824382cdb1e6c2efca6e3d5ae4dd8fc33f6ed88bddbfa25923073865abf/12313123100.png"> |
|
17 | + </a> |
|
18 | + </div> |
|
19 | +</div> |
|
20 | +</header> |
|
21 | +<style> |
|
22 | +@media (max-width: 768px) { |
|
23 | + #nav { |
|
24 | + display: none !important; |
|
25 | + } |
|
26 | +} |
|
27 | +</style> |
theme/index.hbs
... | ... | @@ -0,0 +1,373 @@ |
1 | +<!DOCTYPE HTML> |
|
2 | +<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}"> |
|
3 | + <head> |
|
4 | + <!-- Book generated using mdBook --> |
|
5 | + <meta charset="UTF-8"> |
|
6 | + <title>{{ title }}</title> |
|
7 | + {{#if is_print }} |
|
8 | + <meta name="robots" content="noindex" /> |
|
9 | + {{/if}} |
|
10 | + {{#if base_url}} |
|
11 | + <base href="{{ base_url }}"> |
|
12 | + {{/if}} |
|
13 | + |
|
14 | + |
|
15 | + <!-- Custom HTML head --> |
|
16 | + {{> head}} |
|
17 | + |
|
18 | + <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|
19 | + <meta name="description" content="{{ description }}"> |
|
20 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
|
21 | + <meta name="theme-color" content="#ffffff" /> |
|
22 | + |
|
23 | + {{#if favicon_svg}} |
|
24 | + <link rel="icon" href="{{ path_to_root }}favicon.svg"> |
|
25 | + {{/if}} |
|
26 | + {{#if favicon_png}} |
|
27 | + <link rel="shortcut icon" href="{{ path_to_root }}favicon.png"> |
|
28 | + {{/if}} |
|
29 | + <link rel="stylesheet" href="{{ path_to_root }}css/variables.css"> |
|
30 | + <link rel="stylesheet" href="{{ path_to_root }}css/general.css"> |
|
31 | + <link rel="stylesheet" href="{{ path_to_root }}css/chrome.css"> |
|
32 | + {{#if print_enable}} |
|
33 | + <link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print"> |
|
34 | + {{/if}} |
|
35 | + |
|
36 | + <!-- Fonts --> |
|
37 | + <link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css"> |
|
38 | + {{#if copy_fonts}} |
|
39 | + <link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css"> |
|
40 | + {{/if}} |
|
41 | + |
|
42 | + <!-- Highlight.js Stylesheets --> |
|
43 | + <link rel="stylesheet" href="{{ path_to_root }}highlight.css"> |
|
44 | + <link rel="stylesheet" href="{{ path_to_root }}tomorrow-night.css"> |
|
45 | + <link rel="stylesheet" href="{{ path_to_root }}ayu-highlight.css"> |
|
46 | + |
|
47 | + <!-- Custom theme stylesheets --> |
|
48 | + {{#each additional_css}} |
|
49 | + <link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}"> |
|
50 | + {{/each}} |
|
51 | + |
|
52 | + {{#if mathjax_support}} |
|
53 | + <!-- MathJax --> |
|
54 | + <script async type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> |
|
55 | + {{/if}} |
|
56 | + </head> |
|
57 | + <body> |
|
58 | + <!-- Provide site root to javascript --> |
|
59 | + <script type="text/javascript"> |
|
60 | + var path_to_root = "{{ path_to_root }}"; |
|
61 | + var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}"; |
|
62 | + </script> |
|
63 | + |
|
64 | + <!-- Work around some values being stored in localStorage wrapped in quotes --> |
|
65 | + <script type="text/javascript"> |
|
66 | + try { |
|
67 | + var theme = localStorage.getItem('mdbook-theme'); |
|
68 | + var sidebar = localStorage.getItem('mdbook-sidebar'); |
|
69 | + |
|
70 | + if (theme.startsWith('"') && theme.endsWith('"')) { |
|
71 | + localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1)); |
|
72 | + } |
|
73 | + |
|
74 | + if (sidebar.startsWith('"') && sidebar.endsWith('"')) { |
|
75 | + localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1)); |
|
76 | + } |
|
77 | + } catch (e) { } |
|
78 | + </script> |
|
79 | + |
|
80 | + <!-- Set the theme before any content is loaded, prevents flash --> |
|
81 | + <script type="text/javascript"> |
|
82 | + var theme; |
|
83 | + try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } |
|
84 | + if (theme === null || theme === undefined) { theme = default_theme; } |
|
85 | + var html = document.querySelector('html'); |
|
86 | + html.classList.remove('no-js') |
|
87 | + html.classList.remove('{{ default_theme }}') |
|
88 | + html.classList.add(theme); |
|
89 | + html.classList.add('js'); |
|
90 | + </script> |
|
91 | + |
|
92 | + <!-- Hide / unhide sidebar before it is displayed --> |
|
93 | + <script type="text/javascript"> |
|
94 | + var html = document.querySelector('html'); |
|
95 | + var sidebar = 'hidden'; |
|
96 | + if (document.body.clientWidth >= 1080) { |
|
97 | + try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { } |
|
98 | + sidebar = sidebar || 'visible'; |
|
99 | + } |
|
100 | + html.classList.remove('sidebar-visible'); |
|
101 | + html.classList.add("sidebar-" + sidebar); |
|
102 | + </script> |
|
103 | + |
|
104 | + <nav id="sidebar" class="sidebar" aria-label="Table of contents"> |
|
105 | + <div class="sidebar-scrollbox mt-48 p-4 text-3xl font-medium" style="padding-left: 25px;"> |
|
106 | + {{#toc}}{{/toc}} |
|
107 | + </div> |
|
108 | + <div id="sidebar-resize-handle" class="sidebar-resize-handle"></div> |
|
109 | + </nav> |
|
110 | + |
|
111 | + <div id="page-wrapper" class="page-wrapper"> |
|
112 | + <div class="page"> |
|
113 | + {{> header}} |
|
114 | + <div id="menu-bar-hover-placeholder"></div> |
|
115 | + <div id="menu-bar" class="menu-bar sticky bordered"> |
|
116 | + <div class="left-buttons"> |
|
117 | + <button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> |
|
118 | + <i class="fa fa-bars"></i> |
|
119 | + </button> |
|
120 | + <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list"> |
|
121 | + <i class="fa fa-paint-brush"></i> |
|
122 | + </button> |
|
123 | + <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu"> |
|
124 | + <li role="none"><button role="menuitem" class="theme" id="light">{{ theme_option "Light" }}</button></li> |
|
125 | + <li role="none"><button role="menuitem" class="theme" id="rust">{{ theme_option "Rust" }}</button></li> |
|
126 | + <li role="none"><button role="menuitem" class="theme" id="coal">{{ theme_option "Coal" }}</button></li> |
|
127 | + <li role="none"><button role="menuitem" class="theme" id="navy">{{ theme_option "Navy" }}</button></li> |
|
128 | + <li role="none"><button role="menuitem" class="theme" id="ayu">{{ theme_option "Ayu" }}</button></li> |
|
129 | + <li role="none"><button role="menuitem" class="theme" id="vegan">{{ theme_option "Vegan" }}</button></li> |
|
130 | + </ul> |
|
131 | + {{#if search_enabled}} |
|
132 | + <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar"> |
|
133 | + <i class="fa fa-search"></i> |
|
134 | + </button> |
|
135 | + {{/if}} |
|
136 | + </div> |
|
137 | + |
|
138 | + <h1 class="menu-title">{{ book_title }}</h1> |
|
139 | + |
|
140 | + <div class="right-buttons"> |
|
141 | + {{#if print_enable}} |
|
142 | + <a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book"> |
|
143 | + <i id="print-button" class="fa fa-print"></i> |
|
144 | + </a> |
|
145 | + {{/if}} |
|
146 | + {{#if git_repository_url}} |
|
147 | + <a href="{{git_repository_url}}" title="Git repository" aria-label="Git repository"> |
|
148 | + <i id="git-repository-button" class="fa {{git_repository_icon}}"></i> |
|
149 | + </a> |
|
150 | + {{/if}} |
|
151 | + {{#if git_repository_edit_url}} |
|
152 | + <a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit"> |
|
153 | + <i id="git-edit-button" class="fa fa-edit"></i> |
|
154 | + </a> |
|
155 | + {{/if}} |
|
156 | + |
|
157 | + </div> |
|
158 | + </div> |
|
159 | + |
|
160 | + {{#if search_enabled}} |
|
161 | + <div id="search-wrapper" class="hidden"> |
|
162 | + <form id="searchbar-outer" class="searchbar-outer"> |
|
163 | + <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header"> |
|
164 | + </form> |
|
165 | + <div id="searchresults-outer" class="searchresults-outer hidden"> |
|
166 | + <div id="searchresults-header" class="searchresults-header"></div> |
|
167 | + <ul id="searchresults"> |
|
168 | + </ul> |
|
169 | + </div> |
|
170 | + </div> |
|
171 | + {{/if}} |
|
172 | + |
|
173 | + <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM --> |
|
174 | + <script type="text/javascript"> |
|
175 | + document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible'); |
|
176 | + document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible'); |
|
177 | + Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) { |
|
178 | + link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1); |
|
179 | + }); |
|
180 | + </script> |
|
181 | + |
|
182 | + <div id="content" class="content"> |
|
183 | + <main> |
|
184 | + {{{ content }}} |
|
185 | + </main> |
|
186 | + |
|
187 | + <nav class="nav-wrapper" aria-label="Page navigation"> |
|
188 | + <!-- Mobile navigation buttons --> |
|
189 | + {{#previous}} |
|
190 | + <a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left"> |
|
191 | + <i class="fa fa-angle-left"></i> |
|
192 | + </a> |
|
193 | + {{/previous}} |
|
194 | + |
|
195 | + {{#next}} |
|
196 | + <a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> |
|
197 | + <i class="fa fa-angle-right"></i> |
|
198 | + </a> |
|
199 | + {{/next}} |
|
200 | + |
|
201 | + <div style="clear: both"></div> |
|
202 | + </nav> |
|
203 | + </div> |
|
204 | + |
|
205 | +<div class="block md:hidden my-4 border-gray-300 mb-8" style="border-top-width: 2px; border-top-style: solid;"> |
|
206 | +<div class="lg:flex lg:max-w-screen-lg m-auto p-4 justify-between" > |
|
207 | + <!-- |
|
208 | + <div class="lg:mt-0" id="server"> |
|
209 | + <h2 class="font-semibold" style="font-size: 1.7rem; margin-bottom: 0.75rem">태양광 서버</h2> |
|
210 | + <span>배터리 남은 용량: </span><span id="batteryInfo"></span> <span>%</span><br/> |
|
211 | + <span>배터리 전압: </span><span id="voltage"></span> <span>V</span><br/> |
|
212 | + <span>전기 사용: </span><span id="powerConsumption"></span> <span>Watt</span><br/> |
|
213 | + <span>서버 시간: </span><span id="date"></span><br/> |
|
214 | + <span>날씨(구름량): </span><span id="forecast"></span><br/> |
|
215 | + <span id="address"> 위치: 위도 37.493423, 경도 126.834054</span><br/> |
|
216 | + </div> |
|
217 | + --> |
|
218 | + <div class="lg:mt-0"> |
|
219 | + <!-- |
|
220 | + <h2 class="font-semibold" style="font-size: 1.7rem; margin-bottom: 0.5rem">제로의 예술</h2> |
|
221 | + <a href="https://barimart.wordpress.com" target="_blank"><span>바림</span></a> (광주광역시 동구 대의동 80-2 3층) <br> |
|
222 | + <a href="http://womanopentechlab.kr" target="_blank"><span>여성을 위한 열린 기술랩</span></a> (서울시 중구 을지로 157 대림상가 세운메이커스큐브 대림-동측 306호) |
|
223 | + </br> |
|
224 | + --> |
|
225 | + <div> |
|
226 | + <a href="https://nothingmakesitself.art/Satellite-Project"><img class="mt-4 mb-1 h-20" src="https://freight.cargo.site/t/original/i/abcd0824382cdb1e6c2efca6e3d5ae4dd8fc33f6ed88bddbfa25923073865abf/12313123100.png"></a> |
|
227 | + </br> |
|
228 | + <span class="inline md:hidden">2021 아르코 융복합 예술 페스티벌 《횡단하는 물질의 세계》</span> <br/> |
|
229 | + <span class="inline md:hidden">2021 ARKO Art & Tech Festival Nothing Makes Itself</span> |
|
230 | + </div> |
|
231 | + </div> |
|
232 | +</div> |
|
233 | +<div> |
|
234 | +<script> |
|
235 | +var xhr = new XMLHttpRequest(); |
|
236 | +xhr.open('GET', '/server', true); |
|
237 | + |
|
238 | +// If specified, responseType must be empty string or "text" |
|
239 | +xhr.responseType = 'text'; |
|
240 | + |
|
241 | +xhr.onload = function () { |
|
242 | + if (xhr.readyState === xhr.DONE) { |
|
243 | + if (xhr.status === 200) { |
|
244 | + console.log(xhr.responseText); |
|
245 | + const res = JSON.parse(xhr.responseText); |
|
246 | + console.log(res.battery); |
|
247 | + //document.getElementById('server').innerText = xhr.responseText; |
|
248 | + document.getElementById('batteryInfo').innerText = res.battery.toString(); |
|
249 | + document.getElementById('voltage').innerText = res.voltage; |
|
250 | + document.getElementById('powerConsumption').innerText = res.powerConsumption; |
|
251 | + document.getElementById('date').innerText = res.date; |
|
252 | + document.getElementById('forecast').innerText = res.forecast; |
|
253 | + var r = document.querySelector(':root'); |
|
254 | + //r.style.setProperty('--blue', 'lightblue'); |
|
255 | + //r.style.setProperty('--battery', '87%'); |
|
256 | + r.style.setProperty('--battery', res.battery.toString() + '%'); |
|
257 | + document.getElementById('level').innerText = res.battery; |
|
258 | + } |
|
259 | + } |
|
260 | +}; |
|
261 | + |
|
262 | +xhr.send(null); |
|
263 | +</script> |
|
264 | + |
|
265 | + </div> |
|
266 | + |
|
267 | + <nav class="nav-wide-wrapper" aria-label="Page navigation"> |
|
268 | + {{#previous}} |
|
269 | + <a rel="prev" href="{{ path_to_root }}{{link}}" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left"> |
|
270 | + <i class="fa fa-angle-left"></i> |
|
271 | + </a> |
|
272 | + {{/previous}} |
|
273 | + |
|
274 | + {{#next}} |
|
275 | + <a rel="next" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right"> |
|
276 | + <i class="fa fa-angle-right"></i> |
|
277 | + </a> |
|
278 | + {{/next}} |
|
279 | + </nav> |
|
280 | + |
|
281 | + </div> |
|
282 | + |
|
283 | + {{#if livereload}} |
|
284 | + <!-- Livereload script (if served using the cli tool) --> |
|
285 | + <script type="text/javascript"> |
|
286 | + var socket = new WebSocket("{{{livereload}}}"); |
|
287 | + socket.onmessage = function (event) { |
|
288 | + if (event.data === "reload") { |
|
289 | + socket.close(); |
|
290 | + location.reload(); |
|
291 | + } |
|
292 | + }; |
|
293 | + |
|
294 | + window.onbeforeunload = function() { |
|
295 | + socket.close(); |
|
296 | + } |
|
297 | + </script> |
|
298 | + {{/if}} |
|
299 | + |
|
300 | + {{#if google_analytics}} |
|
301 | + <!-- Google Analytics Tag --> |
|
302 | + <script type="text/javascript"> |
|
303 | + var localAddrs = ["localhost", "127.0.0.1", ""]; |
|
304 | + |
|
305 | + // make sure we don't activate google analytics if the developer is |
|
306 | + // inspecting the book locally... |
|
307 | + if (localAddrs.indexOf(document.location.hostname) === -1) { |
|
308 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
|
309 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
|
310 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
|
311 | + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
|
312 | + |
|
313 | + ga('create', '{{google_analytics}}', 'auto'); |
|
314 | + ga('send', 'pageview'); |
|
315 | + } |
|
316 | + </script> |
|
317 | + {{/if}} |
|
318 | + |
|
319 | + {{#if playground_line_numbers}} |
|
320 | + <script type="text/javascript"> |
|
321 | + window.playground_line_numbers = true; |
|
322 | + </script> |
|
323 | + {{/if}} |
|
324 | + |
|
325 | + {{#if playground_copyable}} |
|
326 | + <script type="text/javascript"> |
|
327 | + window.playground_copyable = true; |
|
328 | + </script> |
|
329 | + {{/if}} |
|
330 | + |
|
331 | + {{#if playground_js}} |
|
332 | + <script src="{{ path_to_root }}ace.js" type="text/javascript" charset="utf-8"></script> |
|
333 | + <script src="{{ path_to_root }}editor.js" type="text/javascript" charset="utf-8"></script> |
|
334 | + <script src="{{ path_to_root }}mode-rust.js" type="text/javascript" charset="utf-8"></script> |
|
335 | + <script src="{{ path_to_root }}theme-dawn.js" type="text/javascript" charset="utf-8"></script> |
|
336 | + <script src="{{ path_to_root }}theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script> |
|
337 | + {{/if}} |
|
338 | + |
|
339 | + {{#if search_js}} |
|
340 | + <script src="{{ path_to_root }}elasticlunr.min.js" type="text/javascript" charset="utf-8"></script> |
|
341 | + <script src="{{ path_to_root }}mark.min.js" type="text/javascript" charset="utf-8"></script> |
|
342 | + <script src="{{ path_to_root }}searcher.js" type="text/javascript" charset="utf-8"></script> |
|
343 | + {{/if}} |
|
344 | + |
|
345 | + <script src="{{ path_to_root }}clipboard.min.js" type="text/javascript" charset="utf-8"></script> |
|
346 | + <script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script> |
|
347 | + <script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script> |
|
348 | + |
|
349 | + <!-- Custom JS scripts --> |
|
350 | + {{#each additional_js}} |
|
351 | + <script type="text/javascript" src="{{ ../path_to_root }}{{this}}"></script> |
|
352 | + {{/each}} |
|
353 | + |
|
354 | + {{#if is_print}} |
|
355 | + {{#if mathjax_support}} |
|
356 | + <script type="text/javascript"> |
|
357 | + window.addEventListener('load', function() { |
|
358 | + MathJax.Hub.Register.StartupHook('End', function() { |
|
359 | + window.setTimeout(window.print, 100); |
|
360 | + }); |
|
361 | + }); |
|
362 | + </script> |
|
363 | + {{else}} |
|
364 | + <script type="text/javascript"> |
|
365 | + window.addEventListener('load', function() { |
|
366 | + window.setTimeout(window.print, 100); |
|
367 | + }); |
|
368 | + </script> |
|
369 | + {{/if}} |
|
370 | + {{/if}} |
|
371 | + |
|
372 | + </body> |
|
373 | +</html> |
tools/ina226.py
... | ... | @@ -0,0 +1,330 @@ |
1 | +#!/usr/bin/env python3 |
|
2 | +# -*- coding: utf-8 -*- |
|
3 | +import time |
|
4 | +import math |
|
5 | +import ctypes |
|
6 | +import sys |
|
7 | + |
|
8 | +PYTHON_SMBUS_LIB_PRESENT = True |
|
9 | +PYTHON_AARDVARK_LIB_PRESENT = False |
|
10 | + |
|
11 | +try: |
|
12 | + import smbus |
|
13 | +except ImportError as e: |
|
14 | + PYTHON_SMBUS_LIB_PRESENT = False |
|
15 | + |
|
16 | +try: |
|
17 | + import pyaardvark |
|
18 | +except ImportError as e: |
|
19 | + PYTHON_AARDVARK_LIB_PRESENT = False |
|
20 | + |
|
21 | + |
|
22 | + |
|
23 | +INA226_ADDRESS =(0x40) |
|
24 | + |
|
25 | +INA226_REG_CONFIG =(0x00) |
|
26 | +INA226_REG_SHUNTVOLTAGE =(0x01) |
|
27 | +INA226_REG_BUSVOLTAGE =(0x02) |
|
28 | +INA226_REG_POWER =(0x03) |
|
29 | +INA226_REG_CURRENT =(0x04) |
|
30 | +INA226_REG_CALIBRATION =(0x05) |
|
31 | +INA226_REG_MASKENABLE =(0x06) |
|
32 | +INA226_REG_ALERTLIMIT =(0x07) |
|
33 | + |
|
34 | +INA226_BIT_SOL =(0x8000) |
|
35 | +INA226_BIT_SUL =(0x4000) |
|
36 | +INA226_BIT_BOL =(0x2000) |
|
37 | +INA226_BIT_BUL =(0x1000) |
|
38 | +INA226_BIT_POL =(0x0800) |
|
39 | +INA226_BIT_CNVR =(0x0400) |
|
40 | +INA226_BIT_AFF =(0x0010) |
|
41 | +INA226_BIT_CVRF =(0x0008) |
|
42 | +INA226_BIT_OVF =(0x0004) |
|
43 | +INA226_BIT_APOL =(0x0002) |
|
44 | +INA226_BIT_LEN =(0x0001) |
|
45 | + |
|
46 | +#enum replacement, but not truly |
|
47 | +#now replaced class by dict because it can give me back keys |
|
48 | +ina226_averages_t = dict( |
|
49 | + INA226_AVERAGES_1 = 0b000, |
|
50 | + INA226_AVERAGES_4 = 0b001, |
|
51 | + INA226_AVERAGES_16 = 0b010, |
|
52 | + INA226_AVERAGES_64 = 0b011, |
|
53 | + INA226_AVERAGES_128 = 0b100, |
|
54 | + INA226_AVERAGES_256 = 0b101, |
|
55 | + INA226_AVERAGES_512 = 0b110, |
|
56 | + INA226_AVERAGES_1024 = 0b111) |
|
57 | + |
|
58 | +ina226_busConvTime_t = dict( |
|
59 | + INA226_BUS_CONV_TIME_140US = 0b000, |
|
60 | + INA226_BUS_CONV_TIME_204US = 0b001, |
|
61 | + INA226_BUS_CONV_TIME_332US = 0b010, |
|
62 | + INA226_BUS_CONV_TIME_588US = 0b011, |
|
63 | + INA226_BUS_CONV_TIME_1100US = 0b100, |
|
64 | + INA226_BUS_CONV_TIME_2116US = 0b101, |
|
65 | + INA226_BUS_CONV_TIME_4156US = 0b110, |
|
66 | + INA226_BUS_CONV_TIME_8244US = 0b111) |
|
67 | + |
|
68 | +ina226_shuntConvTime_t = dict( |
|
69 | + INA226_SHUNT_CONV_TIME_140US = 0b000, |
|
70 | + INA226_SHUNT_CONV_TIME_204US = 0b001, |
|
71 | + INA226_SHUNT_CONV_TIME_332US = 0b010, |
|
72 | + INA226_SHUNT_CONV_TIME_588US = 0b011, |
|
73 | + INA226_SHUNT_CONV_TIME_1100US = 0b100, |
|
74 | + INA226_SHUNT_CONV_TIME_2116US = 0b101, |
|
75 | + INA226_SHUNT_CONV_TIME_4156US = 0b110, |
|
76 | + INA226_SHUNT_CONV_TIME_8244US = 0b111) |
|
77 | + |
|
78 | +ina226_mode_t = dict( |
|
79 | + INA226_MODE_POWER_DOWN = 0b000, |
|
80 | + INA226_MODE_SHUNT_TRIG = 0b001, |
|
81 | + INA226_MODE_BUS_TRIG = 0b010, |
|
82 | + INA226_MODE_SHUNT_BUS_TRIG = 0b011, |
|
83 | + INA226_MODE_ADC_OFF = 0b100, |
|
84 | + INA226_MODE_SHUNT_CONT = 0b101, |
|
85 | + INA226_MODE_BUS_CONT = 0b110, |
|
86 | + INA226_MODE_SHUNT_BUS_CONT = 0b111) |
|
87 | + |
|
88 | +# available options are 'AARDVARK','SBC_LINUX_SMBUS' |
|
89 | +I2C_DRIVER = 'AARDVARK' |
|
90 | +# other I2C options |
|
91 | +I2C_DEFAULT_CLK_KHZ = 100 |
|
92 | +I2C_DEFAULT_BUS_NUMBER = 0 |
|
93 | + |
|
94 | +class ina226: |
|
95 | + def __init__(self,ina226_addr = INA226_ADDRESS, i2c_bus_number=I2C_DEFAULT_BUS_NUMBER, i2c_clk_Khz=I2C_DEFAULT_CLK_KHZ, i2c_driver_type = I2C_DRIVER): |
|
96 | + |
|
97 | + self.i2c_bus = smbus.SMBus(i2c_bus_number) |
|
98 | + self.readRegister16 = self.readRegister16_SMBUS |
|
99 | + self.writeRegister16 = self.writeRegister16_SMBUS |
|
100 | + if i2c_clk_Khz != I2C_DEFAULT_CLK_KHZ: |
|
101 | + print 'Python SMBUS linux driver doesn\'t provide I2C CLK Freq Manipulation support yet,' |
|
102 | + print 'So Ignoring i2c_clk_khz param and using default.' |
|
103 | + |
|
104 | + self.ina226_address = ina226_addr |
|
105 | + self.vBusMax = 36 |
|
106 | + self.vShuntMax = 0.08192 |
|
107 | + self.rShunt = 0.1 |
|
108 | + self.currentLSB = 0 |
|
109 | + self.powerLSB = 0 |
|
110 | + self.iMaxPossible = 0 |
|
111 | + |
|
112 | + #not using with statement related code yet |
|
113 | + |
|
114 | + #this causes some issue may be because when exception occurs I am manually calling |
|
115 | + #self.close() and even this function tries to call the same. Need to check. |
|
116 | + #def __del__(self): |
|
117 | + # self.close() |
|
118 | + |
|
119 | + def close(self): |
|
120 | + self.i2c_bus.close() |
|
121 | + |
|
122 | + def readRegister16_SMBUS(self,register): |
|
123 | + #higher_byte = self.i2c_bus.read_byte_data(self.ina226_address,register) |
|
124 | + #lower_byte = self.i2c_bus.read_byte_data(self.ina226_address,register+1) |
|
125 | + data = self.i2c_bus.read_i2c_block_data(self.ina226_address,register,2) |
|
126 | + higher_byte = data[0] |
|
127 | + lower_byte = data[1] |
|
128 | + #there is still some issue in read which we need to fix, we are not able to print negative current--done--fixed using ctypes int16 return |
|
129 | + word_data = higher_byte << 8 | lower_byte |
|
130 | + #return word_data |
|
131 | + return ctypes.c_int16(word_data).value |
|
132 | + |
|
133 | + def writeRegister16_SMBUS(self,register,dataWord): |
|
134 | + higher_byte = (dataWord >> 8) & 0xff |
|
135 | + lower_byte = dataWord & 0xff #truncating the dataword to byte |
|
136 | + self.i2c_bus.write_i2c_block_data(self.ina226_address,register,[higher_byte,lower_byte]) |
|
137 | + |
|
138 | + def readRegister16_AARDVARK(self,register): |
|
139 | + #higher_byte = self.i2c_bus.read_byte_data(self.ina226_address,register) |
|
140 | + #lower_byte = self.i2c_bus.read_byte_data(self.ina226_address,register+1) |
|
141 | + #data = self.i2c_bus.read_i2c_block_data(self.ina226_address,register,2) |
|
142 | + |
|
143 | + register_addr_str = chr(register) |
|
144 | + |
|
145 | + byte_char_data = self.i2c_bus.i2c_master_write_read(self.ina226_address,register_addr_str,2) |
|
146 | + |
|
147 | + data = [ord(b) for b in byte_char_data] |
|
148 | + |
|
149 | + higher_byte = data[0] |
|
150 | + lower_byte = data[1] |
|
151 | + #there is still some issue in read which we need to fix, we are not able to print negative current--done--fixed using ctypes int16 return |
|
152 | + word_data = higher_byte << 8 | lower_byte |
|
153 | + #return word_data |
|
154 | + return ctypes.c_int16(word_data).value |
|
155 | + #if this does not work as expected than we should try to read bytes and they convert into word as in Arduino |
|
156 | + #return self.i2c_bus.read_word_data(self.ina226_address,register) |
|
157 | + |
|
158 | + def writeRegister16_AARDVARK(self,register,dataWord): |
|
159 | + higher_byte = (dataWord >> 8) & 0xff |
|
160 | + lower_byte = dataWord & 0xff #truncating the dataword to byte |
|
161 | + |
|
162 | + data = (register, higher_byte, lower_byte) |
|
163 | + data = ''.join(chr(c) for c in data) |
|
164 | + |
|
165 | + self.i2c_bus.i2c_master_write(self.ina226_address,data) |
|
166 | + |
|
167 | + #self.i2c_bus.write_i2c_block_data(self.ina226_address,register,[higher_byte,lower_byte]) |
|
168 | + |
|
169 | + #doesn't work |
|
170 | + #self.i2c_bus.write_byte_data(self.ina226_address,register,higher_byte) |
|
171 | + #self.i2c_bus.write_byte_data(self.ina226_address,register+1,lower_byte) |
|
172 | + #if this does not work as expected than we should try to read bytes and they convert into word as in Arduino |
|
173 | + #self.i2c_bus.write_word_data(self.ina226_address,register,dataWord) |
|
174 | + |
|
175 | + def configure(self,avg = ina226_averages_t['INA226_AVERAGES_1'], busConvTime = ina226_busConvTime_t['INA226_BUS_CONV_TIME_1100US'], shuntConvTime = ina226_shuntConvTime_t['INA226_SHUNT_CONV_TIME_1100US'], mode = ina226_mode_t['INA226_MODE_SHUNT_BUS_CONT']): |
|
176 | + config = 0 |
|
177 | + config |= (avg << 9 | busConvTime << 6 | shuntConvTime << 3 | mode) |
|
178 | + self.writeRegister16(INA226_REG_CONFIG, config) |
|
179 | + return True |
|
180 | + |
|
181 | + def calibrate(self,rShuntValue = 0.1, iMaxExcepted = 2): |
|
182 | + self.rShunt = rShuntValue |
|
183 | + |
|
184 | + self.iMaxPossible = self.vShuntMax / self.rShunt |
|
185 | + |
|
186 | + minimumLSB = float(iMaxExcepted) / 32767 |
|
187 | + |
|
188 | + #print "minimumLSB:"+str(minimumLSB) |
|
189 | + |
|
190 | + self.currentLSB = int((minimumLSB * 100000000)) |
|
191 | + #print "currentLSB:"+str(self.currentLSB) |
|
192 | + self.currentLSB /= 100000000.0 |
|
193 | + self.currentLSB /= 0.0001 |
|
194 | + self.currentLSB = math.ceil(self.currentLSB) |
|
195 | + self.currentLSB *= 0.0001 |
|
196 | + |
|
197 | + self.powerLSB = self.currentLSB * 25; |
|
198 | + |
|
199 | + |
|
200 | + #print "powerLSB:"+str(self.powerLSB) |
|
201 | + #print "rshunt:"+str(self.rShunt) |
|
202 | + |
|
203 | + calibrationValue = int(((0.00512) / (self.currentLSB * self.rShunt))) #if we get error need to convert this to unsigned int 16 bit instead |
|
204 | + |
|
205 | + self.writeRegister16(INA226_REG_CALIBRATION, calibrationValue) |
|
206 | + |
|
207 | + return True |
|
208 | + |
|
209 | + def getAverages(self): |
|
210 | + value = self.readRegister16(INA226_REG_CONFIG) |
|
211 | + value &= 0b0000111000000000 |
|
212 | + value >>= 9 |
|
213 | + return value |
|
214 | + |
|
215 | + def getMaxPossibleCurrent(self): |
|
216 | + return (self.vShuntMax / self.rShunt) |
|
217 | + |
|
218 | + def getMaxCurrent(self): |
|
219 | + maxCurrent = (self.currentLSB * 32767) |
|
220 | + maxPossible = self.getMaxPossibleCurrent() |
|
221 | + |
|
222 | + if maxCurrent > maxPossible: |
|
223 | + return maxPossible |
|
224 | + else: |
|
225 | + return maxCurrent |
|
226 | + |
|
227 | + def getMaxShuntVoltage(self): |
|
228 | + maxVoltage = self.getMaxCurrent() * self.rShunt |
|
229 | + if maxVoltage >= self.vShuntMax: |
|
230 | + return self.vShuntMax |
|
231 | + else: |
|
232 | + return maxVoltage |
|
233 | + |
|
234 | + def getMaxPower(self): |
|
235 | + return (self.getMaxCurrent() * self.vBusMax) |
|
236 | + |
|
237 | + def readBusPower(self): |
|
238 | + return (self.readRegister16(INA226_REG_POWER) * self.powerLSB) |
|
239 | + |
|
240 | + def readShuntCurrent(self): |
|
241 | + return (self.readRegister16(INA226_REG_CURRENT) * self.currentLSB) |
|
242 | + |
|
243 | + def readShuntVoltage(self): |
|
244 | + voltage = self.readRegister16(INA226_REG_SHUNTVOLTAGE) |
|
245 | + return (voltage * 0.0000025) |
|
246 | + |
|
247 | + def readBusVoltage(self): |
|
248 | + voltage = self.readRegister16(INA226_REG_BUSVOLTAGE) |
|
249 | + return (voltage * 0.00125) |
|
250 | + |
|
251 | + def getBusConversionTime(self): |
|
252 | + value = self.readRegister16(INA226_REG_CONFIG) |
|
253 | + value &= 0b0000000111000000 |
|
254 | + value >>= 6 |
|
255 | + return value |
|
256 | + |
|
257 | + def getShuntConversionTime(self): |
|
258 | + value = self.readRegister16(INA226_REG_CONFIG) |
|
259 | + value &= 0b0000000000111000 |
|
260 | + value >>= 3 |
|
261 | + return value |
|
262 | + |
|
263 | + def getMode(self): |
|
264 | + value = self.readRegister16(INA226_REG_CONFIG) |
|
265 | + value &= 0b0000000000000111 |
|
266 | + return value |
|
267 | + |
|
268 | + def setMaskEnable(self, mask): |
|
269 | + self.writeRegister16(INA226_REG_MASKENABLE, mask) |
|
270 | + |
|
271 | + def getMaskEnable(self): |
|
272 | + return self.readRegister16(INA226_REG_MASKENABLE) |
|
273 | + |
|
274 | + def enableShuntOverLimitAlert(self): |
|
275 | + self.writeRegister16(INA226_REG_MASKENABLE, INA226_BIT_SOL) |
|
276 | + |
|
277 | + def enableBusOverLimitAlert(self): |
|
278 | + self.writeRegister16(INA226_REG_MASKENABLE, INA226_BIT_BOL) |
|
279 | + |
|
280 | + def enableBusUnderLimitAlert(self): |
|
281 | + self.writeRegister16(INA226_REG_MASKENABLE, INA226_BIT_BUL) |
|
282 | + |
|
283 | + def enableOverPowerLimitAlert(self): |
|
284 | + self.writeRegister16(INA226_REG_MASKENABLE, INA226_BIT_POL) |
|
285 | + |
|
286 | + def enableConversionReadyAlert(self): |
|
287 | + self.writeRegister16(INA226_REG_MASKENABLE, INA226_BIT_CNVR) |
|
288 | + |
|
289 | + def setBusVoltageLimit(self, voltage): |
|
290 | + value = voltage / 0.00125 |
|
291 | + self.writeRegister16(INA226_REG_ALERTLIMIT, value) |
|
292 | + |
|
293 | + def setShuntVoltageLimit(self, voltage): |
|
294 | + value = voltage * 25000 |
|
295 | + self.writeRegister16(INA226_REG_ALERTLIMIT, value) |
|
296 | + |
|
297 | + def setPowerLimit(self, watts): |
|
298 | + value = watts / self.powerLSB |
|
299 | + self.writeRegister16(INA226_REG_ALERTLIMIT, value) |
|
300 | + |
|
301 | + def setAlertInvertedPolarity(self, inverted): |
|
302 | + temp = self.getMaskEnable() |
|
303 | + |
|
304 | + if (inverted): |
|
305 | + temp |= INA226_BIT_APOL; |
|
306 | + else: |
|
307 | + temp &= ~INA226_BIT_APOL; |
|
308 | + self.setMaskEnable(temp) |
|
309 | + |
|
310 | + def setAlertLatch(self, latch): |
|
311 | + temp = self.getMaskEnable() |
|
312 | + if (latch): |
|
313 | + temp |= INA226_BIT_LEN |
|
314 | + else: |
|
315 | + temp &= ~INA226_BIT_LEN |
|
316 | + self.setMaskEnable(temp) |
|
317 | + |
|
318 | + def isMathOverflow(self): |
|
319 | + return ((self.getMaskEnable() & INA226_BIT_OVF) == INA226_BIT_OVF) |
|
320 | + |
|
321 | + def isAlert(self): |
|
322 | + return ((self.getMaskEnable() & INA226_BIT_AFF) == INA226_BIT_AFF) |
|
323 | + |
|
324 | +import sys |
|
325 | +iSensor = ina226(INA226_ADDRESS,1) |
|
326 | +iSensor.configure(avg = ina226_averages_t['INA226_AVERAGES_4'],) |
|
327 | +iSensor.calibrate(rShuntValue = 0.02, iMaxExcepted = 2) |
|
328 | +time.sleep(1) |
|
329 | +batteryPercentage = ((round(iSensor.readBusVoltage(),3)-10.5) / (14.3-10.5)) * 100.0 |
|
330 | +sys.stdout.write(str(round(iSensor.readShuntCurrent(),3)) +' '+ str(round(iSensor.readBusVoltage(),1)) +' '+ str(round(iSensor.readBusPower(),1))+' ' + str(round(batteryPercentage,1)) +'\n') |
tools/run-wiki-server.sh
... | ... | @@ -0,0 +1,4 @@ |
1 | +#!/bin/sh |
|
2 | + |
|
3 | +cd /tmp |
|
4 | +python3 -m http.server 8000 |
tools/sense-power.sh
... | ... | @@ -0,0 +1,21 @@ |
1 | +#!/bin/sh |
|
2 | + |
|
3 | +while true; do |
|
4 | + SENSORS=(`python ~/ina226.py`) |
|
5 | + |
|
6 | + CURRENT=${SENSORS[0]} |
|
7 | + VOLTAGE=${SENSORS[1]} |
|
8 | + POWER=${SENSORS[2]} |
|
9 | + BATTERY=${SENSORS[3]} |
|
10 | + |
|
11 | + WEATHERS=(`python ~/weather.py`) |
|
12 | + TEMPERATURE=${WEATHERS[0]} |
|
13 | + FORECAST=${WEATHERS[1]} |
|
14 | + LATITUDE=${WEATHERS[2]} |
|
15 | + LONGITUDE=${WEATHERS[3]} |
|
16 | + |
|
17 | + #VOLTAGE=`seq 13 0.1 14 | shuf | head -n1`; |
|
18 | + #BATTERY=`seq 70 1 90 | shuf | head -n1`; |
|
19 | + #POWER=`seq 1 .1 1.5 | shuf | head -n1`; |
|
20 | + |
|
21 | + echo -e "{\"voltage\": $VOLTAGE, \"battery\": $BATTERY, \"powerConsumption\": $POWER, \"current\": $CURRENT, \"forecast\": \"$FORECAST\", \"temperature\": $TEMPERATURE, \"date\": \"$(date)\", \"uptime\": \"$(uptime -p)\", \"latitude\": $LATITUDE, \"longitude\": $LONGITUDE }" > /tmp/index.html; sleep 1; done |
tools/server-status.sh
... | ... | @@ -0,0 +1,23 @@ |
1 | +#while true; do echo -e "Battery: 13.2v 86% \n Power Consumption: 1.2W \n Date: $(date) \n Uptime: $(uptime)\n\n"> /tmp/index.html; sleep 1; done |
|
2 | + |
|
3 | +while true; do |
|
4 | + SENSORS=(`python ~/ina226.py`) |
|
5 | + |
|
6 | + CURRENT=${SENSORS[0]} |
|
7 | + VOLTAGE=${SENSORS[1]} |
|
8 | + POWER=${SENSORS[2]} |
|
9 | + BATTERY=${SENSORS[3]} |
|
10 | + |
|
11 | + WEATHERS=(`python ~/weather.py`) |
|
12 | + TEMPERATURE=${WEATHERS[0]} |
|
13 | + FORECAST=${WEATHERS[1]} |
|
14 | + LATITUDE=${WEATHERS[2]} |
|
15 | + LONGITUDE=${WEATHERS[3]} |
|
16 | + |
|
17 | + #VOLTAGE=`seq 13 0.1 14 | shuf | head -n1`; |
|
18 | + #BATTERY=`seq 70 1 90 | shuf | head -n1`; |
|
19 | + #POWER=`seq 1 .1 1.5 | shuf | head -n1`; |
|
20 | + |
|
21 | + echo -e "{\"voltage\": $VOLTAGE, \"battery\": $BATTERY, \"powerConsumption\": $POWER, \"current\": $CURRENT, \"forecast\": \"$FORECAST\", \"temperature\": $TEMPERATURE, \"date\": \"$(date)\", \"uptime\": \"$(uptime -p)\", \"latitude\": $LATITUDE, \"longitude\": $LONGITUDE }" > /tmp/index.html; |
|
22 | + sleep 30; |
|
23 | +done |
tools/weather.py
... | ... | @@ -0,0 +1,20 @@ |
1 | +import requests |
|
2 | +from lxml import html |
|
3 | + |
|
4 | +# time series weather forecast |
|
5 | +URL = 'http://www.kma.go.kr/wid/queryDFSRSS.jsp?zone=1153079000' |
|
6 | + |
|
7 | +r = requests.get(URL) |
|
8 | +t = html.fromstring(r.content) |
|
9 | +q = t.xpath('//*[@seq=0]') |
|
10 | + |
|
11 | +x = q[0].text_content().encode('utf8') |
|
12 | + |
|
13 | +temperature = x.split()[2] |
|
14 | +forecast = x.split()[7] |
|
15 | +latitude = '37.493423' |
|
16 | +longitude = '126.834054' |
|
17 | + |
|
18 | +import sys |
|
19 | + |
|
20 | +sys.stdout.write(temperature + ' ' + forecast + ' ' + latitude + ' ' + longitude ) |
wiki/index.html
... | ... | @@ -0,0 +1,149 @@ |
1 | +<!DOCTYPE html> |
|
2 | +<html><head> |
|
3 | + <meta name="generator" content="Hugo 0.80.0" /> |
|
4 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
|
5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
|
6 | + <meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1, maximum-scale=1, minimum-scale=1"/> |
|
7 | + <meta name="apple-mobile-web-app-capable" content="yes"> |
|
8 | + <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|
9 | + |
|
10 | + <link rel="apple-touch-icon" sizes="180x180" href="https://0makes0.com/images/favicons/apple-touch-icon.png"> |
|
11 | + <link rel="icon" type="image/png" sizes="32x32" href="https://0makes0.com/images/favicons/favicon-32x32.png"> |
|
12 | + <link rel="icon" type="image/png" sizes="16x16" href="https://0makes0.com/images/favicons/favicon-16x16.png"> |
|
13 | + <link rel="stylesheet" href="https://0makes0.com/css/tailwind.css"> |
|
14 | + <link href='//spoqa.github.io/spoqa-han-sans/css/SpoqaHanSansNeo.css' rel='stylesheet' type='text/css'> |
|
15 | + <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script> |
|
16 | + <style> |
|
17 | + html * { |
|
18 | + font-family: 'Spoqa Han Sans Neo', 'sans-serif'; |
|
19 | + font-size: 1.25rem; |
|
20 | + } |
|
21 | + |
|
22 | + body { |
|
23 | + } |
|
24 | + |
|
25 | + #hideMe{ |
|
26 | + background: url(https://freight.cargo.site/t/original/i/5d73492aa3e9257fd9fab2d4677af532db8a388f792c55f99cf9168cb2024bb2/arkowebtest3.png) no-repeat center center fixed; |
|
27 | + -webkit-background-size: cover; |
|
28 | + -moz-background-size: cover; |
|
29 | + -o-background-size: cover; |
|
30 | + background-size: cover; |
|
31 | + text-align:center; |
|
32 | + position:fixed; |
|
33 | + width: 100%; |
|
34 | + height: 100%; |
|
35 | + margin: auto; |
|
36 | + overflow: hidden; |
|
37 | + margin:0 auto; |
|
38 | + } |
|
39 | + |
|
40 | + .arko { |
|
41 | + width:100px; |
|
42 | + } |
|
43 | + |
|
44 | + .arko:hover { |
|
45 | + -moz-box-shadow: 0 0 10px #a6a6a6; |
|
46 | + -webkit-box-shadow: 0 0 10px #a6a6a6; |
|
47 | + box-shadow: 0 0 10px #a6a6a6; |
|
48 | + border-radius:10px; |
|
49 | + } |
|
50 | + </style> |
|
51 | + </head> |
|
52 | + <body> |
|
53 | + <div id="hideMe" class=""> |
|
54 | + </div> |
|
55 | + |
|
56 | + <div id="manual" class="lg:max-w-screen-lg m-auto items-end justify-between p-4 pt-10 hidden" style="display: none !important;"> |
|
57 | + |
|
58 | + <center><a href="https://nothingmakesitself.art/Satellite-Project"><img src="https://freight.cargo.site/t/original/i/abcd0824382cdb1e6c2efca6e3d5ae4dd8fc33f6ed88bddbfa25923073865abf/12313123100.png" class="arko"></a></center> |
|
59 | + |
|
60 | + <div> |
|
61 | + |
|
62 | + <h1 class="font-bold text-2xl m-4 mb-10 mt-10">비거니즘 전시 매뉴얼</h1> |
|
63 | + <!-- |
|
64 | + <h2 class="font-bold text-xl ml-4 my-8">들어가며</h1> |
|
65 | + --> |
|
66 | + <p class="leading-10 text-lg mb-10 px-6 py-8 bg-pink-100 lg:text-xl" style="line-height: 2.5rem"> |
|
67 | + ‘비거니즘 전시 매뉴얼’은 전시를 하면서 당면하는 여러 결정의 순간에 환경에 덜 빚지고, 종차별적 착취와 탄소 |
|
68 | + 발생량을 줄이는 방법을 택할 수 있도록, 즉 태도로서 비거니즘적인 실천을 지향할 수 있도록 선택지를 제공하고자 |
|
69 | + 한다. |
|
70 | + <br/> |
|
71 | + <br/> |
|
72 | + |
|
73 | + 하나의 전시가 만들어지고 종료되기까지 전시를 둘러싼 협업자들은 매 순간 수많은 결정을 내린다. 전시 주제, |
|
74 | + 작가와 작품 외에도 드러나게는 공간의 연출, 동선, 조명, 홍보물의 종류와 배포 방식, 보이지 않게는 작품 운송 |
|
75 | + 방법과 포장재의 종류, 운영시간과 매뉴얼, 기록의 방식, 철거와 폐기의 방법 등 크고 작은 결정들이 모여 전시를 |
|
76 | + 이룬다. 코로나 19 상황 이후로는 여기에 동시간대 관객수, 관람 예약 여부와 예약 시간의 간격 등 전에 없던 |
|
77 | + 요소들도 추가되었다. 이러한 결정들을 내릴 때 우선 고려하는 판단 기준은 작품, 전시 주제와의 연결성, 미감, 전시 |
|
78 | + 예산과 안전 등일 것이다. |
|
79 | + <br/> |
|
80 | + <br/> |
|
81 | + |
|
82 | + 우리는 이 고려 항목에 ‘환경에 대한 부담’을 추가하고자 한다. 생태와 환경이 전 지구적으로 중요한 이슈로 |
|
83 | + 떠오르면서, 이와 관련된 전시도 늘고 있다. 그러나 일회용품의 사용을 무엇보다 재고해야 하는 이때 전시는 |
|
84 | + 태생적으로 일시적, 일회적인 특성을 갖는다. 과연 전시라는 매체가 환경적인 주제를 담는 적절한 그릇이 될 수 |
|
85 | + 있을까? 인류의 환경파괴에 관한 고찰이 담긴 작품을 일회용 가벽 안에 두거나 일회용 포장재로 둘둘 싸맬 때, |
|
86 | + 우리는 공공의 가치를 말하기 위해 공공의 환경을 괴롭히는 역설에 놓이고 만다. |
|
87 | + <br/> |
|
88 | + <br/> |
|
89 | + |
|
90 | + ‘환경을 생각하면 전시를 열지 않는 편이 최선’이라거나 ‘일회성은 전시의 속성이니 어쩔 수 없다’고 말하기 앞서, |
|
91 | + 우리는 전시를 하는 과정에서 수없이 마주하는 재료나 방법의 선택에 고려의 기준을 추가하기를 제안한다. 물론 |
|
92 | + 전시를 이루는 결정에서 환경이나 탄소 배출량이 작품이나 안전보다 매번 앞서는 기준이 될 수는 없을 것이다. |
|
93 | + 그러나 우리가 먹는 음식이 어떻게 길러지고 어떤 과정을 거쳐 식탁 위에 오르는지 알아야 하듯이, 내가 사용하는 |
|
94 | + 재료가 어떻게 만들어지고 어떤 과정을 거쳐 버려지고 다시 활용되는지 아는 것은 매우 중요하다. |
|
95 | + <br/> |
|
96 | + <br/> |
|
97 | + |
|
98 | + 예술이 만들어지고 보여지는 과정 전체를 생각하면 전시는 일부에 지나지 않는다. 또한 예술가의 창작 과정에서 |
|
99 | + 선택하게 되는 재료나 재현방식 등 비거니즘 시각으로 점검해야 할 부분은 더 많겠지만 이 매뉴얼에서는 작품 창작 |
|
100 | + 이후의 문제에 집중했다. 전시가 만들어지는 과정을 순서대로 생각해보며, 각 과정에 흔히 사용되는 재료들이 |
|
101 | + 환경에 미치는 영향과 내재 에너지, 대안 재료의 장단점 등을 나열했다. 또한 다소 관습적으로 이루어졌던 전시의 |
|
102 | + 운영에 대해서도 생각해 보고자 했다. |
|
103 | + <br/> |
|
104 | + <br/> |
|
105 | + |
|
106 | + 지구 전체 역사에 비하자면 찰나에의 지나지 않는 인류의 역사는 돌이킬 수 없는 기후재난을 가져왔다. 우리는 |
|
107 | + 환경과 생태를 이야기하는 방식에 있어 ‘인간중심적 태도’를 벗어나 더 적극적인 ‘지속 가능성'에 대해 고민하고자 |
|
108 | + ‘비거니즘'이라는 단어를 선택하였다. ‘비거니즘 전시 매뉴얼’은 작가, 기획자, 디자이너, 건축가 등으로 이루어진 |
|
109 | + 구성원들이 공동으로 ‘작성 중인’ 목록이다. 아직 부족하지만 ‘환경에 대한 부담’을 고려사항에 넣은 ‘비거니즘 전시 |
|
110 | + 매뉴얼’이 전시를 위한 결정과 선택을 앞둔 누군가에게 안내가 되기를 바라고, 같은 분야와 우리의 손이 닿지 않는 |
|
111 | + 곳에서 이미 많은 결정과 선택을 해본 누군가의 도움으로 더 확장될 수 있었으면 좋겠다. 또한 이러한 환경적 기준이 |
|
112 | + 전시를 만드는 과정에서 ‘기본(default)’이 되는 방향으로 나아가기를 기대한다. |
|
113 | + </p> |
|
114 | + </div> |
|
115 | + |
|
116 | + <div class="lg:flex lg:h-64"> |
|
117 | + <div class="lg:w-1/2 hover:bg-pink-100 border border-pink-200 rounded m-1 lg:mr-5" onclick="location.href='/';"> |
|
118 | + <div class="h-64 pt-28 text-center content-center"> |
|
119 | + <a class="font-semibold text-xl underline" href="/"> |
|
120 | + 비거니즘 전시 매뉴얼 위키로 참여하기 |
|
121 | + </a> |
|
122 | + </div> |
|
123 | + </div> |
|
124 | + |
|
125 | + <div class="lg:w-1/2 hover:bg-pink-100 border border-pink-200 rounded m-1 lg:ml-5" onclick="location.href='/book';"> |
|
126 | + <div class="h-64 pt-28 text-center"> |
|
127 | + <a class="font-semibold text-xl underline" href="/book"> |
|
128 | + 비거니즘 전시 매뉴얼 ver.1 읽기 |
|
129 | + </a> |
|
130 | + </div> |
|
131 | + </div> |
|
132 | + </div> |
|
133 | + |
|
134 | + </div> |
|
135 | + </body> |
|
136 | + <script> |
|
137 | +$(function() { |
|
138 | + if (window.sessionStorage.getItem("visited") == 'true'){ |
|
139 | + $("#hideMe").hide(); |
|
140 | + $("#manual").fadeIn(100); |
|
141 | + } else { |
|
142 | + setTimeout( |
|
143 | + function() { $("#hideMe").fadeOut(2000); $("#manual").fadeIn(2000); }, |
|
144 | + 2500); |
|
145 | + } |
|
146 | + window.sessionStorage.setItem("visited", 'true') |
|
147 | +}) |
|
148 | + </script> |
|
149 | +</html> |