diff --git a/static/css/index.css b/static/css/index.css index 2f80c90..24c06e8 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -8,7 +8,7 @@ article { grid-template-columns: 15em auto 20em; grid-template-rows: 1em 1em auto 1em; - grid-template-areas : + grid-template-areas: "image-key . ." "image title title" "image body body" diff --git a/static/css/post.css b/static/css/post.css new file mode 100644 index 0000000..a70d047 --- /dev/null +++ b/static/css/post.css @@ -0,0 +1,36 @@ +div.container { + display: grid; + grid-template-columns: 7fr 1fr; + gird-template-rows: 1fr 1fr 1fr; + + grid-template-areas: + "title title" + ". date" + "content content"; +} + +.title { + grid-area: title; + margin: 0; + margin-top: 10px; +} + +article { + grid-area: content; +} + +.date { + grid-area: date; + margin: 2px; +} + +pre { + font-family: monospace; + background-color: #444444; + color: white; + padding-top: 0.7em; + padding-right: 0.7em; + padding-bottom: 0.7em; + padding-left: 0.5em; + width: auto; +} diff --git a/templates/post.html.tera b/templates/post.html.tera index c37baa1..4dd8110 100644 --- a/templates/post.html.tera +++ b/templates/post.html.tera @@ -1,11 +1,15 @@ {% extends "base" %} {% block title %}CódigoComentado - {{post.title}}{% endblock title %} +{% block extracss %} + +{% endblock extracss %} + {% block content %} -

Title: {{ post.title }}

-Content: +

Title: {{ post.title }}

+Date: {{ post.created_at | date(format="%Y-%m-%d") }}
+ Content: {{ post.content | safe }}
- {% endblock content %}