Flowing layout for the galleries

This commit is contained in:
2014-08-30 23:12:29 +02:00
parent a4142aa3f3
commit 29a55bd101

View File

@@ -37,73 +37,47 @@
</div> </div>
</div> </div>
{{ article.content }} {{ article.content }}
{% if article.album %} {% if article.album %}
<table class="gallery_table"> <div id="gallery" class="panel">
<tr> <div class="panel-body">
{% for image in article.galleryimages %} {% for image in article.galleryimages %}
<td> <div class="gallery-element {{ "elem_" + article.album }}">
<table class="layout"> <div>
<tr class="layout"> <p class="picture-title">{% if article.gallerycaptions.get(image) %}{{ article.gallerycaptions.get(image) }}{% endif %}&nbsp;</p>
<td class="layout" colspan="2">&nbsp; <a class="{{ article.album }} cboxElement" href="{{ SITEURL }}/images/gallery/{{ article.album }}/{{ image }}"
{% if article.gallerycaptions.get(image) %} {% if article.gallerycaptions.get(image) %}title="{{ article.gallerycaptions.get(image) }}"{% endif %}>
<strong>{{ article.gallerycaptions.get(image) }}</strong> <img src="{{ SITEURL }}/images/thumbs/{{ article.album }}/{{ image }}" />
{% endif %} </a>
</td>
</tr>
<tr class="layout">
<td class="layout">
<a class="{{ article.album }} cboxElement" href="{{ SITEURL }}/images/gallery/{{ article.album }}/{{ image }}"
{% if article.gallerycaptions.get(image) %}title="{{ article.gallerycaptions.get(image) }}"{% endif %}>
<img src="{{ SITEURL }}/images/thumbs/{{ article.album }}/{{ image }}">
</a>
</td>
</tr>
<tr class="layout">
{% if article.galleryexif and article.galleryexif.get(image) %} {% if article.galleryexif and article.galleryexif.get(image) %}
<td class="layout"> <table class="exif_info">
<table class="exif_info"> {% if article.galleryexif.get(image).get("Model") %}
{% if article.galleryexif.get(image).get("Model") %} <tr><th colspan="4">{{article.galleryexif.get(image).get("Model")}}</th></tr>
<tr><th colspan="4">{{article.galleryexif.get(image).get("Model")}}</th></tr> {% endif %}
{% endif %} {% if article.galleryexif.get(image).get("LensModel") %}
{% if article.galleryexif.get(image).get("LensModel") %} <tr><th colspan="4">{{article.galleryexif.get(image).get("LensModel")}}</th></tr>
<tr><th colspan="4">{{article.galleryexif.get(image).get("LensModel")}}</th></tr> {% endif %}
{% endif %} <tr>
<tr> {% if article.galleryexif.get(image).get("ISOSpeedRatings") %}
{% if article.galleryexif.get(image).get("ISOSpeedRatings") %} <td>{{article.galleryexif.get(image).get("ISOSpeedRatings")}}</td>
<td>{{article.galleryexif.get(image).get("ISOSpeedRatings")}}</td> {% endif %}
{% endif %} {% if article.galleryexif.get(image).get("FocalLength") %}
{% if article.galleryexif.get(image).get("FocalLength") %} <td>{{article.galleryexif.get(image).get("FocalLength")}}mm</td>
<td>{{article.galleryexif.get(image).get("FocalLength")}}mm</td> {% endif %}
{% endif %} {% if article.galleryexif.get(image).get("FNumber") %}
{% if article.galleryexif.get(image).get("FNumber") %} <td>f/{{article.galleryexif.get(image).get("FNumber")}}</td>
<td>f/{{article.galleryexif.get(image).get("FNumber")}}</td> {% endif %}
{% endif %} {% if article.galleryexif.get(image).get("ExposureTime") %}
{% if article.galleryexif.get(image).get("ExposureTime") %} <td>{{article.galleryexif.get(image).get("ExposureTime")}}</td>
<td>{{article.galleryexif.get(image).get("ExposureTime")}}</td> {% endif %}
{% endif %} </tr>
</tr> </table>
</table>
</td>
{% endif %}
</tr>
{% if article.gallerycomments.get(image) %}
<tr>
<td colspan="2">{{ article.gallerycomments.get(image) }}</td>
</tr>
{% endif %}
</table>
</td>
{% if (loop.index % GALLERY_IMG_PER_ROW) == 0 %}
</tr>
<tr>
{% endif %} {% endif %}
<p class="picture-comment">{% if article.gallerycomments.get(image) %}{{ article.gallerycomments.get(image) }}{% endif %}</p>
</div>
</div>
{% endfor %} {% endfor %}
{% if (article.galleryimages.__len__() % GALLERY_IMG_PER_ROW) != 0 %} </div>
<td colspan="{{GALLERY_IMG_PER_ROW - (article.galleryimages.__len__() % GALLERY_IMG_PER_ROW)}}" /> </div>
{% endif %}
</tr>
</table>
{% endif %} {% endif %}
</div> </div>
<!-- /.entry-content --> <!-- /.entry-content -->