[damned-lies/bootstrap-5: 29/42] feat: apply GNOME colors




commit 1aca1f4bd97ca07f286d4ca8472a7dc7ed76e166
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date:   Sun Sep 18 12:35:39 2022 +0200

    feat: apply GNOME colors

 common/static/css/gnome.css   |  9 +++++++++
 people/templatetags/people.py |  6 ++++--
 templates/base.html           | 13 +++++++------
 3 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/common/static/css/gnome.css b/common/static/css/gnome.css
new file mode 100644
index 00000000..e1244e52
--- /dev/null
+++ b/common/static/css/gnome.css
@@ -0,0 +1,9 @@
+.gnome-background-color {
+  background-color: #4a86cf;
+  border-color: #4a86cf;
+}
+
+.navbar .active {
+  border-bottom-color: #3968a1;
+  border-bottom: 3px solid;
+}
diff --git a/people/templatetags/people.py b/people/templatetags/people.py
index 02a3a8d1..340f841b 100644
--- a/people/templatetags/people.py
+++ b/people/templatetags/people.py
@@ -31,11 +31,13 @@ def people_image(person):
             qs=urlencode([("s", "80"), ("d", "identicon"), ("r", "g")]),
         )
         tag = format_html(
-            '<img class="img-circle" src="{url}" alt="{alt}" crossorigin="anonymous">', url=url, 
alt=_("avatar icon")
+            '<img class="rounded-circle" src="{url}" alt="{alt}" crossorigin="anonymous">',
+            url=url,
+            alt=_("avatar icon"),
         )
     elif person and person.image:
         tag = format_html(
-            '<img class="img-circle" src="{}" alt="{}" onerror="this.onerror = null; this.src=\'{}\'">',
+            '<img class="rounded-circle" src="{}" alt="{}" onerror="this.onerror = null; this.src=\'{}\'">',
             person.image,
             person.name,
             nobody,
diff --git a/templates/base.html b/templates/base.html
index e6cc7cbc..4c9495d5 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -7,6 +7,7 @@
     <title>{% block title %}{% trans "Damned Lies about GNOME" %}{% endblock %}</title>
     <link rel="icon" type="image/png" href="{% static 'img/favicon.ico' %}">
     <link rel="stylesheet" type="text/css" href="{% static 'css/template.css' %}">
+    <link rel="stylesheet" type="text/css" href="{% static 'css/gnome.css' %}">
     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css"; rel="stylesheet"
           integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" 
crossorigin="anonymous">
     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js";
@@ -27,7 +28,7 @@
 
 <body class="d-flex flex-column min-vh-100">
 <header class="gnome-header">
-    <nav class="navbar navbar-default navbar-expand-md navbar-expand-lg sticky-top">
+    <nav class="navbar navbar-expand-md navbar-expand-lg sticky-top gnome-background-color">
         <div class="container">
             <a class="navbar-brand" title="{% trans "Back to Damned Lies home page" %}" href="/">
                 <img height="40" src="{% static 'img/gnome-logo.svg' %}" alt="GNOME − Damned Lies">
@@ -40,28 +41,28 @@
             <div id="navbar-wrapper-dl-applications" class="collapse navbar-collapse">
                 <ul class="navbar-nav">
                     <li class="nav-item">
-                        <a class="nav-link {% if pageSection == "teams" %} active{% endif %}"
+                        <a class="nav-link text-white {% if pageSection == "teams" %} active{% endif %}"
                            {% if pageSection == "teams" %}aria-current="page"{% endif %}
                            href="{% url 'teams' %}">
                             <span>{% trans "Teams" %}</span>
                         </a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link {% if pageSection == "languages" %} active{% endif %}"
+                        <a class="nav-link text-white {% if pageSection == "languages" %} active{% endif %}"
                            {% if pageSection == "languages" %}aria-current="page"{% endif %}
                            href="{% url 'languages' %}">
                             <span>{% trans "Languages" %}</span>
                         </a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link {% if pageSection == "releases" %} active{% endif %}"
+                        <a class="nav-link text-white {% if pageSection == "releases" %} active{% endif %}"
                            {% if pageSection == "releases" %}aria-current="page"{% endif %}
                            href="{% url 'releases' %}">
                             <span>{% trans "Release sets" %}</span>
                         </a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link {% if pageSection == "module" %} active{% endif %}"
+                        <a class="nav-link text-white {% if pageSection == "module" %} active{% endif %}"
                            {% if pageSection == "module" %}aria-current="page"{% endif %}
                            href="{% url 'modules' %}">
                             <span>{% trans "Modules" %}</span>
@@ -81,7 +82,7 @@
                         {% else %}
                             <a id="navbar-user-menu" href="#" class="nav-link dropdown-toggle"
                                role="button" data-bs-toggle="dropdown" aria-expanded="false">
-                                <img src="{% static 'img/avatar-default.svg' %}" alt="GNOME - Damned Lies">
+                                <img class="rounded-circle" src="{% static 'img/avatar-default.svg' %}" 
alt="GNOME - Damned Lies">
                             </a>
                         {% endif %}
                     </li>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]