forked from 00dani/lemoncurry
Add footer with handy info
This commit is contained in:
parent
c74eb40d76
commit
afcf101d09
2 changed files with 16 additions and 1 deletions
|
@ -30,7 +30,11 @@
|
|||
{% block main %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer></footer>
|
||||
<footer>
|
||||
<p>all content licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">cc by-sa 4.0</a></p>
|
||||
{% get_package_json as package %}
|
||||
<p>powered by <a rel="code-repository" href="{{ package.repository }}/tree/v{{ package.version }}">{{ package.name }} {{ package.version }}</a></p>
|
||||
</footer>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" crossorigin="anonymous"
|
||||
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"></script>
|
||||
|
|
|
@ -1,8 +1,19 @@
|
|||
import json
|
||||
from os.path import join
|
||||
|
||||
from django import template
|
||||
from django.conf import settings
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def get_package_json():
|
||||
with open(join(settings.BASE_DIR, 'package.json')) as f:
|
||||
package = json.load(f)
|
||||
return package
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def site_name():
|
||||
return settings.LEMONCURRY_SITE_NAME
|
||||
|
|
Loading…
Reference in a new issue