From 53775d233bb7d226229bdf157fc37f8601b03a97 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Mon, 2 Oct 2017 11:14:50 +0200 Subject: [PATCH 1/9] [enh] add global password --- prosopopee/prosopopee.py | 31 +++++++-- .../themes/exposure/templates/encrypted.html | 52 +++++--------- .../themes/exposure/templates/form.html | 22 ++++++ .../exposure/templates/index-encrypted.html | 66 ++++++++++++++++++ .../themes/material/templates/encrypted.html | 56 +++++---------- .../themes/material/templates/form.html | 30 ++++++++ .../material/templates/index-encrypted.html | 69 +++++++++++++++++++ 7 files changed, 250 insertions(+), 76 deletions(-) create mode 100644 prosopopee/themes/exposure/templates/form.html create mode 100644 prosopopee/themes/exposure/templates/index-encrypted.html create mode 100644 prosopopee/themes/material/templates/form.html create mode 100644 prosopopee/themes/material/templates/index-encrypted.html diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 52f3399..116820c 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -22,6 +22,8 @@ import ruamel.yaml as yaml from docopt import docopt +import base64 + from path import Path from jinja2 import Environment, FileSystemLoader @@ -447,6 +449,7 @@ def build_gallery(settings, gallery_settings, gallery_path, template): gallery_index_template = template.get_template("gallery-index.html") page_template = template.get_template("page.html") encrypted_template = template.get_template("encrypted.html") + from_template = template.get_template("form.html") # this should probably be a factory Image.base_dir = Path(".").joinpath(gallery_path) @@ -476,14 +479,15 @@ def build_gallery(settings, gallery_settings, gallery_path, template): open(Path("build").joinpath(gallery_path, "index.html"), "wb").write(html) - if gallery_settings.get("password"): - template_to_render = encrypted_template - password = gallery_settings.get("password") + if gallery_settings.get("password") or settings.get("password"): + password = gallery_settings.get("password", settings.get("password")) index_plain = Path("build").joinpath(gallery_path, "index.html") + form = base64.b64encode(from_template.render(gallery=gallery_settings).encode("Utf-8")) encrypted = check_output('cat %s | openssl enc -e -base64 -A -aes-256-cbc -pass pass:"%s"' % (index_plain, password), shell=True) - html = template_to_render.render( + html = encrypted_template.render( settings=settings, gallery=gallery_settings, + form=str(form, 'utf-8'), ciphertext=str(encrypted, 'utf-8'), ).encode("Utf-8") @@ -524,15 +528,18 @@ def build_gallery(settings, gallery_settings, gallery_path, template): open(Path("build").joinpath(gallery_light_path, "index.html"), "wb").write(html) - if gallery_settings.get("password"): + if gallery_settings.get("password") or settings.get("password"): light_template_to_render = light_templates.get_template("encrypted.html") + from_template = light_templates.get_template("form.html") + form = base64.b64encode(from_template.render(gallery=gallery_settings).encode("Utf-8")) template_to_render = encrypted_template - password = gallery_settings.get("password") + password = gallery_settings.get("password", settings.get("password")) index_plain = Path("build").joinpath(gallery_light_path, "index.html") encrypted = check_output('cat %s | openssl enc -e -base64 -A -aes-256-cbc -pass pass:"%s"' % (index_plain, password), shell=True) html = light_template_to_render.render( settings=settings, gallery=gallery_settings, + form=str(form, 'utf-8'), ciphertext=str(encrypted, 'utf-8'), ).encode("Utf-8") @@ -565,6 +572,18 @@ def build_index(settings, galleries_cover, templates, gallery_path='', sub_index open(Path("build").joinpath(gallery_path, "index.html"), "wb").write(html) + if settings.get("password"): + index_template_to_render = templates.get_template("index-encrypted.html") + password = settings.get("password") + index_plain = Path("build").joinpath(gallery_path, "index.html") + encrypted = check_output('cat %s | openssl enc -e -base64 -A -aes-256-cbc -pass pass:"%s"' % (index_plain, password), shell=True) + html = index_template_to_render.render( + settings=settings, + ciphertext=str(encrypted, 'utf-8') + ).encode("Utf-8") + + open(Path("build").joinpath(gallery_path, "index.html"), "wb").write(html) + def main(): arguments = docopt(__doc__, version='0.6') diff --git a/prosopopee/themes/exposure/templates/encrypted.html b/prosopopee/themes/exposure/templates/encrypted.html index 8dd4f6a..4293204 100644 --- a/prosopopee/themes/exposure/templates/encrypted.html +++ b/prosopopee/themes/exposure/templates/encrypted.html @@ -12,54 +12,40 @@ - - - -
-
-
- -

