Lint ui template files with djlint

This commit is contained in:
Théophile Diot 2024-03-18 10:48:04 +00:00
parent a7af4c548b
commit f9378678c6
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06
7 changed files with 98 additions and 92 deletions

View file

@ -8,3 +8,4 @@ src/ui/templates/account.html:hashicorp-tf-password:470
src/ui/templates/settings_plugins.html:hashicorp-tf-password:87
src/ui/templates/settings_plugins.html:hashicorp-tf-password:297
src/ui/templates/settings_plugins.html:hashicorp-tf-password:106
src/ui/templates/account.html:hashicorp-tf-password:154

View file

@ -36,7 +36,7 @@
<!-- text and icon -->
<span class="tabs-name">{{ tab['name'] }}</span>
<svg role="button"
data-popover-btn="{{ tab['name'] }}"
data-popover-btn="{{ tab['name'] }}"
class=" fill-blue-500 h-5 w-5 mr-2 hover:brightness-95"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512">
@ -63,9 +63,7 @@
<div data-tab-item="pro"
class="grid grid-cols-12 w-full justify-items-center">
<div class="col-span-12">
<h5 class="text-xl my-1 text-center transition duration-300 ease-in-out font-bold m-0 mb-4 dark:text-gray-200">
PRO
</h5>
<h5 class="text-xl my-1 text-center transition duration-300 ease-in-out font-bold m-0 mb-4 dark:text-gray-200">PRO</h5>
<div class="flex justify-center items-center">
<p class="mb-0 mr-2 dark:text-gray-300">{{ pro_info['message'] }}</p>
<div role="img"
@ -92,13 +90,12 @@
</div>
</div>
{% if pro_info['link_message'] %}
<div class="flex justify-center mt-2">
<a class="text-center font-semibold text-yellow-500 underline"
target="_blank"
href="https://panel.bunkerweb.io/?utm_campaign=self&utm_source=ui#pro">{{ pro_info['link_message'] }}</a>
</div>
<div class="flex justify-center mt-2">
<a class="text-center font-semibold text-yellow-500 underline"
target="_blank"
href="https://panel.bunkerweb.io/?utm_campaign=self&utm_source=ui#pro">{{ pro_info['link_message'] }}</a>
</div>
{% endif %}
{% if is_pro_version %}
<div class="mt-2 flex flex-col justify-center items-center">
{% if pro_expire %}
@ -118,61 +115,60 @@
{% endif %}
</div>
{% if not is_pro_version and pro_status != "inactive" %}
<form
class="mt-6 relative col-span-12 grid grid-cols-12 w-full justify-items-center"
id="activate-key-form"
action="account"
method="POST"
autocomplete="off">
<div class="col-span-12">
<h5 class="text-xl my-1 transition duration-300 ease-in-out text-md font-bold m-0 dark:text-gray-200">ACTIVATE KEY</h5>
</div>
<input type="hidden" name="operation" value="activate-key" />
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="hidden"
name="next"
value="{{ request.values.get('next', '') }}" />
<div data-input-group
class="flex flex-col relative col-span-12 px-4 my-2 md:px-6 md:my-3 lg:px-6 lg:my-3 max-w-[400px] w-full">
<h5 class="input-title">License key</h5>
<label class="sr-only" for="license">License key</label>
<input type="password"
id="license"
name="license"
class="col-span-12 regular-input"
placeholder="enter new license key"
value=""
pattern="^.*$"
required />
<div data-setting-password-container
class="absolute flex right-6 md:right-8 h-5 w-5 top-[55%] md:top-[53%]">
<button data-setting-password="visible"
class="h-5 w-5 flex items-center align-middle dark:fill-blue-500 hover:brightness-75 transition-all"
type="button">
<svg class="fill-primary pointer-events-none dark:fill-blue-500 hover:brightness-75 transition-all"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 576 512">
<path d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM432 256c0 79.5-64.5 144-144 144s-144-64.5-144-144s64.5-144 144-144s144 64.5 144 144zM288 192c0 35.3-28.7 64-64 64c-11.5 0-22.3-3-31.6-8.4c-.2 2.8-.4 5.5-.4 8.4c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6z" />
</svg>
</button>
<button data-setting-password="invisible"
class="hidden -translate-y-0.2 scale-110 h-5 w-5 items-center align-middle"
type="button">
<svg class="fill-primary pointer-events-none dark:fill-blue-500 hover:brightness-75 transition-all"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 640 512">
<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c5.2-11.8 8-24.8 8-38.5c0-53-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zm223.1 298L373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5z" />
</svg>
</button>
</div>
</div>
<div class="col-span-12 flex justify-center mt-6">
<button type="submit"
id="activate-key-button"
name="activate-key-button"
class="valid-btn">SAVE</button>
</div>
</form>
<form class="mt-6 relative col-span-12 grid grid-cols-12 w-full justify-items-center"
id="activate-key-form"
action="account"
method="POST"
autocomplete="off">
<div class="col-span-12">
<h5 class="text-xl my-1 transition duration-300 ease-in-out text-md font-bold m-0 dark:text-gray-200">ACTIVATE KEY</h5>
</div>
<input type="hidden" name="operation" value="activate-key" />
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="hidden"
name="next"
value="{{ request.values.get('next', '') }}" />
<div data-input-group
class="flex flex-col relative col-span-12 px-4 my-2 md:px-6 md:my-3 lg:px-6 lg:my-3 max-w-[400px] w-full">
<h5 class="input-title">License key</h5>
<label class="sr-only" for="license">License key</label>
<input type="password"
id="license"
name="license"
class="col-span-12 regular-input"
placeholder="enter new license key"
value=""
pattern="^.*$"
required />
<div data-setting-password-container
class="absolute flex right-6 md:right-8 h-5 w-5 top-[55%] md:top-[53%]">
<button data-setting-password="visible"
class="h-5 w-5 flex items-center align-middle dark:fill-blue-500 hover:brightness-75 transition-all"
type="button">
<svg class="fill-primary pointer-events-none dark:fill-blue-500 hover:brightness-75 transition-all"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 576 512">
<path d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM432 256c0 79.5-64.5 144-144 144s-144-64.5-144-144s64.5-144 144-144s144 64.5 144 144zM288 192c0 35.3-28.7 64-64 64c-11.5 0-22.3-3-31.6-8.4c-.2 2.8-.4 5.5-.4 8.4c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6z" />
</svg>
</button>
<button data-setting-password="invisible"
class="hidden -translate-y-0.2 scale-110 h-5 w-5 items-center align-middle"
type="button">
<svg class="fill-primary pointer-events-none dark:fill-blue-500 hover:brightness-75 transition-all"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 640 512">
<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c5.2-11.8 8-24.8 8-38.5c0-53-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zm223.1 298L373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5z" />
</svg>
</button>
</div>
</div>
<div class="col-span-12 flex justify-center mt-6">
<button type="submit"
id="activate-key-button"
name="activate-key-button"
class="valid-btn">SAVE</button>
</div>
</form>
{% endif %}
</div>
<div data-tab-item="username"

