[damned-lies/bootstrap-5] feat: fix issues with new theme



commit e174bbdb57ad419601ef61f79d6c2c88ef7c4bd0
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date:   Wed Oct 5 19:26:46 2022 +0200

    feat: fix issues with new theme

 common/static/css/bootstrap.min.css          |  7 ----
 common/static/css/bootstrap.rtl.min.css      |  7 ----
 common/static/css/gnome.css                  | 23 ++++++-----
 people/templatetags/people.py                |  4 +-
 templates/about.html                         | 10 +++--
 templates/base.html                          | 58 ++++++++++++++--------------
 templates/people/person_team_membership.html | 14 ++++---
 7 files changed, 59 insertions(+), 64 deletions(-)
---
diff --git a/common/static/css/gnome.css b/common/static/css/gnome.css
index a2eda06e..86b7ea82 100644
--- a/common/static/css/gnome.css
+++ b/common/static/css/gnome.css
@@ -3,20 +3,23 @@
   border-color: #4a86cf;
 }
 
-.navbar .active {
-  border-bottom-color: #3968a1;
-  border-bottom: 3px solid;
+.navbar-nav {
+  margin-top: 0 !important;
+  margin-bottom: 0 !important;
 }
 
-/* Align app names with logo*/
-a.navbar-brand > img {
-  margin-bottom: 3px;
+.gnome-header {
+  padding-bottom: 10px;
 }
 
-.nav-link-dl-app {
-  margin-bottom: 3px;
+table.stats a {
+  text-decoration: none;
 }
 
-.nav-link-dl-app.active {
-  margin-bottom: 0;
+table.stats a:hover {
+  text-decoration: underline;
+}
+
+div#navbar-user-menu-dropdown > a:active {
+  background-color: #4a86cf !important;
 }
diff --git a/people/templatetags/people.py b/people/templatetags/people.py
index 340f841b..ec2bcfa9 100644
--- a/people/templatetags/people.py
+++ b/people/templatetags/people.py
@@ -31,13 +31,13 @@ def people_image(person):
             qs=urlencode([("s", "80"), ("d", "identicon"), ("r", "g")]),
         )
         tag = format_html(
-            '<img class="rounded-circle" src="{url}" alt="{alt}" crossorigin="anonymous">',
+            '<img class="rounded-circle avatar" src="{url}" alt="{alt}" crossorigin="anonymous">',
             url=url,
             alt=_("avatar icon"),
         )
     elif person and person.image:
         tag = format_html(
-            '<img class="rounded-circle" src="{}" alt="{}" onerror="this.onerror = null; this.src=\'{}\'">',
+            '<img class="rounded-circle avatar" src="{}" alt="{}" onerror="this.onerror = null; 
this.src=\'{}\'">',
             person.image,
             person.name,
             nobody,
diff --git a/templates/about.html b/templates/about.html
index 3faeda8c..e5588d9e 100644
--- a/templates/about.html
+++ b/templates/about.html
@@ -5,8 +5,8 @@
 {% block content %}
 <div id="about_page" class="mainpage">
 
-<div class="row clearfix display-inline-block align-middle">
-    <button class="btn btn-info pull-right hidden-xs hidden-sm" style="margin: 20px 0 20px">{{ 
damned_lies_version }}</button>
+<div class="clearfix">
+    <button class="btn btn-info float-end mt-2">{{ damned_lies_version }}</button>
     <h1>{% trans "About Damned Lies" %}</h1>
 </div>
 
@@ -22,8 +22,12 @@
 {% if translator_credits %}
   <p>
     {% trans "This Web site has been translated in your language by:" %}
-    <blockquote>{{ translator_credits|join:", " }}</blockquote>
   </p>
+  <ul>
+    {% for translator in translator_credits %}
+        <li>{{ translator }}</li>
+    {% endfor %}
+  </ul>
 {% endif %}
 
 <h2>{% trans "Quick links" %}</h2>
diff --git a/templates/base.html b/templates/base.html
index 880241c1..073bc326 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -35,9 +35,9 @@
 
 <body class="d-flex flex-column min-vh-100">
 <header class="gnome-header">
-    <nav class="navbar navbar-expand-md navbar-expand-lg sticky-top gnome-background-color">
+    <nav class="navbar navbar-collapse navbar-expand-lg navbar-default">
         <div class="container">
-            <a class="navbar-brand" title="{% trans "Back to Damned Lies home page" %}" href="/">
+            <a class="gnome-navbar-brand" title="{% trans "Back to Damned Lies home page" %}" href="/">
                 <img height="40" src="{% static 'img/gnome-logo.svg' %}" alt="GNOME − Damned Lies">
             </a>
             <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
@@ -45,31 +45,31 @@
                     aria-expanded="false" aria-label="Toggle navigation">
                 <span class="navbar-toggler-icon"></span>
             </button>
-            <div id="navbar-wrapper-dl-applications" class="collapse navbar-collapse">
-                <ul class="navbar-nav">
+            <div id="navbar-wrapper-dl-applications" class="collapse navbar-collapse my-1 my-sm-0 my-md-0 
my-lg-0 my-xl-0">
+                <ul class="nav navbar-nav">
                     <li class="nav-item">
-                        <a class="nav-link text-white nav-link-dl-app {% 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 text-white nav-link-dl-app {% 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 text-white nav-link-dl-app {% 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 text-white nav-link-dl-app {% 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>
@@ -97,10 +97,10 @@
                 </ul>
                 <!-- Login visible to open popup -->
                 <ul class="navbar-nav d-none d-sm-block">
-                    <li class="nav-item dropdown">
+                    <li class="nav-item">
                         {% if user.is_authenticated %}
                             <a id="navbar-user-menu" href="#"
-                               class="nav-link dropdown-toggle px-0 py-0" role="button" 
data-bs-toggle="dropdown"
+                               class="nav-link px-0 py-0 avatar" role="button" data-bs-toggle="dropdown"
                                aria-expanded="false">
                                 {{ user.person|people_image }}
                             </a>
@@ -111,7 +111,7 @@
                                 {% trans "Log in" %}
                             </a>
                         {% endif %}
-                        <div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbar-user-menu">
+                        <div id="navbar-user-menu-dropdown" class="dropdown-menu dropdown-menu-end" 
aria-labelledby="navbar-user-menu">
                             {% include "login/login_usermenu.html" %}
                         </div>
                     </li>
@@ -144,7 +144,7 @@
 </main>
 
 <footer class="footer mt-auto bg-black">
-    <div class="container py-5 mt-5">
+    <div class="container">
         <div class="row">
             <div class="col mb-3">
                 <a href="/" class="d-flex align-items-center mb-3 link-dark text-decoration-none">
@@ -157,29 +157,29 @@
                     <a class="nav-link" href="https://www.gnome.org";>{% trans "The GNOME Project" %}</a>
                 </h5>
                 <ul class="nav flex-column">
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0" href="{% url 'about' %}">{% trans "About Damned 
Lies" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://www.gnome.org/about/";>{% trans "About Us" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://www.gnome.org/get-involved/";>{% trans "Get Involved" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://www.gnome.org/support-gnome/";>{% trans "Support GNOME" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0" href="https://shop.gnome.org/";>{% trans 
"Merchandise" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://www.gnome.org/contact/";>{% trans "Contact Us" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://www.gnome.org/foundation/";>{% trans "The GNOME Foundation" %}</a>
                     </li>
@@ -188,30 +188,30 @@
             <div class="col mb-3">
                 <h5 class="text-light fw-bold">{% trans "Resources" %}</h5>
                 <ul class="nav flex-column">
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://developer.gnome.org";>{% trans "Developer Center" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://help.gnome.org";>{% trans "Documentation" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0" href="https://wiki.gnome.org";>{% trans "Wiki" 
%}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://mail.gnome.org/mailman/listinfo";>{% trans "Mailing Lists" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://wiki.gnome.org/GettingInTouch/IRC";>{% trans "IRC Channels" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://gitlab.gnome.org/";>{% trans "Bug Tracker" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://gitlab.gnome.org/";>{% trans "Development Code" %}</a>
                     </li>
@@ -222,15 +222,15 @@
                     <a class="nav-link" href="https://www.gnome.org/news/";>{% trans "News" %}</a>
                 </h5>
                 <ul class="nav flex-column">
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://www.gnome.org/press/";>{% trans "Press Releases" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://www.gnome.org/start/stable";>{% trans "Latest Release" %}</a>
                     </li>
-                    <li class="nav-item mb-2">
+                    <li class="nav-item">
                         <a class="nav-link text-light p-0"
                            href="https://planet.gnome.org";>{% trans "Planet GNOME" %}</a>
                     </li>
diff --git a/templates/people/person_team_membership.html b/templates/people/person_team_membership.html
index 989e3889..49b46b68 100644
--- a/templates/people/person_team_membership.html
+++ b/templates/people/person_team_membership.html
@@ -6,20 +6,22 @@
         <ul class="list-group">
             {% for role in person.role_set.all %}
                 {% with role.get_role_display as role_name %}
-                    <li class="list-group-item">
-                        <form method="post" action="{% url 'person_team_leave' role.team.name %}">
+                    <li class="list-group-item d-flex justify-content-between align-items-center">
+                        <span>
                             {% blocktrans trimmed with role.team|linked_with:role.team.get_description|safe 
as team_name %}
                                 Member of {{ team_name }} team ({{ role_name }})
                             {% endblocktrans %}
-                            {% if on_own_page %}
+                        </span>
+                        {% if on_own_page %}
+                            <form method="post"
+                                  action="{% url 'person_team_leave' role.team.name %}">
                                 {% csrf_token %}
                                 <button type="submit" class="btn btn-danger float-end"
                                         onclick="return confirm('{% trans 'Are you sure you want to leave 
the team?' %}')">
                                     <i class='fa fa-trash-alt'></i> {% trans 'Leave' %}
                                 </button>
-
-                            {% endif %}
-                        </form>
+                            </form>
+                        {% endif %}
                     </li>
                 {% endwith %}
             {% endfor %}


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