From 1435bac8ab9f477555a8c553b84edbb6252c2392 Mon Sep 17 00:00:00 2001 From: kirbylife Date: Sun, 17 Nov 2019 16:09:58 -0600 Subject: [PATCH] Basic display the content of the post --- static/css/base.css | 8 +++++++- static/css/index.css | 10 +++++----- templates/index.html.tera | 2 +- templates/posts.html.tera | 11 +++++++++++ 4 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 templates/posts.html.tera diff --git a/static/css/base.css b/static/css/base.css index 76e2575..7d55ae4 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -58,13 +58,19 @@ nav a:hover { div.container { margin: auto; width: 80%; + min-height: calc(100vh - 9.2em); +} + +strong { + font-family: monospace; + font-size: 10px; } footer { bottom: 0; - position: fixed; display: grid; width: 100%; + margin-top: auto; background-color: #444444; color: #f0f0f0; font-family: monospace; diff --git a/static/css/index.css b/static/css/index.css index 42d7482..2f80c90 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -45,14 +45,14 @@ article figure img { grid-area: info; } -strong { - font-family: monospace; - font-size: 10px; -} - div.pagination { margin-top: 50px; width: auto; height: 3em; text-align: center; } + +div.pagination a { + color: black; + text-decoration: none; +} diff --git a/templates/index.html.tera b/templates/index.html.tera index 83e92ef..faabf14 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -26,7 +26,7 @@ Pages: [ {% for n in range(start=1, end=total_pages+1) %} - página {{ n }}{% if total_pages != n %}, {% endif %} + página {{ n }}{% if total_pages != n %}, {% endif %} {% endfor %} ] diff --git a/templates/posts.html.tera b/templates/posts.html.tera new file mode 100644 index 0000000..0e1d742 --- /dev/null +++ b/templates/posts.html.tera @@ -0,0 +1,11 @@ +{% extends "base" %} +{% block title %}{% endblock title %} + +{% block content %} +

Title: {{ post.title }}

+Content: +
+ {{ post.content | split(pat="\n") | join(sep="----------") }} +
+ +{% endblock content %}