From 3c5571e5ca3d0f07c37aea1aa3a54bc6817c9381 Mon Sep 17 00:00:00 2001 From: abeudin Date: Tue, 8 Mar 2016 14:03:33 +0100 Subject: [PATCH 1/9] Update bordered-picture.html --- .../themes/material/templates/sections/bordered-picture.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosopopee/themes/material/templates/sections/bordered-picture.html b/prosopopee/themes/material/templates/sections/bordered-picture.html index 7971de1..a5b11c3 100644 --- a/prosopopee/themes/material/templates/sections/bordered-picture.html +++ b/prosopopee/themes/material/templates/sections/bordered-picture.html @@ -1,4 +1,4 @@ -
+
{% set image = Image(section.image) %} {% set caption = section.text %} {{ image.copy()}} From 51ada6267b96eca3c8dd88b4a02fb489aaf48de9 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Wed, 30 Mar 2016 11:12:30 +0200 Subject: [PATCH 2/9] Add range of date in full-picture --- .../templates/sections/full-picture.html | 17 +++++++++++------ .../templates/sections/full-picture.html | 11 ++++++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/prosopopee/themes/exposure/templates/sections/full-picture.html b/prosopopee/themes/exposure/templates/sections/full-picture.html index 48eb774..7cbfbd3 100644 --- a/prosopopee/themes/exposure/templates/sections/full-picture.html +++ b/prosopopee/themes/exposure/templates/sections/full-picture.html @@ -2,12 +2,17 @@ {{ image.copy() }}
{% if section.text %} -
-
-

{{ section.text.title }}

-

{{ section.text.sub_title }}

- {% if section.text.date %}
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} -
+
+
+

{{ section.text.title }}

+

{{ section.text.sub_title }}

+ {% if section.text.date_end } +
{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}
{% endif %} + {% else } + {% if section.text.date %} +
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} + {% endif %}
+
{% endif %}
diff --git a/prosopopee/themes/material/templates/sections/full-picture.html b/prosopopee/themes/material/templates/sections/full-picture.html index f20537b..7fc1961 100644 --- a/prosopopee/themes/material/templates/sections/full-picture.html +++ b/prosopopee/themes/material/templates/sections/full-picture.html @@ -4,9 +4,14 @@
{% if section.text %}
-

{{ section.text.title }}

-

{{ section.text.sub_title }}

- {% if section.text.date %}
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} +

{{ section.text.title }}

+

{{ section.text.sub_title }}

+ {% if section.text.date_end } +
{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}
{% endif %} + {% else } + {% if section.text.date %} +
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} + {% endif %}
{% endif %}
From 5a6e11ec800e72daec804d5eb71ac060756da87f Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Wed, 30 Mar 2016 11:23:07 +0200 Subject: [PATCH 3/9] fix range --- .../themes/exposure/templates/sections/full-picture.html | 6 +++--- .../themes/material/templates/sections/full-picture.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/prosopopee/themes/exposure/templates/sections/full-picture.html b/prosopopee/themes/exposure/templates/sections/full-picture.html index 7cbfbd3..4bfbf54 100644 --- a/prosopopee/themes/exposure/templates/sections/full-picture.html +++ b/prosopopee/themes/exposure/templates/sections/full-picture.html @@ -6,9 +6,9 @@

{{ section.text.title }}

{{ section.text.sub_title }}

- {% if section.text.date_end } -
{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}
{% endif %} - {% else } + {% if section.text.date_end %} +
{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}
+ {% else %} {% if section.text.date %}
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} {% endif %} diff --git a/prosopopee/themes/material/templates/sections/full-picture.html b/prosopopee/themes/material/templates/sections/full-picture.html index 7fc1961..65a7afd 100644 --- a/prosopopee/themes/material/templates/sections/full-picture.html +++ b/prosopopee/themes/material/templates/sections/full-picture.html @@ -6,9 +6,9 @@

{{ section.text.title }}

{{ section.text.sub_title }}

