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 %}
|
||||
|
||||
{% if podgalerie %}
|
||||
{% with 22 as max_delka_nazvu %}
|
||||
<div class="galerie_nahledy">
|
||||
{% 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 %}
|
||||
{% with galerie.titulni_obrazek.obrazek_maly as obrazek %}
|
||||
<img src="{{ obrazek.url }}"
|
||||
width="{% widthratio obrazek.width 167 obrazek.width %}"
|
||||
height="{% widthratio obrazek.width 167 obrazek.height %}" />
|
||||
{% endwith %}
|
||||
{% with galerie.titulni_obrazek.obrazek_maly as obrazek %}
|
||||
<img src="{{ obrazek.url }}"
|
||||
/>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
<div>
|
||||
{{ galerie }}
|
||||
<div class="nazev_galerie">
|
||||
{{ galerie|truncatechars:max_delka_nazvu }}
|
||||
</div>
|
||||
</a>
|
||||
{% if user.is_staff and galerie.zobrazit > 0 %}
|
||||
|
@ -66,6 +70,7 @@ Galerie {{galerie.nazev}}
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if user.is_staff and galerie.zobrazit > 0 %}
|
||||
|
@ -84,6 +89,9 @@ Galerie {{galerie.nazev}}
|
|||
{% endif %}
|
||||
href="./{{obrazek.pk}}#nahoru" class="galerie_nahled"><span class="vystredeno"></span><img
|
||||
src="{{obrazek.obrazek_maly.url}}"
|
||||
{% if obrazek.popis %}
|
||||
title="{{ obrazek.popis }}"
|
||||
{% endif %}
|
||||
width="{{ obrazek.obrazek_maly.width }}"
|
||||
height="{{ obrazek.obrazek_maly.height }}" />
|
||||
</a>
|
||||
|
|
|
@ -613,6 +613,14 @@ div.zadani_azad_termin {
|
|||
.podgalerie_nahled img {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 15px;
|
||||
max-height: 125px;
|
||||
max-width: 167px;
|
||||
}
|
||||
|
||||
.podgalerie_nahled .nazev_galerie {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 160px;
|
||||
}
|
||||
|
||||
/* plus a minus tlacitka */
|
||||
|
|
Loading…
Reference in a new issue