feat(*): refactor dynamic vs. static structure and distinctions; make additional elements dynamic
This commit is contained in:
parent
7a0b808f24
commit
69da20fd8e
127 changed files with 984 additions and 956 deletions
23
src/includes/static/blocks/dialog.liquid
Normal file
23
src/includes/static/blocks/dialog.liquid
Normal file
|
@ -0,0 +1,23 @@
|
|||
{%- capture labelContent -%}
|
||||
{%- if icon -%}
|
||||
{% tablericon icon %}
|
||||
{%- elsif label -%}
|
||||
{{ label }}
|
||||
{%- endif -%}
|
||||
{%- endcapture -%}
|
||||
{% assign dialogId = id | default:"dialog-controls" %}
|
||||
<button class="dialog-open client-side" aria-label="{{ label }}" data-dialog-trigger="{{ dialogId }}" data-dialog-button>
|
||||
{{ labelContent }}
|
||||
</button>
|
||||
<dialog
|
||||
id="dialog-{{ dialogId }}"
|
||||
class="client-side"
|
||||
{% if dynamic %}data-dynamic="{{ dynamic }}"{% endif %}
|
||||
{% if markdown %}data-markdown="{{ markdown }}"{% endif %}>
|
||||
<button class="dialog-close" aria-label="Close dialog" data-dialog-button>
|
||||
{% tablericon "circle-x" %}
|
||||
</button>
|
||||
{%- unless dynamic -%}
|
||||
{{ content }}
|
||||
{%- endunless -%}
|
||||
</dialog>
|
Loading…
Add table
Add a link
Reference in a new issue