- {% if section.text.date_end } -
{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}
{% endif %} - {% else } + {% if section.text.date_end %} +
{{ section.text.date.strftime("%d %B %Y") }} to {{ section.text.date_end.strftime("%d %B %Y") }}
+ {% else %} {% if section.text.date %}
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} {% endif %} From 0805c8183b657df8f058833619143b0557cf5533 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Wed, 30 Mar 2016 13:32:07 +0200 Subject: [PATCH 4/9] fix bordered picture --- prosopopee/themes/material/static/css/styles.css | 13 ++++++++++--- .../templates/sections/bordered-picture.html | 8 ++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/prosopopee/themes/material/static/css/styles.css b/prosopopee/themes/material/static/css/styles.css index 0baaed5..c2bf495 100644 --- a/prosopopee/themes/material/static/css/styles.css +++ b/prosopopee/themes/material/static/css/styles.css @@ -62,8 +62,8 @@ main { } .bordered-picture .caption__overlay { - margin-left: 11.5%; - margin-right: 11.5%; + margin-left: 11.5% !important; + margin-right: 11.5% !important; } .caption .card-panel { @@ -71,4 +71,11 @@ main { padding: 1px; text-align: center; } - + +.bordered-picture img { + height: 77%; + width: 77%; + margin-left: 11.5%; + margin-right: 11.5%; +} + diff --git a/prosopopee/themes/material/templates/sections/bordered-picture.html b/prosopopee/themes/material/templates/sections/bordered-picture.html index a5b11c3..1744d07 100644 --- a/prosopopee/themes/material/templates/sections/bordered-picture.html +++ b/prosopopee/themes/material/templates/sections/bordered-picture.html @@ -1,8 +1,8 @@ +{% set image = Image(section.image) %} +{% set caption = section.text %} +{{ image.copy()}}
- {% set image = Image(section.image) %} - {% set caption = section.text %} - {{ image.copy()}} - + {% if caption %}
From 31b0da1a2e2af15c6722c0d04afba9c26342dfde Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Fri, 1 Apr 2016 19:40:28 +0200 Subject: [PATCH 5/9] fix some stuff on material theme --- README.md | 32 +++++++- .../themes/exposure/templates/index.html | 2 +- .../themes/material/static/css/styles.css | 41 +++++++++- .../material/templates/gallery-index.html | 2 +- .../themes/material/templates/index.html | 78 ++++++++++++------- .../templates/sections/pictures-group.html | 42 +++++----- 6 files changed, 139 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 4f40c00..dc15b46 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,6 @@ image: auto-orient: False ``` - ### Different kind of sections A gallery is composed of a succession of sections as you can see on this [wonderfully @@ -250,6 +249,7 @@ With text: title: Big picture title sub_title: Some text date: 2016-01-15 + date_end: 2016-01-24 (Optional) ``` Without text: @@ -344,6 +344,36 @@ How to use it: image: 7.jpg ``` +### Images caption + + +Prosopopée has a support of caption in images, you can use it on bordered-picture and pictures-group. + +Exemple on bordered-picture : + +```yaml + - type: bordered-picture + image: another_picture.jpg + text: This is a caption +``` + +And on pictures-group + +```yaml + - type: pictures-group + images: + - + - name: image1.jpg + text: This is a caption + - image2.jpg + - image3.jpg + - + - image4.jpg + - image5.jpg +``` + + + ### Example As a recap, here is how the files of the example gallery are organised: diff --git a/prosopopee/themes/exposure/templates/index.html b/prosopopee/themes/exposure/templates/index.html index 70f0ec7..7aee826 100644 --- a/prosopopee/themes/exposure/templates/index.html +++ b/prosopopee/themes/exposure/templates/index.html @@ -20,7 +20,7 @@

{{ gallery.title }}

{% if gallery.sub_title %}

{{ gallery.sub_title }}

{% endif %} {% if settings.show_date and gallery.date %}{% endif %} - {% if gallery.tags %}{% endif %} + {% if gallery.tags %}{% endif %}
{% set cover = Image(gallery.cover) %} diff --git a/prosopopee/themes/material/static/css/styles.css b/prosopopee/themes/material/static/css/styles.css index c2bf495..4cec8a8 100644 --- a/prosopopee/themes/material/static/css/styles.css +++ b/prosopopee/themes/material/static/css/styles.css @@ -61,10 +61,6 @@ main { transform: translateY(0); } -.bordered-picture .caption__overlay { - margin-left: 11.5% !important; - margin-right: 11.5% !important; -} .caption .card-panel { margin: 0; @@ -79,3 +75,40 @@ main { margin-right: 11.5%; } +.bordered-picture .caption__overlay { + margin-left: 11.5%; + margin-right: 11.5%; +} + +.pictures-line { + min-width: 77%; + width: 77%; + margin-left: 11.5%; + margin-right: 11.5%; + display: flex; + margin-bottom: 0.5em; +} + +.pictures-line .picture img { + width: 100%; + height: 100%; +} + +.small-card { + height: 400px; +} + +.chip .tag { + position: absolute; + left: -3px; + font-size: 22px; + line-height: 34px; +} + +.image { + position: relative; +} + +.card-action .right { + margin-top: -5px; +} diff --git a/prosopopee/themes/material/templates/gallery-index.html b/prosopopee/themes/material/templates/gallery-index.html index 6af5a77..70784f5 100644 --- a/prosopopee/themes/material/templates/gallery-index.html +++ b/prosopopee/themes/material/templates/gallery-index.html @@ -23,7 +23,7 @@ diff --git a/prosopopee/themes/material/templates/index.html b/prosopopee/themes/material/templates/index.html index b34d361..b0f665e 100644 --- a/prosopopee/themes/material/templates/index.html +++ b/prosopopee/themes/material/templates/index.html @@ -9,40 +9,60 @@
{% for galleries_line in galleries|reverse|batch(3)|reverse %} -
- {% for gallery in galleries_line|reverse %} - {% if loop.length is divisibleby 2 %} -
+ {% for gallery in galleries_line|reverse %} + {% if loop.length is divisibleby 2 %} +
{% else %} {% if loop.last %} -
- {% else %} -
- {% endif %} - {% endif %} - -
-
- {% set cover = Image(gallery.cover) %} - {{ cover.copy() }} - - {{ gallery.title }} -
-
- {% if gallery.sub_title %}{{ gallery.sub_title }}{% endif %} - {% if gallery.tags %}{% for tag in gallery.tags -%}
{{ tag }}
{% endfor -%}{% endif %} -
-
- Read more.. - {% if gallery.date %}
{{ gallery.date.strftime("%d %B %Y") }}
{% endif %} -
+
+ {% else %} +
+ {% endif %} + {% endif %} + +
+
+ {% set cover = Image(gallery.cover) %} + {{ cover.copy() }} + + + {{ gallery.title }} + {% if gallery.sub_title %} : {{ gallery.sub_title }}{% endif %} + +
+
+ + {% if gallery.tags or gallery.date %} +
+ {% if gallery.tags %}{% for tag in gallery.tags -%} +
+
+ +
+ {{ tag[0].capitalize() }} +
+ + {{ tag }} +
+
+ {% endfor -%} + {% endif %} + {% if gallery.date %} +
+ {{ gallery.date.strftime("%d %B %Y") }} +
+ {% endif %} +
+ {% endif %} +
+
+
- + {% endfor %}
{% endfor %} -
- {% endfor %} -
diff --git a/prosopopee/themes/material/templates/sections/pictures-group.html b/prosopopee/themes/material/templates/sections/pictures-group.html index e515099..d912ab1 100644 --- a/prosopopee/themes/material/templates/sections/pictures-group.html +++ b/prosopopee/themes/material/templates/sections/pictures-group.html @@ -1,29 +1,27 @@ -
-
+
+
{% for line in section.images %} - {% for image in line %} - {% set caption = image.text %} - {% set image = Image(image) %} - {{ image.copy() }} - {% set plop = 12 // loop.length %} -
-
-
- - - {% if caption %} -
-
{{ caption }}
-
- {% endif %} -
+
+ {% for image in line %} + {% set caption = image.text %} + {% set image = Image(image) %} + {{ image.copy() }} + + {% endfor %}
- {% if not loop.last %} -
- {% endif %} - {% endfor %} {% endfor %}
From c976b03b28efcf4408dc02970d4dde04cccd0f41 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Fri, 1 Apr 2016 20:52:04 +0200 Subject: [PATCH 6/9] Add support of licence --- README.md | 11 +++++++++++ prosopopee/themes/exposure/templates/base.html | 2 +- prosopopee/themes/material/templates/footer.html | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc15b46..7be1bc5 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,17 @@ settings: theme: material ``` +##### Licence + +By default Prosopopée use CC-BY-SA for all the content, if you want use a another licence +you need add key in **root** settings.yaml. For example: + +```yaml +licences: + name: WTFPL + url: "http://www.wtfpl.net/txt/copying/" +``` + ### Gallery settings.yaml This settings.yaml will describe: diff --git a/prosopopee/themes/exposure/templates/base.html b/prosopopee/themes/exposure/templates/base.html index a62bd68..ef4dffe 100644 --- a/prosopopee/themes/exposure/templates/base.html +++ b/prosopopee/themes/exposure/templates/base.html @@ -28,7 +28,7 @@ {% endblock %} diff --git a/prosopopee/themes/material/templates/footer.html b/prosopopee/themes/material/templates/footer.html index 5c4f98f..18245df 100644 --- a/prosopopee/themes/material/templates/footer.html +++ b/prosopopee/themes/material/templates/footer.html @@ -1,7 +1,7 @@ From a85e6f896f1788792d66ac3189e00c89435217f8 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Fri, 1 Apr 2016 20:58:28 +0200 Subject: [PATCH 7/9] update footer --- prosopopee/themes/material/templates/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosopopee/themes/material/templates/footer.html b/prosopopee/themes/material/templates/footer.html index 18245df..73b9cea 100644 --- a/prosopopee/themes/material/templates/footer.html +++ b/prosopopee/themes/material/templates/footer.html @@ -1,7 +1,7 @@ From 1883eeffe2eea051e02036f2358a9dabb3462f9c Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Mon, 4 Apr 2016 14:22:01 +0200 Subject: [PATCH 8/9] update Changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea06bce..e6b37a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ CHANGELOG ========= +0.3 (unreleased) +---------------- + +* caption support on bordered picture and pictures group https://github.com/Psycojoker/prosopopee#images-caption by beudbeud +* 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 + 0.2 (2016-02-23) ---------------- From aba2e4fc59cbe13cf3abbb30e3ffb545a01dc71f Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Tue, 5 Apr 2016 16:48:53 +0200 Subject: [PATCH 9/9] fix licence integration --- README.md | 2 +- .../themes/exposure/templates/base.html | 49 +++++++++---------- .../themes/exposure/templates/footer.html | 11 +++++ .../themes/material/templates/footer.html | 10 +++- 4 files changed, 45 insertions(+), 27 deletions(-) create mode 100644 prosopopee/themes/exposure/templates/footer.html diff --git a/README.md b/README.md index 7be1bc5..87fd310 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ By default Prosopopée use CC-BY-SA for all the content, if you want use a anoth you need add key in **root** settings.yaml. For example: ```yaml -licences: +licence: name: WTFPL url: "http://www.wtfpl.net/txt/copying/" ``` diff --git a/prosopopee/themes/exposure/templates/base.html b/prosopopee/themes/exposure/templates/base.html index ef4dffe..d98e3d4 100644 --- a/prosopopee/themes/exposure/templates/base.html +++ b/prosopopee/themes/exposure/templates/base.html @@ -1,34 +1,33 @@ - - - {% block css %} - {% endblock %} + + + {% block css %} + {% endblock %} - - - {{ settings.title }} - + + + {{ settings.title }} + - + - + - {% block content %} - {% endblock %} + {% block content %} + {% endblock %} - - + {% include 'footer.html' %} + + diff --git a/prosopopee/themes/exposure/templates/footer.html b/prosopopee/themes/exposure/templates/footer.html new file mode 100644 index 0000000..96451fe --- /dev/null +++ b/prosopopee/themes/exposure/templates/footer.html @@ -0,0 +1,11 @@ +{% if settings.licence is not defined %} +{% set licence_url = 'https://creativecommons.org/licenses/by-sa/3.0/' -%} +{% set licence_name = 'CC-BY-SA' -%} +{% else %} +{% set licence_url = settings.licence.url -%} +{% set licence_name = settings.licence.name -%} +{% endif %} + + diff --git a/prosopopee/themes/material/templates/footer.html b/prosopopee/themes/material/templates/footer.html index 73b9cea..b39989a 100644 --- a/prosopopee/themes/material/templates/footer.html +++ b/prosopopee/themes/material/templates/footer.html @@ -1,7 +1,15 @@ +{% if settings.licence is not defined %} +{% set licence_url = 'https://creativecommons.org/licenses/by-sa/3.0/' -%} +{% set licence_name = 'CC-BY-SA' -%} +{% else %} +{% set licence_url = settings.licence.url -%} +{% set licence_name = settings.licence.name -%} +{% endif %} +