post pathing
This commit is contained in:
21
templates/base.html
Normal file
21
templates/base.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="stylesheet" href="/static/style.css"
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>Posts</li>
|
||||
<li>Contact</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<div style="padding: auto">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,27 +1,10 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="stylesheet" href="/static/style.css"
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>Posts</li>
|
||||
<li>Contact</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<div style="padding: auto">
|
||||
<div>
|
||||
<p id="name">Jeremy Janella</p>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
{{ content|safe }}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<p id="name">Jeremy Janella</p>
|
||||
|
||||
{{ content|safe }}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
4
templates/post-preview.html
Normal file
4
templates/post-preview.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<h2>{{ post.title }}</h2>
|
||||
{{ post.summary }}
|
||||
</div>
|
||||
9
templates/post.html
Normal file
9
templates/post.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{{ title|safe }}
|
||||
|
||||
{{ content|safe }}
|
||||
|
||||
{% endblock %}
|
||||
13
templates/posts.html
Normal file
13
templates/posts.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
||||
<div id="posts-grid">
|
||||
{% for post in posts %}
|
||||
{% include "post-preview.html" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user