commit 9290ca7d13878366756300a4e8df78725a2647ec Author: Rick Date: Thu Jan 28 08:55:36 2021 +0100 CSS et templates pour la base et l’index diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..dff30f8 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,76 @@ +/* Parametres generaux */ + +* { + margin: 0; + background-color: #121224; +} + +header { + height: 3em; + /*padding: 3%;*/ + padding-left: 20px; + margin-bottom: 10%; + box-shadow: 0 4px 15px; + background-color: #0E0E1B; + display: flex; +} + +header * { + background-color: #0E0E1B; +} + +header p { + padding-top: 1em; + margin-right: 1.5em; +} + +header a { + color: white; + text-decoration: none; +} + +footer { + text-align: center; + color: white; +} + +/* Parametres pour index */ + +.pre-art * { + background-color: #0E0E1B; +} + +.pre-art { + background-color: #0E0E1B; + padding: 2%; + padding-bottom: 3%; + border: 1px solid darkgray; + box-shadow: 1px 1px 5px grey; + color: white; + margin-left: 20%; + margin-right: 20%; + margin-bottom: 5%; +} + +.pre-art a { + color: white; + text-decoration: none; +} + +.summary { + margin-bottom: 5%; +} + +.author:link { + color: #6A89CC; +} + +.category:link { + color: #2DCF29; +} + +.continue:link { + background-color: #3C5DA4; + border-radius: 50px; + padding: 15px; +} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..6772c00 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,27 @@ + + + + {% block head %} + {% block title %}{{ SITENAME }}{% endblock title %} + + + {% endblock head %} + + +
+

{{ SITENAME.upper() }}

+ {% if DISPLAY_CATEGORIES_ON_MENU %} + {% for name, tmp in categories %} +

{{ name }}

+ {% endfor %} + {% endif %} +
+ + {% block content %} + {% endblock content %} + + + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..e397a85 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% block content %} + +{% for art in articles_page.object_list %} +
+

Par + {% for author in art.authors %} + {{ author }} + {% endfor %} + dans {{ art.category }} le 21/08/2020. +

+
+ +

{{ art.title }}

+
+
+ {{ art.summary }} +
+ Continuer à lire +
+{% endfor %} + +{% endblock content %}