Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update basic theme
  • Loading branch information
alexander-schranz committed Jul 19, 2022
commit 59e23b9a9a4201a4e4b2e766787f6daf365d53ae
48 changes: 44 additions & 4 deletions src/Collection/Tests/app/templates/example_theme.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,62 @@

{%- block player_row -%}
{% set row_attr = row_attr|merge({
style: 'margin-bottom: 16px; background: white; border: 1px solid #ccc; padding: 16px; border-radius: 4px;'
style: 'margin-bottom: 16px; background: white; border: 1px solid #ccc; padding: 16px; border-radius: 4px;'
}) %}

{{ block('collection_row') }}
{%- endblock -%}

{%- block button_row -%}
{% set row_attr = row_attr|merge({
style:
form.vars.block_prefixes|last ends with 'addButton'
? 'margin-top: 8px; display: flex; justify-content: start; flex-wrap: wrap;'
: form.vars.block_prefixes|last ends with 'deleteButton'
? 'margin-top: 8px; display: flex; justify-content: end; flex-wrap: wrap;'
: ''
}) %}

{{ parent() }}
{%- endblock -%}

{%- block form_widget_simple -%}
{% set attr = attr|merge({
style: type|default('text') == 'text'
? 'width: 100%; padding: 4px 8px; box-sizing: border-box; border-radius: 3px; border: 1px solid gray;'
: ''
}) %}

{{ parent() }}
{%- endblock -%}

{%- block button_widget -%}
{% set attr = attr|merge({
style: 'background: white; border: 1px solid #ccc; padding: 8px 16px; border-radius: 4px;'
style:
form.vars.block_prefixes|last ends with 'addButton'
? 'background: white; border: 1px solid gray; color: black; padding: 8px 16px; border-radius: 4px; cursor: pointer;'
: form.vars.block_prefixes|last ends with 'deleteButton'
? 'background: #F43F5E; border: 1px solid #F43F5E; color: white; padding: 4px 8px; font-size: 12px; border-radius: 4px; cursor: pointer;'
: 'background: #4338CA; border: 1px solid #4338CA; color: white; padding: 8px 16px; border-radius: 4px; cursor: pointer;'
}) %}

<div style="margin-top: 8px; display: flex; justify-content: start; flex-wrap: wrap;">
{{ parent() }}
{{ parent() }}
{%- endblock -%}

{%- block submit_row -%}
<div style="margin-top: 16px;">
{{ block('button_row') }}
</div>
{%- endblock -%}

{%- block submit_widget -%}
{% set attr = attr|merge({
style: 'marign-top: 16px; background: #1D4ED8; border: 1px solid #1D4ED8; color: white; padding: 8px 16px; border-radius: 4px; cursor: pointer;'
}) %}

{{ parent() }}
{%- endblock -%}

{%- block form_label -%}
{% set label_attr = label_attr|merge({
style: 'font-weight: bold; font-family: sans-serif; font-size: 14px; cursor: pointer;'
Expand Down