{{ gallery.title }}

-
- -
- -
-
- - - -
-
-
- - + + + + diff --git a/prosopopee/themes/exposure/templates/form.html b/prosopopee/themes/exposure/templates/form.html new file mode 100644 index 0000000..9f5dfaa --- /dev/null +++ b/prosopopee/themes/exposure/templates/form.html @@ -0,0 +1,22 @@ + +
\ +
+
+ +

{{ gallery.title }}

+
+
+
+
+ + +
+
+
+ diff --git a/prosopopee/themes/exposure/templates/index-encrypted.html b/prosopopee/themes/exposure/templates/index-encrypted.html new file mode 100644 index 0000000..bed3372 --- /dev/null +++ b/prosopopee/themes/exposure/templates/index-encrypted.html @@ -0,0 +1,66 @@ + + + + + {{ settings.title }} + + + + + + + + + + + + +
+
+
+ +

{{ settings.title }}

+
+ +
+ +
+
+ + + +
+
+ +
+ + + + + + diff --git a/prosopopee/themes/material/templates/encrypted.html b/prosopopee/themes/material/templates/encrypted.html index 1a6b118..b16be9d 100644 --- a/prosopopee/themes/material/templates/encrypted.html +++ b/prosopopee/themes/material/templates/encrypted.html @@ -14,56 +14,38 @@ + + - - + diff --git a/prosopopee/themes/material/templates/form.html b/prosopopee/themes/material/templates/form.html new file mode 100644 index 0000000..1bd9a48 --- /dev/null +++ b/prosopopee/themes/material/templates/form.html @@ -0,0 +1,30 @@ + +
+
+
+

{{ gallery.title }}

+
+ +
+ +
+
+ + +
+
+ +
+ + diff --git a/prosopopee/themes/material/templates/index-encrypted.html b/prosopopee/themes/material/templates/index-encrypted.html new file mode 100644 index 0000000..f6e33dc --- /dev/null +++ b/prosopopee/themes/material/templates/index-encrypted.html @@ -0,0 +1,69 @@ + + + + + {{ settings.title }} + + + + + + + + + + + + + +
+
+
+

{{ settings.title }}

