diff options
Diffstat (limited to '.templates')
| -rw-r--r-- | .templates/base.html | 79 | ||||
| -rw-r--r-- | .templates/document.html | 12 | ||||
| -rw-r--r-- | .templates/listing.html | 41 |
3 files changed, 111 insertions, 21 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&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>). |
