summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.templates/base.html79
-rw-r--r--.templates/document.html12
-rw-r--r--.templates/listing.html41
-rw-r--r--markdoc.yaml3
-rw-r--r--static/media/css/custom.css11
-rw-r--r--static/media/css/grimoire.css107
-rw-r--r--static/media/css/reset.css48
7 files changed, 269 insertions, 32 deletions
diff --git a/.templates/base.html b/.templates/base.html
index a3e3f7a..d13e17a 100644
--- a/.templates/base.html
+++ b/.templates/base.html
@@ -1,19 +1,64 @@
-{% extends 'markdoc-default/base.html' %}
-{% block css %}
-{{ super() }}
-{{ html.cssimport(make_relative("/media/css/custom.css")) }}
-{% endblock %}
+<!DOCTYPE html>
+<html>
+<head>
+ <title>
+ {% block title_prefix -%}
+ {% if 'wiki-name' in config %}{{ config['wiki-name']|e }} » {% endif %}
+ {%- endblock %}
+ {% block title -%}
+ {{ title }}
+ {%- endblock %}
+ </title>
-{% block body_footer %}
-<div id="footer">
- <p>
- {% if 'wiki-name' in config %}
- {{ config['wiki-name']|e }} —
- {% endif %}
- Powered by <a href="http://markdoc.org/">Markdoc</a>.
- {% block github_info %}
- <a href="https://github.com/ojacobson/grimoiredotca">See it on GitHub</a>.
- {% endblock %}
- </p>
+ <link
+ rel='stylesheet'
+ type='text/css'
+ href='http://fonts.googleapis.com/css?family=Buenard:400,700&amp;subset=latin,latin-ext'>
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ make_relative('/media/css/reset.css') }}">
+ <link
+ rel="stylesheet"
+ type="text/css"
+ href="{{ make_relative('/media/css/grimoire.css') }}">
+</head>
+<body>
+
+<div id="shell">
+ {% if crumbs %}
+ <ol id="breadcrumbs">
+ {% for name, href in crumbs %}
+ <li class="crumb-{{ loop.index0 }} {% if loop.last %}last{% else %}not-last{% endif %}">
+ {% if not href %}
+ {{ name|e }}
+ {% else %}
+ <a href="{{ make_relative(href)|e }}">{{ name|e }}</a>
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ol>
+ {% endif %}
+
+ {% block content %}
+ {% endblock %}
+
+ {% block after_content %}
+ {% endblock %}
+
+ {% block footer %}
+ <div id="footer">
+ <p>
+ {% if 'wiki-name' in config %}
+ {{ config['wiki-name']|e }} —
+ {% endif %}
+ Powered by <a href="http://markdoc.org/">Markdoc</a>.
+ {% block github_info %}
+ <a href="https://github.com/ojacobson/grimoiredotca">See it on GitHub</a>.
+ {% endblock %}
+ </p>
+ </div>
+ {% endblock %}
</div>
-{% endblock %} \ No newline at end of file
+</body>
+</html>
diff --git a/.templates/document.html b/.templates/document.html
index cb57103..2ccc18c 100644
--- a/.templates/document.html
+++ b/.templates/document.html
@@ -1,5 +1,12 @@
-{% extends 'markdoc-default/document.html' %}
-{% block body_footer %}
+{% extends 'base.html' %}
+
+{% block content %}
+ <div id="article">
+ {{ content }}
+ </div>
+{% endblock %}
+
+{% block after_content %}
<div id="comments">
<div id="disqus_thread"></div>
<script type="text/javascript">
@@ -16,7 +23,6 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
-{{ super() }}
{% endblock %}
{% block github_info %}
diff --git a/.templates/listing.html b/.templates/listing.html
index a26eb04..71c9b31 100644
--- a/.templates/listing.html
+++ b/.templates/listing.html
@@ -1,4 +1,43 @@
-{% extends 'markdoc-default/listing.html' %}
+{% extends 'base.html' %}
+
+{% block title %}ls /{{ directory|e }}{% endblock %}
+
+{% block content %}
+ <div id="listing">
+ <h1><code>ls /{{ directory|e }}</code></h1>
+
+ {% if sub_directories %}
+ <div id="directories">
+ <h2>Directories</h2>
+ <ul>
+ {% for dir in sub_directories %}
+ <li><a href="{{ make_relative(dir.href) }}">{{ dir.basename|e }}/</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+
+ {% if pages %}
+ <div id="pages">
+ <h2>Pages</h2>
+ <ul>
+ {% for page in pages %}
+ <li><a href="{{ make_relative(page.href) }}">{{ page.title }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+
+ {% if files %}
+ <div id="files">
+ <h2>Files</h2>
+ {% for file in files %}
+ <li><a href="{{ make_relative(file.href) }}">{{ file.basename|e }}</a></li>
+ {% endfor %}
+ </div>
+ {% endif %}
+ </div>
+{% endblock %}
{% block github_info %}
<a href="https://github.com/ojacobson/grimoiredotca/tree/master/wiki/{{ directory }}">See this directory on GitHub</a> (<a href="https://github.com/ojacobson/grimoiredotca/commits/master/wiki/{{ directory }}">history</a>).
diff --git a/markdoc.yaml b/markdoc.yaml
index 06800e5..2f3d87a 100644
--- a/markdoc.yaml
+++ b/markdoc.yaml
@@ -1,5 +1,8 @@
wiki-name: "The Codex"
+use-default-templates: false
+use-default-static: false
+
markdown:
extensions:
- extra
diff --git a/static/media/css/custom.css b/static/media/css/custom.css
deleted file mode 100644
index a19c798..0000000
--- a/static/media/css/custom.css
+++ /dev/null
@@ -1,11 +0,0 @@
-body #comments {
- background-color: white;
- clear: both;
- float: left;
- overflow: hidden;
- border-top: 8px solid #f6f6f6;
- padding: 15px 20px;
- width: 610px; }
-
-a[href^="https:"] {
- text-decoration: underline; }
diff --git a/static/media/css/grimoire.css b/static/media/css/grimoire.css
new file mode 100644
index 0000000..b680007
--- /dev/null
+++ b/static/media/css/grimoire.css
@@ -0,0 +1,107 @@
+/* typography */
+body {
+ font-family: 'Baskerville', 'Buenard', serif;
+ font-size: 20px;
+ line-height: 30px;
+}
+
+code {
+ font-family: 'Menlo', monospace;
+ font-size: 80%;
+}
+
+em {
+ font-style: italic;
+}
+
+strong {
+ font-weight: bold;
+}
+
+blockquote {
+ margin-left: 40px;
+ color: #555;
+}
+
+:link {
+ text-decoration: none;
+}
+
+hr {
+ border: none;
+ border-top: 1px solid #AAA;
+ margin-left: 80px;
+ margin-right: 80px;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-weight: bold;
+}
+
+h1 {
+ font-size: 40px;
+ line-height: 60px;
+ margin-bottom: 15px;
+}
+h2 {
+ font-size: 30px;
+ line-height: 45px;
+ margin-bottom: 15px;
+}
+h3 {
+ font-size: 20px;
+ line-height: 30px;
+ margin-bottom: 15px;
+}
+
+/* layout */
+#shell {
+ margin-left: auto;
+ margin-right: auto;
+ width: 840px;
+}
+
+#shell > * {
+ margin-top: 15px;
+ margin-bottom: 15px;
+ padding: 0 10px;
+}
+
+#article,
+#listing {
+ padding-left: 50px;
+}
+h1, h2, h3, h4, h5, h6 {
+ margin-left: -40px;
+}
+
+#article p,
+#article pre,
+#article ul,
+#article ol,
+#listing ul {
+ margin-bottom: 15px;
+}
+
+#article pre {
+ margin-left: 40px;
+}
+
+#article ul {
+ list-style-type: disc;
+}
+#article ol {
+ list-style-type: decimal;
+}
+
+#article ul,
+#article ol {
+ padding-left: 40px;
+}
+
+#breadcrumbs li {
+ display: inline-block;
+}
+#breadcrumbs li.not-last:after {
+ content: '•';
+} \ No newline at end of file
diff --git a/static/media/css/reset.css b/static/media/css/reset.css
new file mode 100644
index 0000000..e29c0f5
--- /dev/null
+++ b/static/media/css/reset.css
@@ -0,0 +1,48 @@
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+body {
+ line-height: 1;
+}
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}