CSS et templates pour la base et l’index

This commit is contained in:
Rick 2021-01-28 08:55:36 +01:00
commit 9290ca7d13
Signed by: Rick
GPG key ID: 9570A7DB7CB2F436
3 changed files with 126 additions and 0 deletions

76
static/css/style.css Normal file
View file

@ -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;
}

27
templates/base.html Normal file
View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
<head>
{% block head %}
<title> {% block title %}{{ SITENAME }}{% endblock title %}</title>
<meta charset="utf-8" />
<link rel=stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}" />
{% endblock head %}
</head>
<body>
<header>
<p><a href="{{ SITEURL }}/">{{ SITENAME.upper() }}</a></p>
{% if DISPLAY_CATEGORIES_ON_MENU %}
{% for name, tmp in categories %}
<p><a href="{{ SITEURL }}/{{ name.url }}">{{ name }}</a></p>
{% endfor %}
{% endif %}
</header>
{% block content %}
{% endblock content %}
<footer>
Thème principal fait par Eban, jai aussi repris des éléments de medius.
</footer>
</body>
</html>

23
templates/index.html Normal file
View file

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
{% for art in articles_page.object_list %}
<div class="pre-art">
<p class=infos-art">Par
{% for author in art.authors %}
<a href="{{ SITEURL }}/{{ author.url }}" class="author">{{ author }}</a>
{% endfor %}
dans <a href="{{ SITEURL }}/{{ art.category.url }}" class="category">{{ art.category }}</a> le 21/08/2020.
</p>
<br />
<h2><a href="{{ SITEURL }}/{{ art.url }}">{{ art.title }}</a></h2>
<br />
<div class="summary">
{{ art.summary }}
</div>
<a href="{{ SITEURL }}/{{ art.url }}" class="continue">Continuer à lire</a>
</div>
{% endfor %}
{% endblock content %}