forked from GNUsocial/gnu-social
Eliseu Amaro
671c3968e2
[CSS] Font size hierarchy refactor [PLUGINS][MediaFeed] Renamed BeforeFeed event Type scale hierarchy redone. Bigger line height added, making it easier to click on links and separate contents. Feed title added. AddFeedActions replaces BeforeFeed event. MediaFeed links will now show an icon to the right of the feed title, smaller footprint and more consistent with the overall design.
48 lines
1.9 KiB
Twig
48 lines
1.9 KiB
Twig
{% macro settings_details_element(title, summary, id, details_content, context, details_ids) %}
|
|
{% if details_ids is null %}
|
|
{% set details_ids = [id] %}
|
|
{% endif %}
|
|
<details class="section-settings-details" {{ open_details(context.open_details_query, details_ids) }} id={{ id }}>
|
|
<summary>
|
|
<strong class="section-settings-details-title">
|
|
{{ title | trans }}
|
|
{{ icon('arrow-down', 'icon icon-details-open') | raw }}
|
|
</strong>
|
|
<em>
|
|
{{ summary | trans }}
|
|
</em>
|
|
</summary>
|
|
|
|
{% if details_content is instanceof('Twig\\Markup') %}
|
|
{{ details_content }}
|
|
{% else %}
|
|
{{ form(details_content) }}
|
|
{% endif %}
|
|
</details>
|
|
{% endmacro settings_details_element %}
|
|
|
|
{% macro settings_details_container(title, summary, container_id, tabs, context) %}
|
|
{% set children_ids = [container_id] %}
|
|
{% set details_content %}
|
|
<nav class='section-settings-nav'>
|
|
<ul>
|
|
{% for tab in tabs %}
|
|
<hr>
|
|
<li>
|
|
{% set content %}
|
|
{% if tab['controller'] is defined %}
|
|
{% include tab['controller']['_template'] with tab['controller'] only %}
|
|
{% else %}
|
|
{{ form(tab['form']) }}
|
|
{% endif %}
|
|
{% endset %}
|
|
{{ _self.settings_details_element(tab['title'], tab['desc'], tab['id'] ~ '-details', content, context) }}
|
|
{% set children_ids = children_ids|merge([tab['id'] ~ '-details']) %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</nav>
|
|
{% endset %}
|
|
{{ _self.settings_details_element(title, summary, container_id, details_content, context, children_ids) }}
|
|
{% endmacro settings_details_container %}
|