Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123406
D8118.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Subscribers
None
D8118.diff
View Options
diff --git a/assets/src/bundles/webapp/webapp.css b/assets/src/bundles/webapp/webapp.css
--- a/assets/src/bundles/webapp/webapp.css
+++ b/assets/src/bundles/webapp/webapp.css
@@ -312,7 +312,7 @@
color: #fecd1b;
}
-.swh-banner-iframe {
+.swh-banner {
height: 30px;
position: fixed;
top: 30px;
@@ -322,6 +322,13 @@
border: none;
}
+.swh-banner .row {
+ height: 30px;
+ background-color: #fecd1b;
+ color: #e20026;
+ font-size: larger;
+}
+
.swh-position-left {
position: absolute;
left: 0;
diff --git a/swh/web/common/utils.py b/swh/web/common/utils.py
--- a/swh/web/common/utils.py
+++ b/swh/web/common/utils.py
@@ -318,6 +318,7 @@
"ADD_FORGE_MODERATOR_PERMISSION": ADD_FORGE_MODERATOR_PERMISSION,
"FEATURES": get_config()["features"],
"MAILMAP_ADMIN_PERMISSION": MAILMAP_ADMIN_PERMISSION,
+ "lang": "en",
}
diff --git a/swh/web/misc/urls.py b/swh/web/misc/urls.py
--- a/swh/web/misc/urls.py
+++ b/swh/web/misc/urls.py
@@ -53,7 +53,7 @@
return render(
request,
- "misc/hiring-banner.html",
+ "misc/hiring-banner-iframe.html",
{
"lang": lang if lang else "en",
},
diff --git a/swh/web/templates/layout.html b/swh/web/templates/layout.html
--- a/swh/web/templates/layout.html
+++ b/swh/web/templates/layout.html
@@ -138,7 +138,9 @@
</li>
</ul>
</div>
- <iframe class="swh-banner-iframe" src="{% url 'swh-hiring-banner' %}"></iframe>
+ <div class="swh-banner">
+ {% include "misc/hiring-banner.html" %}
+ </div>
<nav class="main-header navbar navbar-expand-lg navbar-light navbar-static-top" id="swh-navbar">
<div class="navbar-header">
<a class="nav-link swh-push-menu" data-widget="pushmenu" data-enable-remember="true" href="#">
diff --git a/swh/web/templates/misc/hiring-banner.html b/swh/web/templates/misc/hiring-banner-iframe.html
copy from swh/web/templates/misc/hiring-banner.html
copy to swh/web/templates/misc/hiring-banner-iframe.html
--- a/swh/web/templates/misc/hiring-banner.html
+++ b/swh/web/templates/misc/hiring-banner-iframe.html
@@ -49,26 +49,6 @@
</style>
</head>
<body>
- <div class="content">
- <div class="container-fluid">
- <div class="row align-items-center justify-content-end">
- <div class="col-12 text-center align-middle pr-3">
- {% if lang == "en" %}
- We are hiring ! See our
- <a target="_blank" rel="noopener noreferrer"
- href="https://www.softwareheritage.org/jobs/">job offers</a>.
- {% elif lang == "fr" %}
- Nous recrutons ! Voir nos
- <a target="_blank" rel="noopener noreferrer"
- href="https://www.softwareheritage.org/jobs/?lang=fr">offres d'emploi</a>.
- {% elif lang == "es" %}
- ¡Estamos contratando! Consulta nuestras
- <a target="_blank" rel="noopener noreferrer"
- href="https://www.softwareheritage.org/jobs/?lang=es">ofertas de empleo</a>.
- {% endif %}
- </div>
- </div>
- </div>
- </div>
+ {% include "./hiring-banner.html" %}
</body>
</html>
diff --git a/swh/web/templates/misc/hiring-banner.html b/swh/web/templates/misc/hiring-banner.html
--- a/swh/web/templates/misc/hiring-banner.html
+++ b/swh/web/templates/misc/hiring-banner.html
@@ -1,74 +1,21 @@
-{% comment %}
-Copyright (C) 2022 The Software Heritage developers
-See the AUTHORS file at the top-level directory of this distribution
-License: GNU Affero General Public License version 3, or any later version
-See top-level LICENSE file for more information
-{% endcomment %}
-
-<!DOCTYPE html>
-
-{% load static %}
-{% load render_bundle from webpack_loader %}
-
-<html class="swh-banner" lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <title>Software Heritage fundraising banner</title>
- {% render_bundle 'vendors' %}
- <script>
-/*
-@licstart The following is the entire license notice for the JavaScript code in this page.
-
-Copyright (C) 2022 The Software Heritage developers
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-@licend The above is the entire license notice for the JavaScript code in this page.
-*/
- </script>
- <style>
- .swh-banner .row {
- height: 30px;
- background-color: #fecd1b;
- color: #e20026;
- font-size: larger;
- }
- </style>
- </head>
- <body>
- <div class="content">
- <div class="container-fluid">
- <div class="row align-items-center justify-content-end">
- <div class="col-12 text-center align-middle pr-3">
- {% if lang == "en" %}
- We are hiring ! See our
- <a target="_blank" rel="noopener noreferrer"
- href="https://www.softwareheritage.org/jobs/">job offers</a>.
- {% elif lang == "fr" %}
- Nous recrutons ! Voir nos
- <a target="_blank" rel="noopener noreferrer"
- href="https://www.softwareheritage.org/jobs/?lang=fr">offres d'emploi</a>.
- {% elif lang == "es" %}
- ¡Estamos contratando! Consulta nuestras
- <a target="_blank" rel="noopener noreferrer"
- href="https://www.softwareheritage.org/jobs/?lang=es">ofertas de empleo</a>.
- {% endif %}
- </div>
- </div>
+<div class="content">
+ <div class="container-fluid">
+ <div class="row align-items-center justify-content-end">
+ <div class="col-12 text-center align-middle pr-3">
+ {% if lang == "en" %}
+ We are hiring ! See our
+ <a target="_blank" rel="noopener noreferrer"
+ href="https://www.softwareheritage.org/jobs/">job offers</a>.
+ {% elif lang == "fr" %}
+ Nous recrutons ! Voir nos
+ <a target="_blank" rel="noopener noreferrer"
+ href="https://www.softwareheritage.org/jobs/?lang=fr">offres d'emploi</a>.
+ {% elif lang == "es" %}
+ ¡Estamos contratando! Consulta nuestras
+ <a target="_blank" rel="noopener noreferrer"
+ href="https://www.softwareheritage.org/jobs/?lang=es">ofertas de empleo</a>.
+ {% endif %}
</div>
</div>
- </body>
-</html>
+ </div>
+</div>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 7:59 AM (8 h, 29 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3227608
Attached To
D8118: Improve hiring banner embedding for django website
Event Timeline
Log In to Comment