Global configuration, templates load once, render many times
This commit is contained in:
parent
74ab125243
commit
7becde6dc7
15 changed files with 300 additions and 120 deletions
31
content/templates/blog.html
Normal file
31
content/templates/blog.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="og:title" content="{{ username }}' blog" />
|
||||
<meta property="og:description" content="Last 5 posts" />
|
||||
<meta property="og:image" content="/static/site-image.png" />
|
||||
|
||||
<title> {{ username }}' blog </title>
|
||||
<link rel="stylesheet" href="/static/css/blog.css">
|
||||
<link rel="shortcut icon" type="image/jpg" href="/static/favicon.ico"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><a href="/blog" class="post-link" style="text-decoration:none;color:black;">{{ username }}' blog</a></h1>
|
||||
<p style="text-align: right"><a href="/blog/all">All Posts</a></p>
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
<article>
|
||||
<a href="/blog/id/{{ post.id }}" class="post-link">[link]</a>
|
||||
<div class="post-content">
|
||||
<h2 class="post-title">{{ post.title }}</h2>
|
||||
<sub class="post-publish-date"> {{ post.publish_date | date(format="%Y-%m-%d at %H:%M") }}</sub>
|
||||
<p class="post-body">{{ post.body }}</p>
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue