mirror of
https://github.com/umap-project/umap.git
synced 2025-05-03 13:11:49 +02:00
Compare commits
16 commits
4ee9f10fc9
...
b8376fde75
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b8376fde75 | ||
![]() |
6945a5e867 | ||
![]() |
2ed890202e | ||
![]() |
cc7685ca3f | ||
![]() |
23688b6444 | ||
![]() |
d3c0947fa5 | ||
![]() |
a135e5c3e1 | ||
![]() |
2ad46046f8 | ||
![]() |
5271d7c19d | ||
![]() |
a535c86f6b | ||
![]() |
9aa1f58dc8 | ||
![]() |
102104f818 | ||
![]() |
35e5a4bda6 | ||
![]() |
6bae315efe | ||
![]() |
93120d91d6 | ||
![]() |
f037973a03 |
7 changed files with 156 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
# Force rtfd to use a recent version of mkdocs
|
# Force rtfd to use a recent version of mkdocs
|
||||||
mkdocs==1.6.1
|
mkdocs==1.6.1
|
||||||
pymdown-extensions==10.14.3
|
pymdown-extensions==10.14.3
|
||||||
mkdocs-material==9.6.10
|
mkdocs-material==9.6.11
|
||||||
mkdocs-static-i18n==1.3.0
|
mkdocs-static-i18n==1.3.0
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Force rtfd to use a recent version of mkdocs
|
# Force rtfd to use a recent version of mkdocs
|
||||||
mkdocs==1.6.1
|
mkdocs==1.6.1
|
||||||
pymdown-extensions==10.14.3
|
pymdown-extensions==10.14.3
|
||||||
mkdocs-material==9.6.10
|
mkdocs-material==9.6.11
|
||||||
mkdocs-static-i18n==1.3.0
|
mkdocs-static-i18n==1.3.0
|
||||||
|
|
|
@ -32,7 +32,7 @@ dependencies = [
|
||||||
"django-agnocomplete==2.2.0",
|
"django-agnocomplete==2.2.0",
|
||||||
"django-environ==0.12.0",
|
"django-environ==0.12.0",
|
||||||
"django-probes==1.7.0",
|
"django-probes==1.7.0",
|
||||||
"Pillow==11.1.0",
|
"Pillow==11.2.1",
|
||||||
"psycopg==3.2.6",
|
"psycopg==3.2.6",
|
||||||
"requests==2.32.3",
|
"requests==2.32.3",
|
||||||
"rcssmin==1.2.1",
|
"rcssmin==1.2.1",
|
||||||
|
@ -47,7 +47,7 @@ dev = [
|
||||||
"ruff==0.11.4",
|
"ruff==0.11.4",
|
||||||
"djlint==1.36.4",
|
"djlint==1.36.4",
|
||||||
"mkdocs==1.6.1",
|
"mkdocs==1.6.1",
|
||||||
"mkdocs-material==9.6.10",
|
"mkdocs-material==9.6.11",
|
||||||
"mkdocs-static-i18n==1.3.0",
|
"mkdocs-static-i18n==1.3.0",
|
||||||
"vermin==1.6.0",
|
"vermin==1.6.0",
|
||||||
"pymdown-extensions==10.14.3",
|
"pymdown-extensions==10.14.3",
|
||||||
|
@ -58,20 +58,20 @@ test = [
|
||||||
"factory-boy==3.3.3",
|
"factory-boy==3.3.3",
|
||||||
"playwright>=1.39",
|
"playwright>=1.39",
|
||||||
"pytest==8.3.5",
|
"pytest==8.3.5",
|
||||||
"pytest-django==4.10.0",
|
"pytest-django==4.11.1",
|
||||||
"pytest-playwright==0.7.0",
|
"pytest-playwright==0.7.0",
|
||||||
"pytest-rerunfailures==15.0",
|
"pytest-rerunfailures==15.0",
|
||||||
"pytest-xdist>=3.5.0,<4",
|
"pytest-xdist>=3.5.0,<4",
|
||||||
"moto[s3]==5.1.3"
|
"moto[s3]==5.1.3"
|
||||||
]
|
]
|
||||||
docker = [
|
docker = [
|
||||||
"uvicorn==0.34.0",
|
"uvicorn==0.34.1",
|
||||||
]
|
]
|
||||||
s3 = [
|
s3 = [
|
||||||
"django-storages[s3]==1.14.6",
|
"django-storages[s3]==1.14.6",
|
||||||
]
|
]
|
||||||
sync = [
|
sync = [
|
||||||
"pydantic==2.11.2",
|
"pydantic==2.11.3",
|
||||||
"redis==5.2.1",
|
"redis==5.2.1",
|
||||||
"websockets==15.0.1",
|
"websockets==15.0.1",
|
||||||
]
|
]
|
||||||
|
|
|
@ -19,6 +19,7 @@ env = environ.Env()
|
||||||
|
|
||||||
INTERNAL_IPS = env.list("INTERNAL_IPS", default=["127.0.0.1"])
|
INTERNAL_IPS = env.list("INTERNAL_IPS", default=["127.0.0.1"])
|
||||||
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"])
|
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"])
|
||||||
|
CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=[])
|
||||||
ADMINS = tuple(parseaddr(email) for email in env.list("ADMINS", default=[]))
|
ADMINS = tuple(parseaddr(email) for email in env.list("ADMINS", default=[]))
|
||||||
ASGI_APPLICATION = "umap.asgi.application"
|
ASGI_APPLICATION = "umap.asgi.application"
|
||||||
|
|
||||||
|
|
140
umap/templates/umap/design_system.html
Normal file
140
umap/templates/umap/design_system.html
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
{% extends "umap/content.html" %}
|
||||||
|
|
||||||
|
{% load umap_tags i18n %}
|
||||||
|
|
||||||
|
{% block messages %}
|
||||||
|
{# We don't want to display errors (yet?). #}
|
||||||
|
{% endblock messages %}
|
||||||
|
|
||||||
|
{% block extra_head %}
|
||||||
|
{{ block.super }}
|
||||||
|
<style type="text/css">
|
||||||
|
h3, h4 {
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
.colors-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.colors-container * {
|
||||||
|
width: 20%;
|
||||||
|
margin: 1rem;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 2rem 1px 1px 1px;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
position: initial;
|
||||||
|
padding: 0 1rem 1rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock extra_head %}
|
||||||
|
|
||||||
|
{% block maincontent %}
|
||||||
|
<div class="wrapper">
|
||||||
|
<h2 class="section">uMap Design System</h2>
|
||||||
|
<div class="row">
|
||||||
|
<h3>Forms</h3>
|
||||||
|
<h4>Copiable link</h4>
|
||||||
|
<div class="copiable-input">
|
||||||
|
<label>Lien vers la carte<input type="text" readonly value="http://example.org"></label><button class="icon icon-24 icon-copy" title="copier" type="button"></button>
|
||||||
|
</div>
|
||||||
|
<h4>Toggle</h4>
|
||||||
|
<div class="formbox">
|
||||||
|
<input type="checkbox" class="switch" id="inBbox"><label for="inBbox">Lister seulement les éléments visibles</label>
|
||||||
|
</div>
|
||||||
|
<h4>Multiple choice</h4>
|
||||||
|
<div class="formbox">
|
||||||
|
<label title="Afficher les boutons de zoom">Afficher les boutons de zoom</label>
|
||||||
|
<div class="umap-multiplechoice by3">
|
||||||
|
<input type="radio" name="zoomControl" id="zoomControl.0" value="true" checked><label for="zoomControl.0">toujours</label>
|
||||||
|
<input type="radio" name="zoomControl" id="zoomControl.1" value="false"><label for="zoomControl.1">jamais</label>
|
||||||
|
<input type="radio" name="zoomControl" id="zoomControl.2" value="null"><label for="zoomControl.2">caché</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h4>Select</h4>
|
||||||
|
<div class="formbox">
|
||||||
|
<label>Voulez-vous afficher un panneau latéral au chargement ?</label>
|
||||||
|
<select name="onLoadPanel">
|
||||||
|
<option value="none">Aucun</option>
|
||||||
|
<option value="caption">Légende</option>
|
||||||
|
<option value="databrowser">Explorateur : données</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<h4>You want it darker…</h4>
|
||||||
|
<div class="panel dark full on">
|
||||||
|
<h3><i class="icon icon-16 icon-settings" title=""></i><span>Titre avec icône</span></h3>
|
||||||
|
|
||||||
|
<details open="">
|
||||||
|
<summary><span>Options d'interface</span></summary>
|
||||||
|
<fieldset>
|
||||||
|
<form>
|
||||||
|
<div class="formbox">
|
||||||
|
<input type="checkbox" name="homeControl" data-ref="input" class="switch" id="homeControl">
|
||||||
|
<label title="Afficher le bouton de retour à l'accueil" for="homeControl">Afficher le bouton de retour à l'accueil</label>
|
||||||
|
</div>
|
||||||
|
<div class="formbox">
|
||||||
|
<label title="Afficher les boutons de zoom">Afficher les boutons de zoom</label>
|
||||||
|
<div class="umap-multiplechoice by3" data-ref="wrapper">
|
||||||
|
<input type="radio" name="zoomControl" id="zoomControl.0" value="true"><label for="zoomControl.0">toujours</label>
|
||||||
|
<input type="radio" name="zoomControl" id="zoomControl.1" value="false" checked><label for="zoomControl.1">jamais</label>
|
||||||
|
<input type="radio" name="zoomControl" id="zoomControl.2" value="null"><label for="zoomControl.2">caché</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="formbox">
|
||||||
|
<label title="Voulez-vous afficher un panneau latéral au chargement ?">Voulez-vous afficher un panneau latéral au chargement ?</label>
|
||||||
|
<select name="onLoadPanel">
|
||||||
|
<option value="none">Aucun</option>
|
||||||
|
<option value="caption">Légende</option>
|
||||||
|
<option value="databrowser">Explorateur : données</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</fieldset>
|
||||||
|
</details>
|
||||||
|
<details open="">
|
||||||
|
<summary><span>Actions avancées</span></summary>
|
||||||
|
<fieldset>
|
||||||
|
<div class="button-bar half">
|
||||||
|
<button class="button" type="button">
|
||||||
|
<i class="icon icon-24 icon-delete"></i>Supprimer
|
||||||
|
</button>
|
||||||
|
<button class="button" type="button">
|
||||||
|
<i class="icon icon-24 icon-empty"></i>Effacer les données
|
||||||
|
</button>
|
||||||
|
<button class="button" type="button">
|
||||||
|
<i class="icon icon-24 icon-empty"></i>Supprimer les calques
|
||||||
|
</button>
|
||||||
|
<button class="button" type="button">
|
||||||
|
<i class="icon icon-24 icon-clone"></i>Cloner cette carte
|
||||||
|
</button>
|
||||||
|
<button class="button" type="button">
|
||||||
|
<i class="icon icon-24 icon-download"></i>Ouvrir le panneau de partage
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
<h3>Colors</h3>
|
||||||
|
<div class="grid-container row colors-container"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock maincontent %}
|
||||||
|
{% block bottom_js %}
|
||||||
|
{{ block.super }}
|
||||||
|
<script type="text/javascript">
|
||||||
|
const colorsContainer = document.querySelector('.colors-container')
|
||||||
|
const styles = getComputedStyle(document.querySelector('html'))
|
||||||
|
let html = ""
|
||||||
|
for (const style of styles) {
|
||||||
|
if (style.startsWith("--") && style.includes("color")) {
|
||||||
|
const value = styles.getPropertyValue(style)
|
||||||
|
html += `<div style="border-color: ${value};">${style}</div>`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const template = document.createElement('template')
|
||||||
|
template.innerHTML = html
|
||||||
|
colorsContainer.appendChild(template.content)
|
||||||
|
</script>
|
||||||
|
{% endblock bottom_js %}
|
|
@ -205,6 +205,7 @@ urlpatterns += i18n_patterns(
|
||||||
)
|
)
|
||||||
urlpatterns += (
|
urlpatterns += (
|
||||||
path("stats/", cache_page(60 * 60)(views.stats), name="stats"),
|
path("stats/", cache_page(60 * 60)(views.stats), name="stats"),
|
||||||
|
path("design_system/", views.design_system, name="design_system"),
|
||||||
path(
|
path(
|
||||||
"favicon.ico",
|
"favicon.ico",
|
||||||
cache_control(max_age=60 * 60 * 24, immutable=True, public=True)(
|
cache_control(max_age=60 * 60 * 24, immutable=True, public=True)(
|
||||||
|
|
|
@ -1410,6 +1410,13 @@ def stats(request):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class DesignSystem(TemplateView):
|
||||||
|
template_name = "umap/design_system.html"
|
||||||
|
|
||||||
|
|
||||||
|
design_system = DesignSystem.as_view()
|
||||||
|
|
||||||
|
|
||||||
@require_GET
|
@require_GET
|
||||||
@cache_control(max_age=60 * 60 * 24, immutable=True, public=True) # One day.
|
@cache_control(max_age=60 * 60 * 24, immutable=True, public=True) # One day.
|
||||||
def webmanifest(request):
|
def webmanifest(request):
|
||||||
|
|
Loading…
Reference in a new issue