Lint template files with djLint

This commit is contained in:
David Larlet 2023-06-20 10:00:02 -04:00
parent 70e3852c0c
commit be5d27d292
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
13 changed files with 80 additions and 47 deletions

View file

@ -13,6 +13,10 @@ develop: ## Install the test and dev dependencies
pretty-templates: ## Prettify template files pretty-templates: ## Prettify template files
djlint umap/templates --reformat djlint umap/templates --reformat
.PHONY: lint-templates
lint-templates: ## Lint template files
djlint umap/templates --lint
.PHONY: version .PHONY: version
version: ## Display the current version version: ## Display the current version
@hatch version @hatch version

View file

@ -2,13 +2,14 @@
{% load i18n static %} {% load i18n static %}
{% block content %} {% block content %}
<div class="content404"> <div class="content404">
<a href="/" title="{% trans 'Take me to the home page' %}"> <a href="{% url "home" %}"
title="{% trans "Take me to the home page" %}">
<h1> <h1>
4 4
<img src="{% static 'umap/img/logo.svg' %}"> <img alt="0" width="128px" height="128px" src="{% static "umap/img/logo.svg" %}">
4 4
</h1> </h1>
<h2>Not Found</h2> <h2>Not Found</h2>
</a> </a>
</div> </div>
{% endblock %} {% endblock content %}

View file

@ -1,8 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<title>Ooops</title> <title>Ooops</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="description"
content="uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.">
<meta name="keywords" content="map, umap">
<style type="text/css"> <style type="text/css">
#container { #container {
width: 400px; width: 400px;
@ -16,8 +19,10 @@
<body> <body>
<div id="container"> <div id="container">
<img alt="" <img alt=""
width="128px"
height="128px"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2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ICA8L2c+Cjwvc3ZnPgo=" />
<p>Oops, Server error…</p> <h1>Oops, Server error…</h1>
</div> </div>
</body> </body>
</html> </html>

View file