+
+ +
+ +
+
+ + +
+
+ +
+ + + + + From f2396c32a5bd1c9b49e073e3a23d0fa556e92019 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Tue, 3 Oct 2017 00:43:29 +0200 Subject: [PATCH 2/9] [enh] auto login --- prosopopee/prosopopee.py | 9 ++- .../themes/exposure/templates/encrypted.html | 12 +++- .../themes/exposure/templates/form.html | 2 +- .../exposure/templates/index-encrypted.html | 66 ------------------ .../themes/light/templates/encrypted.html | 53 ++++++-------- prosopopee/themes/light/templates/form.html | 25 +++++++ .../themes/material/templates/encrypted.html | 14 ++-- .../themes/material/templates/form.html | 2 +- .../material/templates/index-encrypted.html | 69 ------------------- 9 files changed, 72 insertions(+), 180 deletions(-) delete mode 100644 prosopopee/themes/exposure/templates/index-encrypted.html create mode 100644 prosopopee/themes/light/templates/form.html delete mode 100644 prosopopee/themes/material/templates/index-encrypted.html diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 116820c..f98417a 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -480,9 +480,9 @@ def build_gallery(settings, gallery_settings, gallery_path, template): open(Path("build").joinpath(gallery_path, "index.html"), "wb").write(html) if gallery_settings.get("password") or settings.get("password"): + form = base64.b64encode(from_template.render(gallery=gallery_settings, settings=settings).encode("Utf-8")) password = gallery_settings.get("password", settings.get("password")) index_plain = Path("build").joinpath(gallery_path, "index.html") - form = base64.b64encode(from_template.render(gallery=gallery_settings).encode("Utf-8")) encrypted = check_output('cat %s | openssl enc -e -base64 -A -aes-256-cbc -pass pass:"%s"' % (index_plain, password), shell=True) html = encrypted_template.render( settings=settings, @@ -531,7 +531,7 @@ def build_gallery(settings, gallery_settings, gallery_path, template): if gallery_settings.get("password") or settings.get("password"): light_template_to_render = light_templates.get_template("encrypted.html") from_template = light_templates.get_template("form.html") - form = base64.b64encode(from_template.render(gallery=gallery_settings).encode("Utf-8")) + form = base64.b64encode(from_template.render(gallery=gallery_settings, settings=settings).encode("Utf-8")) template_to_render = encrypted_template password = gallery_settings.get("password", settings.get("password")) index_plain = Path("build").joinpath(gallery_light_path, "index.html") @@ -548,6 +548,7 @@ def build_gallery(settings, gallery_settings, gallery_path, template): def build_index(settings, galleries_cover, templates, gallery_path='', sub_index=False, gallery_settings={}): index_template = templates.get_template("index.html") + form_template = templates.get_template("form.html") reverse = gallery_settings.get('reverse', settings["settings"].get('reverse', False)) if reverse: @@ -573,12 +574,14 @@ def build_index(settings, galleries_cover, templates, gallery_path='', sub_index open(Path("build").joinpath(gallery_path, "index.html"), "wb").write(html) if settings.get("password"): - index_template_to_render = templates.get_template("index-encrypted.html") + form = base64.b64encode(form_template.render(settings=settings).encode("Utf-8")) + index_template_to_render = templates.get_template("encrypted.html") password = settings.get("password") index_plain = Path("build").joinpath(gallery_path, "index.html") encrypted = check_output('cat %s | openssl enc -e -base64 -A -aes-256-cbc -pass pass:"%s"' % (index_plain, password), shell=True) html = index_template_to_render.render( settings=settings, + form=str(form, 'utf-8'), ciphertext=str(encrypted, 'utf-8') ).encode("Utf-8") diff --git a/prosopopee/themes/exposure/templates/encrypted.html b/prosopopee/themes/exposure/templates/encrypted.html index 4293204..bbf2764 100644 --- a/prosopopee/themes/exposure/templates/encrypted.html +++ b/prosopopee/themes/exposure/templates/encrypted.html @@ -1,8 +1,13 @@ +{% if gallery %} +{% set pathstatic = ".." %} +{% else %} +{% set pathstatic = "." %} +{% endif %} - {{ gallery.title }} · {{ settings.title }} + {% if gallery %}{{ gallery.title }} · {% endif %}{{ settings.title }} @@ -11,10 +16,10 @@ - + - + - - - - diff --git a/prosopopee/themes/light/templates/encrypted.html b/prosopopee/themes/light/templates/encrypted.html index cf25e47..c230124 100644 --- a/prosopopee/themes/light/templates/encrypted.html +++ b/prosopopee/themes/light/templates/encrypted.html @@ -7,7 +7,7 @@ - {{ gallery.title }} · {{ settings.title }} + {% if gallery %}{{ gallery.title }} · {% endif %}{{ settings.title }} @@ -18,52 +18,39 @@ + + - - + diff --git a/prosopopee/themes/light/templates/form.html b/prosopopee/themes/light/templates/form.html new file mode 100644 index 0000000..f958c6c --- /dev/null +++ b/prosopopee/themes/light/templates/form.html @@ -0,0 +1,25 @@ + +
+
+
+

{% if gallery %}{{ gallery.title }}{% else %}{{ settings.title }}{% endif %}

+
+ +
+ +
+
+ + + +
+
+ +
+ diff --git a/prosopopee/themes/material/templates/encrypted.html b/prosopopee/themes/material/templates/encrypted.html index b16be9d..47272fa 100644 --- a/prosopopee/themes/material/templates/encrypted.html +++ b/prosopopee/themes/material/templates/encrypted.html @@ -1,8 +1,13 @@ +{% if gallery %} +{% set pathstatic = ".." %} +{% else %} +{% set pathstatic = "." %} +{% endif %} - {{ gallery.title }} · {{ settings.title }} + {% if gallery %}{{ gallery.title }} · {% endif %}{{ settings.title }} @@ -11,10 +16,10 @@ - - + + - + - - - From f2baef9f58270664d6620a4a0d6758ccb01ad62c Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Tue, 3 Oct 2017 00:49:28 +0200 Subject: [PATCH 3/9] [doc] update password access --- docs/configuration.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index 06327e6..d271ef3 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -49,6 +49,7 @@ entry like any other gallery. **NOTE**: expect the "static: " option to disappear quite soon for a more generic approach to "choose your page style". + Global settings _______________ @@ -229,6 +230,14 @@ Is option can be use too in gallery settings if you use multi level gallery:: reverse: true +Password access +~~~~~~~~~~~~~~~ + +If you wanna protect all the website by password:: + + title: Gallery + password: my_super_password + Gallery settings.yaml --------------------- From f53b1759395ff70e36321b38c7a82093c8ccd50f Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Tue, 3 Oct 2017 05:08:56 +0200 Subject: [PATCH 4/9] [fix] index css --- .../themes/exposure/static/css/encrypt.css | 93 ++++++ .../themes/exposure/static/css/style-page.css | 66 ---- .../themes/exposure/templates/encrypted.html | 42 +-- .../themes/exposure/templates/form.html | 39 ++- prosopopee/themes/light/static/css/style.css | 313 +++++++++--------- prosopopee/themes/light/templates/index.html | 2 +- .../themes/material/static/css/encrypt.css | 72 ++++ .../themes/material/static/css/style-page.css | 66 ---- .../themes/material/templates/encrypted.html | 2 +- .../themes/material/templates/form.html | 2 +- 10 files changed, 370 insertions(+), 327 deletions(-) create mode 100644 prosopopee/themes/exposure/static/css/encrypt.css create mode 100644 prosopopee/themes/material/static/css/encrypt.css diff --git a/prosopopee/themes/exposure/static/css/encrypt.css b/prosopopee/themes/exposure/static/css/encrypt.css new file mode 100644 index 0000000..650519c --- /dev/null +++ b/prosopopee/themes/exposure/static/css/encrypt.css @@ -0,0 +1,93 @@ +.staticrypt-hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; +} + +.staticrypt-page { + width: 360px; + padding: 8% 0 0; + margin: auto; + box-sizing: border-box; +} + +.staticrypt-form { + position: relative; + z-index: 1; + background: #FFFFFF; + max-width: 360px; + margin: 0 auto 100px; + padding: 45px; + text-align: center; + box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24); +} + +.staticrypt-form input { + outline: 0; + background: #292525; + width: 100%; + border: 0; + margin: 0 0 15px; + padding: 15px; + box-sizing: border-box; + font-size: 14px; +} + +.staticrypt-form .staticrypt-decrypt-button { + text-transform: uppercase; + outline: 0; + background: #91C25F; + width: 100%; + border: 0; + padding: 15px; + color: #FFFFFF; + font-size: 14px; + cursor: pointer; +} + +.staticrypt-html { + height: 100%; +} + +.staticrypt-body { + background: #FFF; /* fallback for old browsers */ + font-family: "Arial", sans-serif; +} + +.staticrypt-instructions { + margin-top: -1em; + margin-bottom: 1em; +} + +.staticrypt-title { + font-size: 1.5em; +} + +footer { + position: relative; + right: 0; + bottom: 0; + left: 0; + margin-top: 6em; + text-align: center; + font-family: 'crimson', serif; + font-size: 11px; + color: #555; + background-color: #EEE; + border-top: solid 2px #DDD; + padding-bottom: 10px; + padding-top: 14px; +} + +footer p { + margin: 0; +} + +footer a { + text-decoration: none; + font-weight: 600; + font-family: 'montserrat', sans-serif; + color: #111; +} + diff --git a/prosopopee/themes/exposure/static/css/style-page.css b/prosopopee/themes/exposure/static/css/style-page.css index db06902..e6b2ade 100644 --- a/prosopopee/themes/exposure/static/css/style-page.css +++ b/prosopopee/themes/exposure/static/css/style-page.css @@ -520,69 +520,3 @@ span.left img, span.right img { .clear { clear: both; } - -.staticrypt-hr { - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eee; -} - -.staticrypt-page { - width: 360px; - padding: 8% 0 0; - margin: auto; - box-sizing: border-box; -} - -.staticrypt-form { - position: relative; - z-index: 1; - background: #FFFFFF; - max-width: 360px; - margin: 0 auto 100px; - padding: 45px; - text-align: center; - box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24); -} - -.staticrypt-form input { - outline: 0; - background: #292525; - width: 100%; - border: 0; - margin: 0 0 15px; - padding: 15px; - box-sizing: border-box; - font-size: 14px; -} - -.staticrypt-form .staticrypt-decrypt-button { - text-transform: uppercase; - outline: 0; - background: #91C25F; - width: 100%; - border: 0; - padding: 15px; - color: #FFFFFF; - font-size: 14px; - cursor: pointer; -} - -.staticrypt-html { - height: 100%; -} - -.staticrypt-body { - background: #FFF; /* fallback for old browsers */ - font-family: "Arial", sans-serif; -} - -.staticrypt-instructions { - margin-top: -1em; - margin-bottom: 1em; -} - -.staticrypt-title { - font-size: 1.5em; -} diff --git a/prosopopee/themes/exposure/templates/encrypted.html b/prosopopee/themes/exposure/templates/encrypted.html index bbf2764..270e65c 100644 --- a/prosopopee/themes/exposure/templates/encrypted.html +++ b/prosopopee/themes/exposure/templates/encrypted.html @@ -16,42 +16,46 @@ - + - - + + sessionStorage.setItem("password", passphrase); + document.open(); + document.write(plainHTML); + document.close(); + }); +} + diff --git a/prosopopee/themes/exposure/templates/form.html b/prosopopee/themes/exposure/templates/form.html index 5b17a5e..ab0d12c 100644 --- a/prosopopee/themes/exposure/templates/form.html +++ b/prosopopee/themes/exposure/templates/form.html @@ -1,22 +1,21 @@ - -
\ -
-
- -

{% if gallery %}{{ gallery.title }}{% else %}{{ settings.title }}{% endif %}

-
-
-
-
- - -
+
+
+
+ +

{% if gallery %}{{ gallery.title }}{% else %}{{ settings.title }}{% endif %}

+
+
+
+ + +
- +
+ diff --git a/prosopopee/themes/light/static/css/style.css b/prosopopee/themes/light/static/css/style.css index 0ace685..2d0298a 100644 --- a/prosopopee/themes/light/static/css/style.css +++ b/prosopopee/themes/light/static/css/style.css @@ -1,178 +1,185 @@ +html { + background: #efefef; +} + body { - color: #222; - font-family: 'montserrat', sans-serif; - background-color: #FBFBFB; - margin: 0; + background: #fff; + width: 800px; + max-width: 95%; + margin: 20px auto; + margin-bottom: 20px; + border-radius: 4px; + margin-bottom: 100px; + font-family: sans-serif; } a { - text-decoration: none; + text-decoration: none; } .galleries-grid { - width: 100%; - height: 100%; - position: relative; - text-align: center; - margin: 0 auto; - padding: 0px; + width: 100%; + height: 100%; + position: relative; + text-align: center; + margin: 0 auto; + padding: 0px; } .galleries-line { - width: 100%; - height: 100%; - margin-bottom: -4px; /* YOLO */ + width: 100%; + height: 100%; + margin-bottom: -4px; /* YOLO */ } .covers-1 .gallery-square { - width: 100%; - height: 100%; - margin: auto; - padding-bottom: 47%; - position: relative; + width: 100%; + height: 100%; + margin: auto; + padding-bottom: 47%; + position: relative; } .covers-2 .gallery-square { - width: 50%; - height: 100%; - margin: 0 0 0; - padding-bottom: 47%; - position: relative; - display: inline-block; + width: 50%; + height: 100%; + margin: 0 0 0; + padding-bottom: 47%; + position: relative; + display: inline-block; } .covers-3 .gallery-square { - width: 33.333333333%; - height: 100%; - margin: 0; - padding-bottom: 47%; - position: relative; - display: inline-block; + width: 33.333333333%; + height: 100%; + margin: 0; + padding-bottom: 47%; + position: relative; + display: inline-block; } .gallery-square > a { - position: absolute; - top: 0px; - left: 0px; - z-index: 555; - width: 100%; - height: 100%; + position: absolute; + top: 0px; + left: 0px; + z-index: 555; + width: 100%; + height: 100%; } @keyframes darken { - from {background-color: rgba(0, 0, 0, 0);} - to {background-color: rgba(0, 0, 0, 0.3);} + from {background-color: rgba(0, 0, 0, 0);} + to {background-color: rgba(0, 0, 0, 0.3);} } .gallery-square > a:hover { - animation-name: darken; - animation-duration: 0.15s; - animation-iteration-count: 1; - background-color: rgba(0, 0, 0, 0.3); + animation-name: darken; + animation-duration: 0.15s; + animation-iteration-count: 1; + background-color: rgba(0, 0, 0, 0.3); } .gallery-cover { - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - background-position: center center; - background-size: cover; + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + background-position: center center; + background-size: cover; } .gallery-title { - color: white; - width: 100%; - position: absolute; - top: initial; - bottom: 0px; - text-align: center; - z-index: 3; - background: transparent linear-gradient(rgba(255, 255, 255, 0) 0%, transparent 1%, rgba(0, 0, 0, 0.07) 26%, rgba(0, 0, 0, 0.5) 71%, rgba(0, 0, 0, 0.7) 100%) repeat scroll 0% 0%; - padding: 20% 0 10px 0; + color: white; + width: 100%; + position: absolute; + top: initial; + bottom: 0px; + text-align: center; + z-index: 3; + background: transparent linear-gradient(rgba(255, 255, 255, 0) 0%, transparent 1%, rgba(0, 0, 0, 0.07) 26%, rgba(0, 0, 0, 0.5) 71%, rgba(0, 0, 0, 0.7) 100%) repeat scroll 0% 0%; + padding: 20% 0 10px 0; } .gallery-header { - text-align: center; - margin-top: 8em; - margin-bottom: 6.5em; + text-align: center; + margin-bottom: 6.5em; } .static-header { - margin-bottom: 0px; + margin-bottom: 0px; } #logo { - width: 10%; + width: 10%; } .gallery-header > h1 { - font-size: 2.6vw; - text-transform: uppercase; - letter-spacing: 3px; - margin-bottom: 0; + font-size: 2.6vw; + text-transform: uppercase; + letter-spacing: 3px; + margin-bottom: 0; } .gallery-header > h4 { - font-size: 1.4vw; - color: #444; - font-style: italic; - font-weight: normal; - font-family: 'crimson', serif; - margin-top: .5em; + font-size: 1.4vw; + color: #444; + font-style: italic; + font-weight: normal; + font-family: 'crimson', serif; + margin-top: .5em; } .gallery-header > hr { - width: 14%; - margin-top: 3.5em; - color: #BBB; + width: 14%; + margin-top: 3.5em; + color: #BBB; } .gallery-title > h2 { - text-transform: uppercase; - margin-bottom: .2em; - letter-spacing: 2px; - font-size: 1.7vw; + text-transform: uppercase; + margin-bottom: .2em; + letter-spacing: 2px; + font-size: 1.7vw; } .gallery-title > h3 { - font-style: italic; - margin-top: 0; - margin-bottom: .7em; - font-family: 'crimson', serif; - font-weight: normal; + font-style: italic; + margin-top: 0; + margin-bottom: .7em; + font-family: 'crimson', serif; + font-weight: normal; } .gallery-datetime { - font-family: 'crimson', serif; - text-transform: uppercase; - letter-spacing: 2px; - font-size: 11px; + font-family: 'crimson', serif; + text-transform: uppercase; + letter-spacing: 2px; + font-size: 11px; } footer { - margin-top: 7em; - text-align: center; - position: relative; - font-family: 'crimson', serif; - font-size: 11px; - color: #555; - background-color: #EEE; - border-top: solid 2px #DDD; - padding-bottom: 10px; - padding-top: 14px; + margin-top: 7em; + text-align: center; + position: relative; + font-family: 'crimson', serif; + font-size: 11px; + color: #555; + background-color: #EEE; + border-top: solid 2px #DDD; + padding-bottom: 10px; + padding-top: 14px; } footer p { - margin: 0; + margin: 0; } footer a { - text-decoration: none; - font-weight: 600; - font-family: 'montserrat', sans-serif; - color: #111; + text-decoration: none; + font-weight: 600; + font-family: 'montserrat', sans-serif; + color: #111; } nav { @@ -226,76 +233,76 @@ nav ul a { } nav ul li > a.item-menu::before { - content: "/"; - margin-right: 22px; - font-size: 18px; - line-height: 1; - color: #ebebeb; + content: "/"; + margin-right: 22px; + font-size: 18px; + line-height: 1; + color: #ebebeb; } .gallery-tag { - font-size: 13px; - text-transform: uppercase; - font-style: normal; - display: inline; - font-family: "adobe-garamond-pro", serif; + font-size: 13px; + text-transform: uppercase; + font-style: normal; + display: inline; + font-family: "adobe-garamond-pro", serif; } .gallery-tag span { - font-size: 12px; - border-bottom: solid 1px rgba(255,255,255,0.2); - display: inline-block; - margin: 0 0 0 3px; - font-weight: bold; - font-family: "europa", sans-serif; - text-transform: uppercase; - letter-spacing: 3px; - font-style: normal; + font-size: 12px; + border-bottom: solid 1px rgba(255,255,255,0.2); + display: inline-block; + margin: 0 0 0 3px; + font-weight: bold; + font-family: "europa", sans-serif; + text-transform: uppercase; + letter-spacing: 3px; + font-style: normal; } .gallery-cover video.fillWidth { - height: 100%; - position: absolute; - top: 0px; - left: 0px; + height: 100%; + position: absolute; + top: 0px; + left: 0px; } .gallery-cover img.fillWidth { - height: 100%; + height: 100%; } .back-to-home hr { - width: 14%; - color: #DDD; + width: 14%; + color: #DDD; } .back-to-home #logo { - background: transparent url("../img/logo.svg") no-repeat scroll center top / cover; - border-radius: 100em; - border: 7px solid black; - margin: auto; - margin-top: 1em; - height: 150px; - width: 150px; - color: transparent; - font-size: 40px; + background: transparent url("../img/logo.svg") no-repeat scroll center top / cover; + border-radius: 100em; + border: 7px solid black; + margin: auto; + margin-top: 1em; + height: 150px; + width: 150px; + color: transparent; + font-size: 40px; } .back-to-home a { - position: relative; - text-decoration: none; - color: transparent; + position: relative; + text-decoration: none; + color: transparent; } .back-to-home #logo:hover { - background-color: black; - text-decoration: none; - color: white; - display: flex; - align-items: center; - justify-content: center; - text-align: center; - text-transform: uppercase; - font-family: 'montserrat', sans-serif; - font-weight: bold; + background-color: black; + text-decoration: none; + color: white; + display: flex; + align-items: center; + justify-content: center; + text-align: center; + text-transform: uppercase; + font-family: 'montserrat', sans-serif; + font-weight: bold; } diff --git a/prosopopee/themes/light/templates/index.html b/prosopopee/themes/light/templates/index.html index 04ee28c..b71717f 100644 --- a/prosopopee/themes/light/templates/index.html +++ b/prosopopee/themes/light/templates/index.html @@ -22,7 +22,7 @@ {% block content %}
- {% for galleries_line in galleries|reverse|batch(3)|reverse %} + {% for galleries_line in galleries|reverse|batch(1)|reverse %}
{% for gallery in galleries_line|reverse %}
-