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) ---------------- diff --git a/README.md b/README.md index 4f40c00..87fd310 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 +licence: + name: WTFPL + url: "http://www.wtfpl.net/txt/copying/" +``` + ### Gallery settings.yaml This settings.yaml will describe: @@ -211,7 +222,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 +260,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 +355,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/base.html b/prosopopee/themes/exposure/templates/base.html index a62bd68..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/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/exposure/templates/sections/full-picture.html b/prosopopee/themes/exposure/templates/sections/full-picture.html index 48eb774..4bfbf54 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") }}
+ {% else %} + {% if section.text.date %} +
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} + {% endif %}
+
{% endif %}
diff --git a/prosopopee/themes/material/static/css/styles.css b/prosopopee/themes/material/static/css/styles.css index 0baaed5..4cec8a8 100644 --- a/prosopopee/themes/material/static/css/styles.css +++ b/prosopopee/themes/material/static/css/styles.css @@ -61,14 +61,54 @@ main { transform: translateY(0); } -.bordered-picture .caption__overlay { - margin-left: 11.5%; - margin-right: 11.5%; -} .caption .card-panel { margin: 0; padding: 1px; text-align: center; } - + +.bordered-picture img { + height: 77%; + width: 77%; + margin-left: 11.5%; + 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/footer.html b/prosopopee/themes/material/templates/footer.html index 5c4f98f..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 %} + 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/bordered-picture.html b/prosopopee/themes/material/templates/sections/bordered-picture.html index 7971de1..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 %}
diff --git a/prosopopee/themes/material/templates/sections/full-picture.html b/prosopopee/themes/material/templates/sections/full-picture.html index f20537b..65a7afd 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") }}
+ {% else %} + {% if section.text.date %} +
{{ section.text.date.strftime("%d %B %Y") }}
{% endif %} + {% endif %}
{% endif %}
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 @@ -