From f9e037163a054be794783c712efc10973739eb1d Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Sun, 25 Oct 2015 19:07:05 +0100 Subject: [PATCH 1/4] galerie | float nahledy --- galerie/templates/galerie/GalerieNahled.html | 36 +++++--------------- mamweb/static/css/mamweb.css | 34 ++++++++++++------ 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/galerie/templates/galerie/GalerieNahled.html b/galerie/templates/galerie/GalerieNahled.html index a2dce6fc..e2ce3416 100644 --- a/galerie/templates/galerie/GalerieNahled.html +++ b/galerie/templates/galerie/GalerieNahled.html @@ -34,41 +34,21 @@ {# obrazky v galerii #} {% if obrazky %} - +
{% for obrazek in obrazky %} - {% if forloop.counter|add:-1|divisibleby:3 %} -
- {% endif %} - - {% if forloop.last %} - {% if not forloop.counter|divisibleby:3 %} - - {% endif %} - {% if not forloop.counter|divisibleby:2 %} - - {% endif %} - {% endif %} - {% if forloop.counter|divisibleby:3 or forloop.last %} - - {% endif %} + + {% endfor %} -
- +
+
+ {% else %}
V galerii nejsou žádné fotky. diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index b7431e15..7ba04987 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -467,27 +467,39 @@ div.zadani_azad_termin { background-repeat: no-repeat; } -.galerie{ +/*.galerie{ position: relative; -} +}*/ .galerie_nahledy{ - margin: 1em 0; - text-align: center; + /*margin: 1em 0;*/ + margin: 0 auto 0 auto; } -.galerie_index{ + +.galerie_nahledy a{ + height: 100%; width: 100%; } -.galerie_index td{ - width: 50%; -} + .galerie_nahled{ - width: 100%; + float: left; + width: 190px; + height: 190px; + vertical-align: middle; + text-align: center; + border: solid; + border-width: 4px; + border-radius: 5px; + border-color: #ffa500; + background-color: #ffa500; + margin: 10px; } -.galerie_nahled td{ - width: 33%; + +.galerie_nahled img{ + border-radius: 2px; } + /* titulni stranka */ .zjistit_vic{ From ed81bf65770ea735afabe1cbcfc8ea3ef9c1e3ce Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Sun, 25 Oct 2015 19:44:45 +0100 Subject: [PATCH 2/4] galerie | vystredeni nahledu --- galerie/templates/galerie/GalerieNahled.html | 3 +-- mamweb/static/css/mamweb.css | 24 ++++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/galerie/templates/galerie/GalerieNahled.html b/galerie/templates/galerie/GalerieNahled.html index e2ce3416..49ccbd50 100644 --- a/galerie/templates/galerie/GalerieNahled.html +++ b/galerie/templates/galerie/GalerieNahled.html @@ -37,7 +37,7 @@
{% for obrazek in obrazky %}
-
+
-
{% endfor %}
diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index 7ba04987..d9ea899c 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -467,13 +467,20 @@ div.zadani_azad_termin { background-repeat: no-repeat; } -/*.galerie{ +.galerie{ position: relative; -}*/ + text-align: center; +} + +.popis{ + text-align: center; + margin: 10px; +} .galerie_nahledy{ /*margin: 1em 0;*/ margin: 0 auto 0 auto; + text-align: center; } .galerie_nahledy a{ @@ -481,11 +488,10 @@ div.zadani_azad_termin { width: 100%; } -.galerie_nahled{ +.galerie_nahled{ /* frame */ float: left; width: 190px; height: 190px; - vertical-align: middle; text-align: center; border: solid; border-width: 4px; @@ -493,10 +499,20 @@ div.zadani_azad_termin { border-color: #ffa500; background-color: #ffa500; margin: 10px; + white-space: nowrap; +} + +.vystredeno{ /* helper */ + display: inline-block; + height: 100%; + vertical-align: middle; } .galerie_nahled img{ border-radius: 2px; + vertical-align: middle; + max-height: 180px; + max-width: 180px; } From 9defd0ef68595d57a1e57095665320a1726e45c1 Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Sun, 25 Oct 2015 20:51:12 +0100 Subject: [PATCH 3/4] galerie | vystredeni detailu obrazku --- mamweb/static/css/mamweb.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index d9ea899c..1fbcc49f 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -470,6 +470,8 @@ div.zadani_azad_termin { .galerie{ position: relative; text-align: center; + width: 620px; + margin: 0 auto 0 auto; } .popis{ From ec020bd5e8a383f967712d783d25938864449b15 Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Tue, 27 Oct 2015 20:00:01 +0100 Subject: [PATCH 4/4] galerie | vylepseni css --- galerie/templates/galerie/Galerie.html | 6 ++++-- mamweb/static/css/mamweb.css | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/galerie/templates/galerie/Galerie.html b/galerie/templates/galerie/Galerie.html index c37f5a62..e699e243 100644 --- a/galerie/templates/galerie/Galerie.html +++ b/galerie/templates/galerie/Galerie.html @@ -5,14 +5,16 @@ {% endblock %}{% endblock %} {% block content %} -

{{galerie.nazev}}

+ {# TODO šipky na přecházeni dodelat ve stylech #}
{% if obrazky_predchozi %} {% with obrazky_predchozi|last as predchozi_obrazek %} -
+
{% endwith %} diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index 1fbcc49f..6316c6a2 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -470,13 +470,17 @@ div.zadani_azad_termin { .galerie{ position: relative; text-align: center; - width: 620px; + width: 630px; margin: 0 auto 0 auto; } +.galerie h2{ + text-align: center; +} + .popis{ text-align: center; - margin: 10px; + margin: 10px 10px 30px 10px; } .galerie_nahledy{ @@ -485,6 +489,10 @@ div.zadani_azad_termin { text-align: center; } +.galerie_nahledy img{ + margin: 0 10px 0 10px; +} + .galerie_nahledy a{ height: 100%; width: 100%; @@ -496,12 +504,12 @@ div.zadani_azad_termin { height: 190px; text-align: center; border: solid; - border-width: 4px; + border-width: 2px; border-radius: 5px; border-color: #ffa500; - background-color: #ffa500; - margin: 10px; + background-color: #ffb52d; white-space: nowrap; + margin: 10px; } .vystredeno{ /* helper */