forked from github.com/blag
differentiate between pages and articles
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<h1>Archive</h1>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% for entry in archive %}
|
||||
|
||||
{% if entry.title %}
|
||||
<h1><a href="{{entry.dst}}">{{entry.title}}</a></h1>
|
||||
{% endif %}
|
||||
|
||||
{% if entry.date %}
|
||||
<p>Written on {{ entry.date.date() }}.</p>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
|
||||
27
blag/templates/base.html
Normal file
27
blag/templates/base.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1>A Blog</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="/">Blog</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
7
blag/templates/page.html
Normal file
7
blag/templates/page.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user