[extensions-web/deploy] extension: remove empty white square when no screenshot is used
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web/deploy] extension: remove empty white square when no screenshot is used
- Date: Sun, 15 Jan 2017 19:32:41 +0000 (UTC)
commit 487d055f0002e1777c9142255049c270bc60b473
Author: Yuri Konotopov <ykonotopov gnome org>
Date: Sun Jan 15 23:32:29 2017 +0400
extension: remove empty white square when no screenshot is used
.../extensions/templates/extensions/detail.html | 17 +++++++++------
.../templates/extensions/detail_edit.html | 21 +++++++++++++++----
2 files changed, 26 insertions(+), 12 deletions(-)
---
diff --git a/sweettooth/extensions/templates/extensions/detail.html
b/sweettooth/extensions/templates/extensions/detail.html
index 5f5ffb3..83c5061 100644
--- a/sweettooth/extensions/templates/extensions/detail.html
+++ b/sweettooth/extensions/templates/extensions/detail.html
@@ -22,13 +22,16 @@
</div>
<div class="extension-details">
- <div class="screenshot">
- {% if extension.screenshot %}
- <a href="{{ extension.screenshot.url }}"><img src="{{ extension.screenshot.url }}" /></a>
- {% endif %}
- {% block screenshot_upload %}
- {% endblock screenshot_upload %}
- </div>
+ {% if extension.screenshot %}
+ {% block screenshot %}
+ <div class="screenshot">
+ <a href="{{ extension.screenshot.url }}"><img src="{{ extension.screenshot.url }}" /></a>
+ </div>
+ {% endblock screenshot %}
+ {% else %}
+ {% block no-screenshot %}
+ {% endblock no-screenshot %}
+ {% endif %}
<p class="description" id="extension_description">{{ extension.description }}</p>
diff --git a/sweettooth/extensions/templates/extensions/detail_edit.html
b/sweettooth/extensions/templates/extensions/detail_edit.html
index c677db0..1adf654 100644
--- a/sweettooth/extensions/templates/extensions/detail_edit.html
+++ b/sweettooth/extensions/templates/extensions/detail_edit.html
@@ -51,13 +51,24 @@
</div>
{% endblock %}
-{% block screenshot_upload %}
- <label class="upload">
- <span class="action_button">Upload screenshot</span>
- <input type="file" accept="image/*">
- </label>
+{% block screenshot %}
+ <div class="screenshot">
+ <a href="{{ extension.screenshot.url }}"><img src="{{ extension.screenshot.url }}"/></a>
+ <label class="upload">
+ <span class="action_button">Upload screenshot</span>
+ <input type="file" accept="image/*">
+ </label>
+ </div>
{% endblock %}
+{% block no-screenshot %}
+ <div class="screenshot">
+ <label class="upload">
+ <span class="action_button">Upload screenshot</span>
+ <input type="file" accept="image/*">
+ </label>
+ </div>
+{% endblock %}
{% block icon %}
<label class="icon upload">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]