-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add environment callback - add some Unfold settings
- Loading branch information
1 parent
3ccc120
commit 9dddf71
Showing
10 changed files
with
303 additions
and
25 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.conf import settings | ||
|
||
|
||
def environment_callback(_): | ||
environment = f"{settings.ENVIRONMENT} | {settings.VERSION_SUFFIX}" | ||
log_level = settings.DJANGO_LOG_LEVEL | ||
|
||
return environment, log_level |
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,24 @@ | ||
{% load i18n %} | ||
|
||
<div class="flex flex-col gap-4 lg:flex-row lg:items-center"> | ||
<div class="flex flex-col"> | ||
<strong class="block font-semibold"> | ||
{% block announcement_title %}{% endblock %} | ||
</strong> | ||
|
||
<p class="leading-relaxed max-w-3xl mt-2"> | ||
{% block announcement_description %}{% endblock %} | ||
</p> | ||
</div> | ||
|
||
{% block announcement_cta %} | ||
<div class="lg:ml-auto"> | ||
<a | ||
href="{% block announcement_cta_url %}{% endblock %}" | ||
class="bg-white shadow-sm block border border-transparent font-semibold px-3 py-2 rounded-md text-sm text-center text-blue-700 w-full whitespace-nowrap lg:w-auto dark:bg-blue-500/20 dark:text-white" | ||
target="_blank"> | ||
{% block announcement_cta_text %}{% endblock %} | ||
</a> | ||
</div> | ||
{% endblock %} | ||
</div> |
15 changes: 15 additions & 0 deletions
15
backend/templates/v3/admin/announcements/work_in_progress.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,15 @@ | ||
{% extends "admin/announcements/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block announcement_title %} | ||
{% trans "Work in progress" %} | ||
{% endblock %} | ||
|
||
{% block announcement_description %} | ||
{% trans "The site is still a work in progress. If you have any feedback, please let us know" %} | ||
{% endblock %} | ||
|
||
{% block announcement_cta_url %}mailto:{{ contact_email }}{% endblock %} | ||
|
||
{% block announcement_cta_text %}{% trans "Contact us" %}{% endblock %} |
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,25 @@ | ||
{% extends 'admin/base.html' %} | ||
|
||
{% load cache humanize i18n %} | ||
|
||
{% block breadcrumbs %}{{ block.super }}{% endblock %} | ||
|
||
{% block title %} | ||
{% if subtitle %} | ||
{{ subtitle }} | | ||
{% endif %} | ||
|
||
{{ title }} | {{ site_title|default:_('Django site admin') }} | ||
{% endblock %} | ||
|
||
{% block branding %} | ||
<h1 id="site-name"> | ||
<a href="{% url 'admin:index' %}"> | ||
{{ site_header|default:_('Django administration') }} | ||
</a> | ||
</h1> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% include "unfold/helpers/messages.html" %} | ||
{% endblock %} |
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,38 @@ | ||
{% extends 'admin/base_admin.html' %} | ||
|
||
{% load unfold i18n %} | ||
|
||
{% block content %} | ||
{% component "unfold/components/container.html" %} | ||
|
||
{% component "unfold/components/flex.html" with class="gap-4" %} | ||
{% component "unfold/components/navigation.html" with items=navigation %}{% endcomponent %} | ||
|
||
{% component "redirect/components/dropdown_navigation.html" with class="ml-auto" items=filters title="AAAAA" %}{% endcomponent %} | ||
{% endcomponent %} | ||
|
||
{% component "unfold/components/flex.html" with class="gap-8 mb-8 flex-col lg:flex-row" %} | ||
{% for stat in stats %} | ||
{% component "redirect/components/card.html" with class="lg:w-1/3" label=stat.label footer=stat.footer footer_class=stat.footer_class %} | ||
{% component "unfold/components/title.html" %} | ||
{{ stat.metric }} | ||
{% endcomponent %} | ||
|
||
{% component "unfold/components/text.html" %} | ||
{{ stat.title }} | ||
{% endcomponent %} | ||
{% endcomponent %} | ||
{% endfor %} | ||
{% endcomponent %} | ||
|
||
{% endcomponent %} | ||
|
||
|
||
<h2> | ||
{{ page_title }} | ||
</h2> | ||
<p> | ||
{{ page_description }} | ||
</p> | ||
|
||
{% endblock %} |
Oops, something went wrong.