Fix #179 -- New flexbox layout for dashboard (#344)

* Use flexbox for better tiling

Replaces 'width' by 'display_size' and reduces sorting complexity.

* CSS improvements, Responsiveness
This commit is contained in:
Tobias Kunze
2016-12-01 17:36:29 +01:00
committed by Raphael Michel
parent bfd87f11dd
commit 3930fc749a
5 changed files with 67 additions and 45 deletions

View File

@@ -5,7 +5,7 @@
<h1>{% trans "Dashboard" %}</h1>
<div class="row dashboard">
{% for w in widgets %}
<div class="col-xs-12 col-sm-{% if w.width > 6 %}12{% else %}6{% endif %} col-md-{{ w.width }}">
<div class="widget-container widget-{{ w.display_size|default:"small" }}">
{% if w.url %}
<a href="{{ w.url }}" class="widget">
{{ w.content|safe }}