Galerie: drobné úpravy
* rozumnější zmenšování náhledu podgalerie * max 22 znaků z názvu podgalerie v náhledu, plný název v title
This commit is contained in:
parent
ec6f988e51
commit
dbc5b84ce8
2 changed files with 24 additions and 8 deletions
|
@ -43,18 +43,22 @@ Galerie {{galerie.nazev}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if podgalerie %}
|
{% if podgalerie %}
|
||||||
|
{% with 22 as max_delka_nazvu %}
|
||||||
<div class="galerie_nahledy">
|
<div class="galerie_nahledy">
|
||||||
{% for galerie in podgalerie %}
|
{% for galerie in podgalerie %}
|
||||||
<a href="../{{galerie.pk}}" class="podgalerie_nahled">
|
<a href="../{{galerie.pk}}"
|
||||||
|
{% if galerie.nazev|length > max_delka_nazvu %}
|
||||||
|
title="{{ galerie.nazev }}"
|
||||||
|
{% endif %}
|
||||||
|
class="podgalerie_nahled">
|
||||||
{% if galerie.titulni_obrazek %}
|
{% if galerie.titulni_obrazek %}
|
||||||
{% with galerie.titulni_obrazek.obrazek_maly as obrazek %}
|
{% with galerie.titulni_obrazek.obrazek_maly as obrazek %}
|
||||||
<img src="{{ obrazek.url }}"
|
<img src="{{ obrazek.url }}"
|
||||||
width="{% widthratio obrazek.width 167 obrazek.width %}"
|
/>
|
||||||
height="{% widthratio obrazek.width 167 obrazek.height %}" />
|
{% endwith %}
|
||||||
{% endwith %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div>
|
<div class="nazev_galerie">
|
||||||
{{ galerie }}
|
{{ galerie|truncatechars:max_delka_nazvu }}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% if user.is_staff and galerie.zobrazit > 0 %}
|
{% if user.is_staff and galerie.zobrazit > 0 %}
|
||||||
|
@ -66,6 +70,7 @@ Galerie {{galerie.nazev}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.is_staff and galerie.zobrazit > 0 %}
|
{% if user.is_staff and galerie.zobrazit > 0 %}
|
||||||
|
@ -84,6 +89,9 @@ Galerie {{galerie.nazev}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
href="./{{obrazek.pk}}#nahoru" class="galerie_nahled"><span class="vystredeno"></span><img
|
href="./{{obrazek.pk}}#nahoru" class="galerie_nahled"><span class="vystredeno"></span><img
|
||||||
src="{{obrazek.obrazek_maly.url}}"
|
src="{{obrazek.obrazek_maly.url}}"
|
||||||
|
{% if obrazek.popis %}
|
||||||
|
title="{{ obrazek.popis }}"
|
||||||
|
{% endif %}
|
||||||
width="{{ obrazek.obrazek_maly.width }}"
|
width="{{ obrazek.obrazek_maly.width }}"
|
||||||
height="{{ obrazek.obrazek_maly.height }}" />
|
height="{{ obrazek.obrazek_maly.height }}" />
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -613,6 +613,14 @@ div.zadani_azad_termin {
|
||||||
.podgalerie_nahled img {
|
.podgalerie_nahled img {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
max-height: 125px;
|
||||||
|
max-width: 167px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.podgalerie_nahled .nazev_galerie {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
top: 160px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* plus a minus tlacitka */
|
/* plus a minus tlacitka */
|
||||||
|
|
Loading…
Reference in a new issue