Skip to content

Commit 3158fba

Browse files
author
roadiz-ci
committed
feat(ui): update dashboard layout to make it extendable
1 parent 3f05aef commit 3158fba

1 file changed

Lines changed: 18 additions & 16 deletions

File tree

templates/dashboard/index.html.twig

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends '@RoadizRozier/layout.html.twig' %}
1+
{% extends "@RoadizRozier/admin/base.html.twig" %}
22

33
{% if app.user %}
44
{% set displayName = app.user.firstName|default(app.user.nickname|default(app.user.givenName|default(app.user.name|default(app.user.userIdentifier)))) %}
@@ -8,22 +8,24 @@
88

99
{% block title %}{% trans %}dashboard{% endtrans %} | {{ parent() }}{% endblock %}
1010

11-
{% block content %}
12-
<section class="content-global">
13-
<header class="content-header dashboard-header">
14-
<h1 class="content-title dashboard-title">{{ "hello.%name%"|trans({'%name%': displayName}) }}</h1>
15-
{% include '@RoadizRozier/dashboard/navBar.html.twig' with {'current':'dashboard'} %}
16-
</header>
11+
{%- block content_title -%}{{ "hello.%name%"|trans({'%name%': displayName}) }}{%- endblock -%}
1712

18-
<article class="content content-dashboard">
13+
{%- block content_header_nav -%}
14+
{%- include '@RoadizRozier/dashboard/navBar.html.twig' with {'current':'dashboard'} -%}
15+
{%- endblock -%}
16+
17+
{%- block content_body -%}
18+
<article class="content">
19+
<div class="uk-grid">
20+
{%- block dashboard_panels -%}{%- endblock -%}
1921
{% if bags.settings.get('dashboard_iframe') %}
20-
<div class="dashboard-iframe">
22+
<div class="uk-panel uk-width-medium-1-1 uk-margin dashboard-iframe">
2123
{{- bags.settings.get('dashboard_iframe')|striptags(['iframe','script'])|raw -}}
2224
</div>
2325
{% endif %}
2426
{% if latestLogs %}
25-
<div id="latest-sources">
26-
<h3>{% trans %}latest.node-sources.updates{% endtrans %}</h3>
27+
<div class="uk-panel uk-width-medium-1-1 uk-margin" id="latest-sources">
28+
<h3 class="uk-panel-title uk-text-center">{% trans %}latest.node-sources.updates{% endtrans %}</h3>
2729
{%- for log in latestLogs -%}
2830
<div class="latest-source">
2931
{% set entityPath = log_entity_edit_path(log) %}
@@ -61,15 +63,15 @@
6163
</div>
6264
{% endif %}
6365
{% if bookmarks|length %}
64-
<div id="dashboard-bookmarks">
65-
<h3>{% trans %}bookmarks.links{% endtrans %}</h3>
66+
<div class="uk-panel uk-width-medium-1-3 uk-margin" id="dashboard-bookmarks">
67+
<h3 class="uk-panel-title uk-text-center">{% trans %}bookmarks.links{% endtrans %}</h3>
6668
<ul>
6769
{% for bookmark in bookmarks %}
6870
<li><a target="_blank" rel="nofollow noopener" href="{{ bookmark.url }}">{{ bookmark.label }}</a></li>
6971
{% endfor %}
7072
</ul>
7173
</div>
7274
{% endif %}
73-
</article>
74-
</section>
75-
{% endblock %}
75+
</div>
76+
</article>
77+
{%- endblock -%}

0 commit comments

Comments
 (0)