View file

@ -12,7 +12,7 @@
<p class="dark:brightness-125 mb-0 text-center text-xs xs:text-sm text-white">
Get the most of BunkerWeb by upgrading to the PRO version. More info and free trial
<a class="dark:brightness-125 font-medium underline text-gray-100 dark:text-gray-50 hover:no-underline"
target="_blank"
target="_blank"
href="https://panel.bunkerweb.io/?utm_campaign=self&utm_source=banner#pro">here</a>.
</p>
</div>
@ -23,7 +23,7 @@
<p class="dark:brightness-125 mb-0 text-center text-xs xs:text-sm text-white">
Need premium support or tailored consulting around BunkerWeb ? Check out our
<a class="dark:brightness-125 font-medium underline text-gray-100 dark:text-gray-50 hover:no-underline"
target="_blank"
target="_blank"
href="https://panel.bunkerweb.io/?utm_campaign=self&utm_source=banner#services">professional services</a>.
</p>
</div>
@ -34,11 +34,11 @@
<p class="dark:brightness-125 mb-0 text-center text-xs xs:text-sm text-white">
Be part of the Bunker community by joining the
<a class="dark:brightness-125 font-medium underline text-gray-100 dark:text-gray-50 hover:no-underline"
target="_blank"
href="https://discord.bunkerweb.io">Discord chat</a>
target="_blank"
href="https://discord.bunkerweb.io">Discord chat</a>
and following us on
<a class="dark:brightness-125 font-medium underline text-gray-100 dark:text-gray-50 hover:no-underline"
target="_blank"
target="_blank"
href="https://www.linkedin.com/company/bunkerity/">LinkedIn</a>.
</p>
</div>

View file