@ -3,15 +3,20 @@
<html {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> <html {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head> <head>
<title> <title>
{% block head_title %}{{ SITE_NAME }}{% endblock %} {% block head_title %}
{{ SITE_NAME }}
{% endblock head_title %}
</title> </title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="description"
content="{% trans "uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site." %}">
<meta name="keywords" content="map, umap">
{% block extra_head %} {% block extra_head %}
{% endblock extra_head %} {% endblock extra_head %}
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head> </head>
<body class="{% block body_class %}{% endblock %}"> <body class="{% block body_class %}{% endblock body_class %}">
{% block header %} {% block header %}
{% endblock header %} {% endblock header %}
{% block content %} {% block content %}

View file

@ -3,20 +3,20 @@
<h5>{% trans "Please log in with your account" %}</h5> <h5>{% trans "Please log in with your account" %}</h5>
<div> <div>
{% if form.non_field_errors %} {% if form.non_field_errors %}
<ul class='form-errors'> <ul class="form-errors">
{% for error in form.non_field_errors %}<li>{{ error }}</li>{% endfor %} {% for error in form.non_field_errors %}<li>{{ error }}</li>{% endfor %}
</ul> </ul>
{% endif %} {% endif %}
<form id='login_form' action="{% url 'login' %}" method="POST"> <form id="login_form" action="{% url "login" %}" method="post">
{% csrf_token %} {% csrf_token %}
{{ form.username.errors }} {{ form.username.errors }}
<input type="text" <input type="text"
name="username" name="username"
placeholder="{% trans 'Username' %}" placeholder="{% trans "Username" %}"
autofocus /> autofocus />
{{ form.password.errors }} {{ form.password.errors }}
<input type="password" name="password" placeholder="{% trans 'Password' %}" /> <input type="password" name="password" placeholder="{% trans "Password" %}" />
<input type="submit" value="{% trans 'Login' %}" /> <input type="submit" value="{% trans "Login" %}" />
</form> </form>
</div> </div>
{% endif %} {% endif %}

View file

@ -2,13 +2,21 @@
<div class="wrapper about_summary highlights"> <div class="wrapper about_summary highlights">
<div class="row"> <div class="row">
<div class="col quarter mwide"> <div class="col quarter mwide">
<img class="colophon" src="{{ STATIC_URL }}umap/img/osm.svg" /> <img class="colophon"
src="{{ STATIC_URL }}umap/img/osm.svg"
alt=""
width="128px"
height="128px" />
<p> <p>
{% blocktrans with osm_url="http://osm.org" %}uMap lets you create maps with <a href="{{ osm_url }}" />OpenStreetMap</a> layers in a minute and embed them in your site.{% endblocktrans %} {% blocktrans with osm_url="http://osm.org" %}uMap lets you create maps with <a href="{{ osm_url }}" />OpenStreetMap</a> layers in a minute and embed them in your site.{% endblocktrans %}
</p> </p>
</div> </div>
<div class="col umap-features-list half mwide"> <div class="col umap-features-list half mwide">
<img class="colophon" src="{{ STATIC_URL }}umap/img/edit.svg" /> <img class="colophon"
src="{{ STATIC_URL }}umap/img/edit.svg"
alt=""
width="128px"
height="128px" />
<ul> <ul>
<li>{% trans "Choose the layers of your map" %}</li> <li>{% trans "Choose the layers of your map" %}</li>
<li>{% trans "Add POIs: markers, lines, polygons..." %}</li> <li>{% trans "Add POIs: markers, lines, polygons..." %}</li>
@ -20,7 +28,11 @@
</ul> </ul>
</div> </div>
<div class="col quarter mwide"> <div class="col quarter mwide">
<img class="colophon" src="{{ STATIC_URL }}umap/img/opensource.svg" /> <img class="colophon"
src="{{ STATIC_URL }}umap/img/opensource.svg"
alt=""
width="128px"
height="128px" />
<p class="note"> <p class="note">
{% blocktrans with repo_url="https://github.com/umap-project/umap" %}And it's <a href="{{ repo_url }}">open source</a>!{% endblocktrans %} {% blocktrans with repo_url="https://github.com/umap-project/umap" %}And it's <a href="{{ repo_url }}">open source</a>!{% endblocktrans %}
</p> </p>

View file

@ -1,18 +1,20 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load umap_tags compress i18n %} {% load umap_tags compress i18n %}
{% block body_class %}content{% endblock %} {% block body_class %}
content
{% endblock body_class %}
{% block extra_head %} {% block extra_head %}
{% compress css %} {% compress css %}
{% umap_css %} {% umap_css %}
{% endcompress css %} {% endcompress css %}
{% umap_js %} {% umap_js %}
{% endblock %} {% endblock extra_head %}
{% block header %} {% block header %}
<header class="wrapper row"> <header class="wrapper row">
{% include 'umap/navigation.html' with title=SITE_NAME %} {% include "umap/navigation.html" with title=SITE_NAME %}
</header> </header>
{% include 'umap/messages.html' with title=SITE_NAME %} {% include "umap/messages.html" with title=SITE_NAME %}
{% endblock %} {% endblock header %}
{% block content %} {% block content %}
{% if UMAP_READONLY %} {% if UMAP_READONLY %}
<div class="wrapper demo-instance-warning"> <div class="wrapper demo-instance-warning">

View file

@ -1,4 +1,4 @@
{% load i18n %} {% load i18n %}
<footer> <footer>
<a href="https://wiki.openstreetmap.org/wiki/UMap" class="branding">uMap</a> <a href="https://wiki.openstreetmap.org/wiki/UMap" class="branding">uMap</a>
an OpenStreetMap project an OpenStreetMap project

View file

@ -1,17 +1,21 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load umap_tags compress i18n %} {% load umap_tags compress i18n %}
{% block head_title %}{{ map.name }} - {{ SITE_NAME }}{% endblock %} {% block head_title %}
{% block body_class %}map_detail{% endblock %} {{ map.name }} - {{ SITE_NAME }}
{% endblock head_title %}
{% block body_class %}
map_detail
{% endblock body_class %}
{% block extra_head %} {% block extra_head %}
{% compress css %} {% compress css %}
{% umap_css %} {% umap_css %}
{% endcompress %} {% endcompress %}
{% umap_js locale=locale %} {% umap_js locale=locale %}
{% if object.share_status != object.PUBLIC %}<meta name="robots" content="noindex">{% endif %} {% if object.share_status != object.PUBLIC %}<meta name="robots" content="noindex">{% endif %}
{% endblock %} {% endblock extra_head %}
{% block content %} {% block content %}
{% block map_init %} {% block map_init %}
{% include "umap/map_init.html" %} {% include "umap/map_init.html" %}
{% endblock %} {% endblock map_init %}
{% include "umap/map_messages.html" %} {% include "umap/map_messages.html" %}
{% endblock %} {% endblock content %}

