fotogalerie | nahledy dole
This commit is contained in:
parent
05285beea9
commit
d9b6e6d5e3
4 changed files with 19 additions and 17 deletions
|
@ -88,6 +88,7 @@ class Obrazek(models.Model):
|
|||
original = Image.open(self.obrazek_velky)
|
||||
# vycteni EXIFu
|
||||
exif = get_exif(original)
|
||||
# otoceni podle EXIFu
|
||||
if exif['Orientation']:
|
||||
f = orientation_funcs[exif['Orientation']]
|
||||
original_otoceny = f(original)
|
||||
|
|
|
@ -6,19 +6,14 @@
|
|||
|
||||
{% block content %}
|
||||
<h1><a title="Zpět na náhled fotek" href="../#obsah">{{galerie.nazev}}</a></h1>
|
||||
<div class="galerie_top" id="obsah">
|
||||
{% for obrazek in obrazky_predchozi %}
|
||||
<a href="../{{obrazek.pk}}#obsah"><img src="{{obrazek.obrazek_maly.url}}" height="100"></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
{# TODO šipky na přecházeni dodelat ve stylech #}
|
||||
<div class="galerie">
|
||||
{% if obrazky_predchozi %}
|
||||
{% with obrazky_predchozi|last as predchozi_obrazek %}
|
||||
<div>
|
||||
<a title="Předchozí" class="predchozi_obrazek" href="../{{predchozi_obrazek.pk}}#obsah"></a>
|
||||
<div id="popis">
|
||||
<a title="Předchozí" class="predchozi_obrazek" href="../{{predchozi_obrazek.pk}}#popis"></a>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif%}
|
||||
|
@ -30,7 +25,7 @@
|
|||
{% if obrazky_dalsi %}
|
||||
{% with obrazky_dalsi|first as dalsi_obrazek %}
|
||||
<div>
|
||||
<a title="Další" class="dalsi_obrazek" href="../{{dalsi_obrazek.pk}}#obsah"></a>
|
||||
<a title="Další" class="dalsi_obrazek" href="../{{dalsi_obrazek.pk}}#popis"></a>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif%}
|
||||
|
@ -39,7 +34,7 @@
|
|||
{# Popisek fotky #}
|
||||
<div class="popis">
|
||||
{% if preview %}
|
||||
<form action=".#obsah" method="post">
|
||||
<form action=".#popis" method="post">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
<tr><td><label>Aktuální komentář:</label></td><td>{{obrazek.popis}}</td>
|
||||
|
@ -54,9 +49,17 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="galerie_bot">
|
||||
<div class="galerie_nahledy">
|
||||
{% for obrazek in obrazky_predchozi %}
|
||||
<a href="../{{obrazek.pk}}#popis"><img src="{{obrazek.obrazek_maly.url}}" height="100"></a>
|
||||
{% endfor %}
|
||||
<img src={{obrazek.obrazek_maly.url}}
|
||||
height="{{obrazek.obrazek_maly.height}}"
|
||||
width="{{obrazek.obrazek_maly.width}}"
|
||||
alt="{{obrazek.popis}}"
|
||||
class="obrazek">
|
||||
{% for obrazek in obrazky_dalsi %}
|
||||
<a href="../{{obrazek.pk}}#obsah"><img src="{{obrazek.obrazek_maly.url}}" height="100"></a>
|
||||
<a href="../{{obrazek.pk}}#popis"><img src="{{obrazek.obrazek_maly.url}}" height="100"></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<tr>
|
||||
{% endif %}
|
||||
<td class="vystredeno">
|
||||
<a title="Zobrazit tuto fotografii" href="./{{obrazek.pk}}#obsah"
|
||||
<a title="Zobrazit tuto fotografii" href="./{{obrazek.pk}}#popis"
|
||||
class="jednoducha-galerie">
|
||||
<img
|
||||
src="{{obrazek.obrazek_maly.url}}"
|
||||
|
|
|
@ -470,12 +470,10 @@ div.zadani_azad_termin {
|
|||
.galerie{
|
||||
position: relative;
|
||||
}
|
||||
.galerie_top{
|
||||
margin: 1em 0;
|
||||
text-align: right;
|
||||
}
|
||||
.galerie_bot{
|
||||
|
||||
.galerie_nahledy{
|
||||
margin: 1em 0;
|
||||
text-align: center;
|
||||
}
|
||||
.galerie_index{
|
||||
width: 100%;
|
||||
|
|
Loading…
Reference in a new issue