From dadf1c23f873f97bbfc0a5e0a2990067db15e542 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 4 May 2016 14:19:46 +0200 Subject: [PATCH] [fix] makedirs only happened when gallery was public --- example/build/first_gallery/index.html | 298 +++++++++++++++++++++--- example/build/index.html | 2 +- example/build/static/css/style-page.css | 69 +++++- example/first_gallery/settings.yaml | 34 +++ prosopopee/prosopopee.py | 4 +- 5 files changed, 368 insertions(+), 39 deletions(-) diff --git a/example/build/first_gallery/index.html b/example/build/first_gallery/index.html index 151eb18..2eb1195 100644 --- a/example/build/first_gallery/index.html +++ b/example/build/first_gallery/index.html @@ -17,6 +17,9 @@ + + +
@@ -31,39 +34,104 @@
- - - - - -
- - -
- -
-
- - - -
-
plop
+
+
+ +
+
+

Beautiful Title

+

pouet pouet

+ + +
08 December 2015
+
- +
+ + +
-
+ + + + + + +
+ + + +
+ + + + + + + + + + +
+ + + +
+ + + + + + + + +
+ + + +
+ + + + + + + + + + +
+ + + +
+ @@ -73,22 +141,123 @@ -
+
+ +
+ + + + + + + + +
+ + + + + + +
+ + + + +
+ +
+ + + + + + + +
+ + + + +
+ + +
+ +
+ + + + + + +
+ + + + + + +
+ +
+ + + + + + +
+ + + + +
+ + +
+ +
+ + +
+
+ +
@@ -97,15 +266,19 @@ + +
@@ -114,15 +287,19 @@ + + @@ -133,11 +310,15 @@ + +
+ - + +
@@ -146,24 +327,47 @@ + +
+ - + +
-
+
+ + + + + - -
+ + + + + + +
+
+ + + +
+
+ @@ -171,7 +375,7 @@

-
diff --git a/example/build/static/css/style-page.css b/example/build/static/css/style-page.css index cedb963..ca17c42 100644 --- a/example/build/static/css/style-page.css +++ b/example/build/static/css/style-page.css @@ -9,11 +9,12 @@ body { width: 100%; background-color: #FBFBFB; color: black; - margin: 0; + margin: 0px; } section { margin-bottom: 80px; + margin-top: 40px; } a { @@ -27,6 +28,7 @@ a { height: 100%; width: 100%; min-height: 250px; + margin-top: 0; } .full-picture > .picture-text { @@ -90,7 +92,6 @@ a { .pictures-line .picture img { width: 100%; - height: 100%; } .pictures-line .separator { @@ -336,3 +337,67 @@ a.google { line-height: normal; color: #333; } + +.bordered-picture video, +.picture video { + position: absolute; + top: 0; + left: 0; + z-index: 2; + width: 100%; + height: auto; +} + +.full-picture video { + position: fixed; right: 0; bottom: 0; + min-width: 100%; min-height: 100%; + width: auto; height: auto; z-index: -100; + background-size: cover; +} + +.bordered-picture video { + width: 77%; + margin-left: 11.5%; + margin-right: 11.5%; +} + +.bg-section { + padding: 1px 0px; +} + +.bg-section section { + margin-bottom: 40px; + margin-top: 40px; +} + +.video-container { + position: relative; + bottom: 0%; + left: 0%; + height: 100%; + width: 100%; + overflow: hidden; + background: #000; +} + +.video-container .title-container { + z-index: 1000; + position: absolute; + background-color: rgba(0, 0, 0, .4); + width: 100%; + height: 100%; + display: flex; + color: white; + align-items: center; + justify-content: center; + text-align: center; +} + +.video-container video { + position: absolute; + z-index: 0; + bottom: 0; +} +.video-container video.fillWidth { + width: 100%; +} diff --git a/example/first_gallery/settings.yaml b/example/first_gallery/settings.yaml index 9387b2a..a551c80 100644 --- a/example/first_gallery/settings.yaml +++ b/example/first_gallery/settings.yaml @@ -9,13 +9,43 @@ sections: title: Beautiful Title sub_title: pouet pouet date: 2015-12-08 + - type: full-picture + image: + name: video.mp4 + type: video + text: + title: Beautiful Title + sub_title: pouet pouet + date: 2015-12-08 + - type: bordered-picture + image: + name: video.mp4 + type: video - type: bordered-picture image: stuff.png + - type: bordered-picture + image: + name: video.mp4 + type: video + text: "plop" - type: bordered-picture image: stuff.png text: "plop" - type: text text: « voici plein de blabla à rajouter et ceci est du gras et encore plein plein plein plein de text car je veux voir comment ça va wrapper car c'est important et il faut pas que j'oublie de mettre des margins en % sinon ça va pas le faire alala là ça devrait aller » + - type: pictures-group + images: + - + - name: stuff.png + text: "test" + - name: video.mp4 + type: video + - name: stuff.png + text: "test" + - + - stuff.png + - name: video.mp4 + type: video - type: pictures-group images: - @@ -30,3 +60,7 @@ sections: - stuff.png - type: full-picture image: stuff.png + - type: full-picture + image: + name: video.mp4 + type: video diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 505138f..0f21bbd 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -293,8 +293,8 @@ def main(): "cover": cover_image_path, }) - if not os.path.exists(os.path.join("build", gallery)): - os.makedirs(os.path.join("build", gallery)) + if not os.path.exists(os.path.join("build", gallery)): + os.makedirs(os.path.join("build", gallery)) # this should probably be a factory Image.base_dir = os.path.join(os.getcwd(), gallery)