-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: page parking #788
Merged
Merged
feat: page parking #788
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{% load static %} | ||
{% load compress %} | ||
{% load theme_inclusion %} | ||
<!DOCTYPE html> | ||
<html lang="fr"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Améliorations en cours</title> | ||
<link rel="shortcut icon" href="{% static_theme_images "favicon.ico" %}" type="image/ico"> | ||
{% import_static_CSS_theme_inclusion %} | ||
{% compress css %} | ||
<link rel="stylesheet" href="{% static 'stylesheets/itou_communaute.scss' %}" type="text/x-scss"> | ||
{% endcompress %} | ||
</head> | ||
<body id="top"> | ||
<header role="banner" id="header"> | ||
<section class="s-header"> | ||
<div class="s-header__container container"> | ||
<div class="s-header__row row"> | ||
<div class="s-header__col s-header__col--logo-ministere col col-md-auto d-flex align-items-center pe-0"> | ||
<a href="{% url 'pages:home' %}" class="s-header__logo-ministere"> | ||
<img src="{% static_theme_images 'logo-republique-francaise.svg' %}" alt="Rébublique Française"> | ||
</a> | ||
</div> | ||
<div class="s-header__col s-header__col--logo-service col-auto d-flex align-items-center px-0"> | ||
<a href="{% url 'pages:home' %}"> | ||
<img src="{% static_theme_images 'logo-communaute-inclusion.svg' %}" height="90" alt="La communauté de l'inclusion"> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</header> | ||
<main id="main" role="main" class="s-main"> | ||
<section class="s-cms"> | ||
<div class="s-cms__container container container-max-lg"> | ||
<div class="s-cms__row row"> | ||
<div class="s-cms__col col-12"> | ||
<article> | ||
<h1 class="h2"> | ||
Nous faisons quelques améliorations sur le site de la communauté. | ||
<br> | ||
Elles sont bientôt terminées … promis ! | ||
</h1> | ||
<div style="width:100%;height:0;padding-bottom:56%;position:relative;"> | ||
<iframe src="https://giphy.com/embed/8vnjJZSKFYUa13gGri" width="100%" height="100%" style="position:absolute" frameBorder="0" class="giphy-embed" allowFullScreen></iframe> | ||
</div> | ||
</article> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</main> | ||
<footer role="contentinfo" id="footer"> | ||
<section class="s-footer-gip"> | ||
<div class="s-footer-gip__container container"> | ||
<div class="s-footer-gip__row row"> | ||
<div class="s-footer-gip__col s-footer-gip__col--logo col-12 col-md-6 col-lg-auto"> | ||
<a href="https://inclusion.beta.gouv.fr/" target="_blank" aria-label="Découvrez les services de la plateforme de l'inclusion (lien externe)"> | ||
<img src="{% static_theme_images 'logo-plateforme-inclusion.svg' %}" height="80" alt="Logo de la Plateforme de l'inclusion"> | ||
</a> | ||
</div> | ||
<div class="s-footer-gip__col col-12 col-md-6 col-lg"> | ||
<p class="mb-1"> | ||
<strong>Ce service fait partie de la Plateforme de l’inclusion</strong> | ||
</p> | ||
<p class="m-0"> | ||
Découvrez les outils qui portent l'inclusion au | ||
<br class="d-none d-md-inline"> | ||
coeur de leur service. A chaque service, son objectif. | ||
<br> | ||
<a href="https://inclusion.beta.gouv.fr/" target="_blank" class="has-external-link" aria-label="Découvrez les services de la plateforme de l'inclusion (lien externe)">Découvrez nos services</a> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from django.conf import settings | ||
from django.shortcuts import render | ||
|
||
|
||
class ParkingPageMiddleware: | ||
def __init__(self, get_response): | ||
self.get_response = get_response | ||
|
||
def __call__(self, request): | ||
if settings.PARKING_PAGE and not request.path.startswith("/admin/"): | ||
return render(request, "middleware/parking.html") | ||
response = self.get_response(request) | ||
return response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.test import TestCase, override_settings | ||
|
||
|
||
class ParkingMiddlewareTest(TestCase): | ||
@override_settings(PARKING_PAGE=True) | ||
def test_parking_page_middleware(self): | ||
response = self.client.get("/") | ||
self.assertEqual(response.status_code, 200) | ||
self.assertTemplateUsed(response, "middleware/parking.html") | ||
|
||
@override_settings(PARKING_PAGE=False) | ||
def test_no_parking_page_middleware(self): | ||
response = self.client.get("/") | ||
self.assertEqual(response.status_code, 200) | ||
self.assertTemplateUsed(response, "pages/home.html") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je suppose que par défaut on ne veux pas la page parking donc je dirais plutôt :