Enclose index page and tag page in <article> to fix new CSS.

The new CSS rules apply to article and not body, but these pages
were all written directly on the body.
This commit is contained in:
Ethan Dalool 2020-06-25 14:02:03 -07:00
parent d4ed8c76b1
commit a5974adf6a

View file

@ -284,6 +284,7 @@ def maketagpage(index, path):
path = '/'.join(path) path = '/'.join(path)
page = jinja2.Template(''' page = jinja2.Template('''
<html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
@ -293,17 +294,9 @@ def maketagpage(index, path):
{% else %} {% else %}
<title>Articles by tag</title> <title>Articles by tag</title>
{% endif %} {% endif %}
<style>
body
{
display:grid;
grid-template:
"tagnav tagnav"
"articles refine";
}
</style>
</head> </head>
<body> <body>
<article>
<section style="grid-area:tagnav"> <section style="grid-area:tagnav">
<p><a href="/writing">Back to writing</a></p> <p><a href="/writing">Back to writing</a></p>
{% if parent %} {% if parent %}
@ -343,7 +336,9 @@ def maketagpage(index, path):
</section> </section>
{% endif %} {% endif %}
</article>
</body> </body>
</html>
''').render( ''').render(
parent=parent, parent=parent,
index=index, index=index,
@ -369,6 +364,7 @@ def write_tag_pages():
def write_writing_index(): def write_writing_index():
page = jinja2.Template(''' page = jinja2.Template('''
<html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
@ -377,6 +373,7 @@ def write_writing_index():
</head> </head>
<body> <body>
<article>
<h1>Writing</h1> <h1>Writing</h1>
<ul> <ul>
{% for article in articles %} {% for article in articles %}
@ -396,7 +393,9 @@ def write_writing_index():
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</article>
</body> </body>
</html>
''').render( ''').render(
articles=sorted(ARTICLES.values(), key=lambda a: a.date, reverse=True), articles=sorted(ARTICLES.values(), key=lambda a: a.date, reverse=True),
articles_edited=sorted(ARTICLES.values(), key=lambda a: a.edited, reverse=True) articles_edited=sorted(ARTICLES.values(), key=lambda a: a.edited, reverse=True)