[PATCH 16/19] ui: Split the tiles in columns and increase the mininum size
Stephen Finucane
stephen.finucane at intel.com
Thu Feb 4 08:31:51 AEDT 2016
From: Damien Lespiau <damien.lespiau at intel.com>
Let's try to make that page looks better when the natural size of the
tiles are different (because the contents have varying sizes).
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
Acked-by: Stephen Finucane <stephen.finucane at intel.com>
---
htdocs/css/style.css | 2 +-
patchwork/templates/patchwork/projects.html | 32 +++++++++++++++++------------
2 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/htdocs/css/style.css b/htdocs/css/style.css
index 13d4031..05d9db9 100644
--- a/htdocs/css/style.css
+++ b/htdocs/css/style.css
@@ -159,7 +159,7 @@ input#reorder-change {
}
.thumbnail {
- min-height: 150px;
+ min-height: 200px;
}
/* patch view */
diff --git a/patchwork/templates/patchwork/projects.html b/patchwork/templates/patchwork/projects.html
index b027d7c..3743d49 100644
--- a/patchwork/templates/patchwork/projects.html
+++ b/patchwork/templates/patchwork/projects.html
@@ -5,20 +5,22 @@
{% block body %}
+<div style="margin-top:20px;"></div>
+
{% if projects %}
-<div class="row" style="margin-top:20px;">
{% for p in projects %}
- <div class="col-sm-6 col-md-4">
- <div class="thumbnail">
- <div class="caption">
- <h3>{{p.name}}</h3>
- <p class="core-info">
- <span>
- <a href="{% url 'patch-list' project_id=p.linkname %}">
- View patches
- </a>
- </span>
- </p>
+{% cycle '<div class="row">' '' '' %}
+ <div class="col-sm-6 col-md-4">
+ <div class="thumbnail">
+ <div class="caption">
+ <h3>{{p.name}}</h3>
+ <p class="core-info">
+ <span>
+ <a href="{% url 'patch-list' project_id=p.linkname %}">
+ View patches
+ </a>
+ </span>
+ </p>
{% if p.web_url %}
<p><a href="{{p.web_url}}">{{p.web_url}}</a></p>
{% else %}
@@ -27,9 +29,13 @@
</div>
</div>
</div>
-{% endfor %}
+{% if forloop.last %}
</div>
{% else %}
+{% cycle '' '' '</div>' %}
+{% endif %}
+{% endfor %}
+{% else %}
<p>Patchwork doesn't have any projects to display!</p>
{% endif %}
--
2.0.0
More information about the Patchwork
mailing list