fix licence integration

This commit is contained in:
Adrien Beudin 2016-04-05 16:48:53 +02:00
parent 1883eeffe2
commit aba2e4fc59
4 changed files with 45 additions and 27 deletions

View File

@ -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/"
```

View File

@ -1,34 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
{% block css %}
{% endblock %}
<head>
<meta charset="UTF-8">
{% block css %}
{% endblock %}
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>{{ settings.title }}</title>
</head>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>{{ settings.title }}</title>
</head>
<body>
<body>
<div class="gallery-header">
{% block logo %}
{% endblock %}
<h1>{{ settings.title }}</h1>
{% if settings.sub_title -%}<h4>{{ settings.sub_title }}</h4>{% endif -%}
<hr>
{% if settings.menu -%}
{% include 'menu.html' %}
{% endif -%}
</div>
<div class="gallery-header">
{% block logo %}
{% endblock %}
<h1>{{ settings.title }}</h1>
{% if settings.sub_title -%}<h4>{{ settings.sub_title }}</h4>{% endif -%}
<hr>
{% if settings.menu -%}
{% include 'menu.html' %}
{% endif -%}
</div>
{% block content %}
{% endblock %}
{% block content %}
{% endblock %}
<footer>
<p>Generated using <a href="https://github.com/psycojoker/prosopopee">Prosopopée</a> · content under <a href={% if settings.licence.url %}"{{ settings.licence.url }}"{% else %}"https://creativecommons.org/licenses/by-sa/3.0/"{% endif %}>{% if settings.licence.name %}{{ settings.licence.name }}{% else %}CC-BY-SA{% endif %}</a> · atom logo by <a href="https://thenounproject.com/jjjon/">Jonathan Li</a> under <a href="https://creativecommons.org/licenses/by/3.0/">CC-BY</a></p>
</footer>
</body>
{% include 'footer.html' %}
</body>
</html>

View File

@ -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 %}
<footer>
<p>Generated using <a href="https://github.com/psycojoker/prosopopee">Prosopopée</a> · content under <a href="{{ licence_url }}">{{ licence_name }}</a> · atom logo by <a href="https://thenounproject.com/jjjon/">Jonathan Li</a> under <a href="https://creativecommons.org/licenses/by/3.0/">CC-BY</a></p>
</footer>

View File

@ -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 %}
<footer class="page-footer blue-grey darken-1">
<div class="footer-copyright blue-grey darken-2">
<div class="container center">
Generated using <a href="https://github.com/psycojoker/prosopopee">Prosopopée</a> · content under <a href={% if settings.licence.url %}"{{ settings.licence.url }}"{% else %}"https://creativecommons.org/licenses/by-sa/3.0/"{% endif %}>{% if settings.licence.name %}{{ settings.licence.name }}{% else %}CC-BY-SA{% endif %}</a>
Generated using <a href="https://github.com/psycojoker/prosopopee">Prosopopée</a> · content under <a href="{{ licence_url }}">{{ licence_name }}</a>
</div>
</div>
</footer>