Add djhtml to pre-commit check (#382)

pull/387/head
TAKAHASHI Shuuji 2023-01-10 01:58:17 +09:00 zatwierdzone przez GitHub
rodzic 024d956e5e
commit 0c1e51322f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
38 zmienionych plików z 780 dodań i 767 usunięć

Wyświetl plik

@ -55,3 +55,10 @@ repos:
types-cachetools,
types-python-dateutil,
]
- repo: https://github.com/rtts/djhtml
rev: v1.5.2
hooks:
- id: djhtml
- id: djcss
- id: djjs

Wyświetl plik

@ -1,4 +1,5 @@
<script type="text/hyperscript">
{# fmt:off #}
def imageviewer.show(source)
set source_url to (<img /> in source) @data-original-url
set source_alt to (<img /> in source) @alt
@ -22,6 +23,7 @@
set <#image-viewer img /> @alt to ''
set <#image-viewer figcaption />'s textContent to ''
end
{# fmt:on #}
</script>
<figure id="image-viewer" _="on click imageviewer.close()">
<picture>

Wyświetl plik

@ -1,6 +1,7 @@
{% with name_one=field_name_one|default:"name" name_two=field_name_two|default:"value" %}
<script type="text/hyperscript">
{# fmt:off #}
def {{ field.name }}.collect{{ field.name|title }}Fields()
set newdata to []
for item in <div.{{ field.name }}-row/>
@ -24,12 +25,14 @@
add .{{ field.name }}-row to foo
return foo
end
{# fmt:on #}
</script>
{% include "forms/_field.html" %}
<div class="field multi-option">
<section class="icon-menu">
{# fmt:off #}
<span id="new_{{ field.name }}" stlye="display: none"
_="on load
get the (value of #id_{{ field.name }}) as Object
@ -49,6 +52,7 @@
call {{ field.name }}.addEmptyField()
end
"></span>
{# fmt:on #}
<div class="option">
<span class="option-field">

Wyświetl plik

@ -11,7 +11,7 @@
</fieldset>
<fieldset>
<legend>Password</legend>
<p>To change your password, please trigger a <a href="{% url "trigger_reset" %}">password reset</a>.
<p>To change your password, please trigger a <a href="{% url "trigger_reset" %}">password reset</a>.</p>
</fieldset>
</form>
{% endblock %}