@ -24,7 +24,11 @@
"name": "Context",
"id": "context",
"value": "all",
"values": ["all", "global", "multisite"]
"values": [
"all",
"global",
"multisite"
]
}
] %}
<div data-global-config-filter

View file

@ -12,7 +12,7 @@
<!-- stats card -->
<a href="{{ card['link'] }}"
class="home-card"
{% if card['link'].startswith('http') %} target="_blank" {% endif %}
{% if card['link'].startswith('http') %}target="_blank"{% endif %}
rel="noopener">
<!-- text -->
<div>

View file

@ -264,7 +264,8 @@
</div>
<!-- end plugin settings not multiple -->
{% if multList|length > 0 %}
<h5 data-multiple-title class="transition duration-300 ease-in-out ml-2 font-bold text-[1.1rem] uppercase dark:text-white/90 mt-2 mb-0">
<h5 data-multiple-title
class="transition duration-300 ease-in-out ml-2 font-bold text-[1.1rem] uppercase dark:text-white/90 mt-2 mb-0">
multiple settings
</h5>
{% endif %}
@ -289,10 +290,7 @@
current_endpoint == "global-config"
or current_endpoint == "services" and value['context'] == "multisite"
) %}
<div data-setting-container="{{ setting }}_SCHEMA"
data-{{ current_endpoint }}-context="{{ value['context'] }}"
class="relative mx-2 md:mx-3 my-2 md:my-3 col-span-12 md:col-span-6 2xl:col-span-4"
id="form-edit-{{ current_endpoint }}-{{ value["id"] }}_SCHEMA">
<div data-setting-container="{{ setting }}_SCHEMA" data-{{ current_endpoint }}-context="{{ value['context'] }}" class="relative mx-2 md:mx-3 my-2 md:my-3 col-span-12 md:col-span-6 2xl:col-span-4" id="form-edit-{{ current_endpoint }}-{{ value["id"] }}_SCHEMA">
<!-- title and info -->
<div class="flex items-center my-1 relative z-10">
<h5 class="input-title">{{ value["label"] }}</h5>

View file

@ -186,8 +186,8 @@
</div>
<!-- auto privacy policy-->
<div class="flex relative col-span-12 my-3 mx-2 max-w-[400px] w-full">
<label class="sr-only" for="newsletter-check">privacy policy</label>
<div data-checkbox-handler="newsletter-check"
<label class="sr-only" for="newsletter-check">privacy policy</label>
<div data-checkbox-handler="newsletter-check"
class="relative mb-7 md:mb-0 z-10">
<input data-check
type="checkbox"
@ -200,17 +200,17 @@
class="pointer-events-none absolute fill-white left-0 top-0 translate-x-1 translate-y-2 h-3 w-3"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512">
<path class="pointer-events-none" d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z">
<path class="pointer-events-none" d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z">
</path>
</svg>
</div>
<h5 class="text-base mt-1 transition duration-300 ease-in-out text-md font-bold m-0 ml-2">
I've read and agree to the
<a class="privacy-link"
href="https://www.bunkerity.com/en/privacy-policy?utm_campaign=self&utm_source=ui"
target="_blank"
rel="noopener">privacy policy</a>
</h5>
</svg>
</div>
<h5 class="text-base mt-1 transition duration-300 ease-in-out text-md font-bold m-0 ml-2">
I've read and agree to the
<a class="privacy-link"
href="https://www.bunkerity.com/en/privacy-policy?utm_campaign=self&utm_source=ui"
target="_blank"
rel="noopener">privacy policy</a>
</h5>
</div>
<!-- end auto privacy policy-->
<!-- end email inpt-->
@ -320,9 +320,16 @@
</div>
</div>
<!-- end form -->
<form style="display: none;" id="newsletter-form" action="https://bunkerity.us1.list-manage.com/subscribe/post?u=ec5b1577cf427972b9bd491a6&amp;id=37076d9d67" method="POST" target="_blank">
<input id="newsletter-form-email" name="EMAIL" type="email" value="" />
<input id="newsletter-form-check" name="newsletter-check" type="checkbox" value="yes" />
<form style="display: none"
id="newsletter-form"
action="https://bunkerity.us1.list-manage.com/subscribe/post?u=ec5b1577cf427972b9bd491a6&amp;id=37076d9d67"
method="POST"
target="_blank">
<input id="newsletter-form-email" name="EMAIL" type="email" value="" />
<input id="newsletter-form-check"
name="newsletter-check"
type="checkbox"
value="yes" />
</form>
</main>
<script nonce="{{ script_nonce }}">