From 42abd0db9c796f88d5cfeb4e0ab438a86a2cf5dd Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Thu, 26 Oct 2023 21:58:20 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20du=20rendu=20des=20boutons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/models.py | 2 +- src/agenda_culturel/static/css/style.css | 42 +++++++++++-- .../agenda_culturel/page-events.html | 18 ++++-- .../templates/agenda_culturel/page.html | 3 + src/agenda_culturel/templatetags/cat_extra.py | 63 ++++++++++++++++--- 5 files changed, 108 insertions(+), 20 deletions(-) diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 51e405f..ef317ae 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -46,7 +46,7 @@ class Category(models.Model): def __str__(self): - return self.name + " (" + self.codename + ")" + return self.name class Meta: verbose_name = _('Category') diff --git a/src/agenda_culturel/static/css/style.css b/src/agenda_culturel/static/css/style.css index b460ec9..a3ff7c4 100644 --- a/src/agenda_culturel/static/css/style.css +++ b/src/agenda_culturel/static/css/style.css @@ -1,6 +1,38 @@ -.cat { - line-height: 1.5em; - padding: 0.3em 0.8em; - border-radius: 0.5em; - text-decoration: none; +body { + font-family: 'Open Sans';font-size: 16px; +} + +.nav-buttons { + padding: 1em; + font-weight: bold; +} + + +.cat, .mode { + line-height: 2.4em; + box-sizing: border-box; + height: 2.4em; + padding: 0 1.4em; + border-radius: 1.2em; + text-decoration: none; + display: inline-block; + color: #000; +} + +.cat.selected, .mode.selected { + cursor: default; +} + +.mode { + background-color: #999; +} + +a.mode:hover { + background-color: #666; + color: #FFF; +} + +.mode.selected { + background-color: #444; + color: #fff; } diff --git a/src/agenda_culturel/templates/agenda_culturel/page-events.html b/src/agenda_culturel/templates/agenda_culturel/page-events.html index 5a9a541..0a80023 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-events.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-events.html @@ -8,13 +8,23 @@ {% block content %}
-
- TODO + -
+