diff --git a/CHANGELOG.md b/CHANGELOG.md index e6b37a6..db58f10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ CHANGELOG * configure licence https://github.com/Psycojoker/prosopopee#licence in footer by beudbeud * possibility to use a range for the full picture date https://github.com/Psycojoker/prosopopee#full-screen-picture-with-or-without-text-on-it by beudbeud * Update material theme by beudbeud +* social share https://github.com/Psycojoker/prosopopee#share by beudbeud +* Define background of section https://github.com/abeudin/prosopopee#background-settings by beudbeud 0.2 (2016-02-23) ---------------- diff --git a/README.md b/README.md index 87fd310..a914769 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,16 @@ licence: url: "http://www.wtfpl.net/txt/copying/" ``` +##### Share + +If you want enable the share content on social network, add key in **root** settings.yaml. For example: +By defaut you can share on facebook, twitter, pinterest, google+. + +```yaml +share: true +url: "http://prosopopee.com/" +``` + ### Gallery settings.yaml This settings.yaml will describe: @@ -355,6 +365,21 @@ How to use it: image: 7.jpg ``` +#### Author + +This section is for describe the author of the story. + +```yaml + - type: author + name: Adrien Beudin + text: Some text + image: IMG_20150725_200941.jpg + twitter: beudbeud (Optional) + facebook: beudbeud (Optional) + website: plop.fr (Optional) +``` + + ### Images caption @@ -383,7 +408,25 @@ And on pictures-group - image5.jpg ``` +### Background settings +For all section you can define the background. + +Exemple for background color + +```yaml + - type: bordered-picture + background: "#555" + image: another_picture.jpg +``` + +or you can use picture + +```yaml + - type: bordered-picture + background: "url(background_picture.jpg)" + image: another_picture.jpg +``` ### Example diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index fde573a..50ff487 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -157,7 +157,7 @@ def main(): Image.target_dir = os.path.join(os.getcwd(), "build", gallery) template_to_render = page_template if gallery_settings.get("static") else gallery_index_template - open(os.path.join("build", gallery, "index.html"), "w").write(template_to_render.render(settings=settings, gallery=gallery_settings, Image=Image).encode("Utf-8")) + open(os.path.join("build", gallery, "index.html"), "w").write(template_to_render.render(settings=settings, gallery=gallery_settings, Image=Image, link=gallery).encode("Utf-8")) front_page_galleries_cover = reversed(sorted(front_page_galleries_cover, key=lambda x: x["date"])) diff --git a/prosopopee/themes/exposure/static/css/style-page.css b/prosopopee/themes/exposure/static/css/style-page.css index 8b6cbcf..ddc7db4 100644 --- a/prosopopee/themes/exposure/static/css/style-page.css +++ b/prosopopee/themes/exposure/static/css/style-page.css @@ -148,7 +148,6 @@ footer { .back-to-home hr { width: 14%; - margin-top: 8em; color: #DDD; } @@ -253,3 +252,89 @@ footer a { margin-right: 11.5%; } +.center, .center-align { + text-align: center; +} + + +.share, .author { + text-align: center; + height: auto; + position: relative; + bottom: 0; + padding: 0 0 10px 0; + font-family: 'crimson', serif; +} + + +ul.icon { + padding: 0; + margin: 10px 0 0 0; +} + +ul.icon li { + padding: 0; + list-style-type: none; + display:inline-block; +} + +ul.icon a { + display: block; + float: left; + background: url(../img/social-share.png) no-repeat; + background-size: 196px 23px; + border: none; +} + +ul.icon li, ul.icon a { + width: 32px; + height: 32px; + text-indent: -999999em; + overflow: hidden; + list-style-type: none; + display: inline-block; +} + +a.twitter { + background-position: 5px 0 !important; +} + +a.facebook { + background-position: -57px 0 !important; +} + +a.pinterest { + background-position: -114px 0 !important; +} + +a.google { + background-position: -172px 0 !important; +} + +.author img.circle { + border-radius: 50%; + width: 80px; +} + +.author { + padding-bottom: 7em; +} + +.author-meta { + color: #ccc; + font-style: italic; + font-size: 19px; +} + +.author h4 { + text-transform: uppercase; +} +.author .desc { + width: 350px; + margin: auto; + padding-bottom: 10px; + font-style: normal; + font-size: 14px; + line-height: normal; + color: #333; +} diff --git a/prosopopee/themes/exposure/static/img/social-share.png b/prosopopee/themes/exposure/static/img/social-share.png new file mode 100644 index 0000000..3d78248 Binary files /dev/null and b/prosopopee/themes/exposure/static/img/social-share.png differ diff --git a/prosopopee/themes/exposure/templates/gallery-index.html b/prosopopee/themes/exposure/templates/gallery-index.html index 1902c60..36d573f 100644 --- a/prosopopee/themes/exposure/templates/gallery-index.html +++ b/prosopopee/themes/exposure/templates/gallery-index.html @@ -1,49 +1,53 @@ -
- - - - - - + + + + + + + - - -{{ section.text }}
{{ section.text }}
{{ section.text }}