From 9290ca7d13878366756300a4e8df78725a2647ec Mon Sep 17 00:00:00 2001 From: Rick Date: Thu, 28 Jan 2021 08:55:36 +0100 Subject: [PATCH] =?UTF-8?q?CSS=20et=20templates=20pour=20la=20base=20et=20?= =?UTF-8?q?l=E2=80=99index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/css/style.css | 76 ++++++++++++++++++++++++++++++++++++++++++++ templates/base.html | 27 ++++++++++++++++ templates/index.html | 23 ++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 static/css/style.css create mode 100644 templates/base.html create mode 100644 templates/index.html 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 %}