diff --git a/app.py b/app.py index 35d58f4fe562e4a1a790a5264d40dc796d9891f0..f7c5f3632de1daec76c39ddb4785401baf1f1f2f 100644 --- a/app.py +++ b/app.py @@ -50,6 +50,7 @@ WIKI_REDIRECTS = { @app.route('/') +@app.route('/dark') def home(): return render_template('index.html') @@ -116,6 +117,7 @@ def get_posts(**kwargs): return ret @app.route('/blog/') +@app.route('/dark/blog/') def blog(): return render_template('blog.html', year_posts=get_posts(create_html=False)) @@ -140,11 +142,13 @@ def atom(): return feed.get_response() @app.route('/blog/////') +@app.route('/dark/blog/////') def blog_post(y, m, d, slug): blog = parse_post('-'.join([y, m, d, slug]) + '.md') return render_template('blog-post.html', **blog) @app.route('/.html') +@app.route('/dark/.html') def static_page(page): with open(os.path.join(PAGE_CONTENT_DIR, page + '.md'), encoding="utf-8") as handle: diff --git a/templates/base.html b/templates/base.html index 5259209e9089ba68a2a113685a137b4cdb6946f9..93acdb56712c9908bc3c9c67529b85b1101c70b3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,3 +1,4 @@ +{% if request.path.startswith('/dark') %}{% set dark = '/dark' %}{% else %}{% set dark = '/' %}{% endif %} @@ -15,21 +16,25 @@ - + {% if request.path.startswith('/dark') %} + + {% else %} + + {% endif %} {% block extra_link %}{% endblock %}
-