Add djhtml to pre-commit check (#382)

This commit is contained in:
TAKAHASHI Shuuji 2023-01-10 01:58:17 +09:00 committed by GitHub
parent 024d956e5e
commit 0c1e51322f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 780 additions and 767 deletions

View file

@ -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

View file

@ -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>

View file

@ -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">

View file

@ -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 %}