View file

@ -2,7 +2,7 @@
<nav class="umap-nav"> <nav class="umap-nav">
<section> <section>
<h1> <h1>
<a href="/">{{ title }}</a> <a href="{% url "home" %}">{{ title }}</a>
</h1> </h1>
</section> </section>
<section> <section>
@ -16,11 +16,11 @@
</li> </li>
{% else %} {% else %}
<li> <li>
<a href="{% url 'login' %}" class="login">{% trans "Log in" %} / {% trans "Sign in" %}</a> <a href="{% url "login" %}" class="login">{% trans "Log in" %} / {% trans "Sign in" %}</a>
</li> </li>
{% endif %} {% endif %}
<li> <li>
<a href="{% url 'about' %}">{% trans "About" %}</a> <a href="{% url "about" %}">{% trans "About" %}</a>
</li> </li>
<li> <li>
<a href="{{ UMAP_FEEDBACK_LINK }}">{% trans "Help" %}</a> <a href="{{ UMAP_FEEDBACK_LINK }}">{% trans "Help" %}</a>
@ -28,18 +28,18 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% if user.has_usable_password %} {% if user.has_usable_password %}
<li> <li>
<a href="{% url 'password_change' %}">{% trans "Change password" %}</a> <a href="{% url "password_change" %}">{% trans "Change password" %}</a>
</li> </li>
{% endif %} {% endif %}
<li> <li>
<a href="{% url 'logout' %}" class="logout">{% trans "Log out" %}</a> <a href="{% url "logout" %}" class="logout">{% trans "Log out" %}</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
</section> </section>
<section> <section>
{% if not UMAP_READONLY %} {% if not UMAP_READONLY %}
<a href="{% url 'map_new' %}" class="button">{% trans "Create a map" %}</a> <a href="{% url "map_new" %}" class="button">{% trans "Create a map" %}</a>
{% endif %} {% endif %}
</section> </section>
</nav> </nav>

View file

@ -5,21 +5,21 @@
<p> <p>
{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %} {% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}
</p> </p>
<form action="{% url 'password_change' %}" method="POST"> <form action="{% url "password_change" %}" method="get">
{% csrf_token %} {% csrf_token %}
{{ form.old_password.errors }} {{ form.old_password.errors }}
<input type='password' <input type="password"
name='old_password' name="old_password"
placeholder='{% trans "Old password" %}' placeholder="{% trans "Old password" %}"
autofocus /> autofocus />
{{ form.new_password1.errors }} {{ form.new_password1.errors }}
<input type='password' <input type="password"
name='new_password1' name="new_password1"
placeholder='{% trans "New password" %}' /> placeholder="{% trans "New password" %}" />
{{ form.new_password2.errors }} {{ form.new_password2.errors }}
<input type='password' <input type="password"
name='new_password2' name="new_password2"
placeholder='{% trans "New password confirmation" %}' /> placeholder="{% trans "New password confirmation" %}" />
<input type='submit' value='{% trans "Change my password" %}' /> <input type="submit" value="{% trans "Change my password" %}" />
</form> </form>
{% endblock content %} {% endblock content %}

View file

@ -13,7 +13,7 @@
{{ count }} maps found: {{ count }} maps found:
{% endblocktranslate %} {% endblocktranslate %}
</h2> </h2>
{% include "umap/map_list.html" with prefix='search_map' %} {% include "umap/map_list.html" with prefix="search_map" %}
{% else %} {% else %}
<h2>{% trans "No map found." %}</h2> <h2>{% trans "No map found." %}</h2>
{% endif %} {% endif %}

View file

@ -1,15 +1,15 @@
{% load i18n %} {% load i18n %}
<div class="wrapper search_wrapper"> <div class="wrapper search_wrapper">
<div class="row"> <div class="row">
<form action="{% url 'search' %}" method="GET"> <form action="{% url "search" %}" method="get">
<div class="col two-third mwide"> <div class="col two-third mwide">
<input name="q" <input name="q"
type="search" type="search"
placeholder="{% trans 'Search maps' %}" placeholder="{% trans "Search maps" %}"
value="{{ q|default:"" }}" /> value="{{ q|default:"" }}" />
</div> </div>
<div class="col third mwide"> <div class="col third mwide">
<input type="submit" value="{% trans 'Search' %}" class="neutral" /> <input type="submit" value="{% trans "Search" %}" class="neutral" />
</div> </div>
</form> </form>
</div> </div>