Support for row height for dashboard widgets

This commit is contained in:
Fabio Manganiello 2020-11-11 22:28:40 +01:00
parent 470bd62af7
commit 9179f35a82
4 changed files with 9 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -52,3 +52,9 @@ main {
height: 100%;
}
@for $i from 1 through 10 {
.row-#{$i} {
height: $i * 100% !important;
}
}

View file

@ -80,7 +80,7 @@
{% endwith %}
{# increment counter #}
{% if used_columns.append(used_columns.pop() + widget['columns']) %}{% endif %}
{% if used_columns.append(used_columns.pop() + widget.get('columns', 12)) %}{% endif %}
{% if used_columns[0] % 12 == 0 %}
</div>

View file

@ -1,5 +1,5 @@
<script type="text/x-template" id="tmpl-widget">
<div class="widget" :class="'col-' + config.columns">
<div class="widget" :class="['col-' + (config.columns || 12), 'row-' + (config.rows || 1)]">
<component :is="tag" :config="config"></component>
</div>
</script>