Skip to content

Commit 64a75df

Browse files
committedJan 20, 2017
Use html/base.m.jnj, not home-grown code
1 parent 56cade5 commit 64a75df

File tree

2 files changed

+14
-50
lines changed

2 files changed

+14
-50
lines changed
 

‎_CNDB/_JNJ/html/base.jnj

+2-30
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{%- extends "STD::html/base.jnj" %}
22
{#- jinja template: base.jnj -#}
33
{#
4-
## Copyright (C) 2012-2014 Mag. Christian Tanzer All rights reserved
4+
## Copyright (C) 2012-2017 Mag. Christian Tanzer All rights reserved
55
## Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
66
## #*** <License> ************************************************************#
77
## This template is licensed under the terms of the BSD 3-Clause License
@@ -18,6 +18,7 @@
1818
## Revision Dates
1919
## 27-Mar-2012 (CT) Creation
2020
## 9-Jul-2014 (CT) Factor out Funkfeuer specific stuff
21+
## 20-Jan-2017 (CT) Remove redundant `body_footer` block
2122
## ««revision-date»»···
2223
##--
2324
#}
@@ -28,33 +29,4 @@
2829
</span>
2930
{%- endblock body_header -%}
3031

31-
{%- block body_footer -%}
32-
<div class="copyright">
33-
{%- block body_footer_copyright %}
34-
{%- if page.copyright %}
35-
Copyright &copy;
36-
{{ page.copyright.year if page.copyright.year else GTW.now ("%Y") }}
37-
<a href="{{ page.copyright.url }}">
38-
{{- page.copyright.holder -}}
39-
</a>
40-
{% endif -%}
41-
{% endblock body_footer_copyright -%}
42-
</div>
43-
<div class="top-link">
44-
{%- block body_footer_top_link %}
45-
<a id="Bottom" href="#ffm-top">{{ GTW._T ("Top of page") }}</a>
46-
{% endblock body_footer_top_link -%}
47-
</div>
48-
<div class="last-change">
49-
{%- block body_footer_last_change %}
50-
{{- GTW._T ("Last change") -}}:
51-
{%- if page.last_changed %}
52-
{{ page.last_changed }}
53-
{%- else %}
54-
{{ GTW.now ("%d/%m/%Y %H:%M" if page.DEBUG else "%d/%m/%Y")}}
55-
{% endif -%}
56-
{% endblock body_footer_last_change -%}
57-
</div>
58-
{% endblock body_footer -%}
59-
6032
{#- __END__ jinja template: html/base.jnj -#}

‎_CNDB/_JNJ/html/dashboard/app.jnj

+12-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{#- jinja template: html/dashboard/app.jnj -#}
22
{#
3-
## Copyright (C) 2014-2015 Mag. Christian Tanzer All rights reserved
3+
## Copyright (C) 2014-2017 Mag. Christian Tanzer All rights reserved
44
## Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
55
## #*** <License> ************************************************************
66
## This module is licensed under the terms of the BSD 3-Clause License
@@ -27,49 +27,41 @@
2727
## 14-Jul-2014 (CT) Fix `{{ title }}` access in block `title`
2828
## 3-Dec-2014 (CT) Adapt to changes in grid of pure-0.5.0
2929
## 10-Jun-2015 (CT) Add `page_notifications` to display feedback from `/Auth`
30+
## 4-Jan-2017 (CT) Use `html/base.m.jnj`, not home-grown code
3031
## ««revision-date»»···
3132
##--
3233
#}
3334

3435
{%- import (html_version or "html/5.jnj") as X -%}
3536
{%- import "html/page_notifications.m.jnj" as PN with context %}
3637
{%- import "html/media_fragments.jnj" as MF with context %}
38+
{%- import "html/base.m.jnj" as BM with context %}
39+
3740
{%- import "html/dashboard/app.m.jnj" as DB with context %}
3841
{%- import "html/dashboard/edit.m.jnj" as DB_Edit with context %}
3942
{%- import "html/dashboard/user.m.jnj" as DB_User with context %}
4043
{%- import "html/dashboard/view.m.jnj" as DB_View with context %}
4144

4245
{%- call X.html (lang = page.language|default ("en")) -%}
46+
{%- set title = page.h_title or
47+
("%s dashboard" % (page.owner or "<Owner is missing>", ))
48+
-%}
4349
{%- call X.head () -%}
4450
{%- block head_elements -%}
45-
{%- set title = page.h_title or
46-
("%s dashboard" % (page.owner or "<Owner is missing>", ))
47-
-%}
48-
<meta charset="{{ page.encoding|default ("utf-8") }}" />
49-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
50-
<meta name="description" content="{{ title }}">
51-
{%- if page.exclude_robots %}
52-
<meta name="robots" content="NOINDEX, NOFOLLOW">
53-
{% endif -%}
51+
{%- block meta_elements -%}
52+
{{ BM.meta_headers (page, description = title) }}
53+
{%- endblock meta_elements -%}
54+
{{ BM.link_rel_headers (page, template) }}
5455
{% block head_base_element %}{% endblock head_base_element %}
5556
{% block title scoped %}
5657
<title>{{ title }}</title>
5758
{% endblock title -%}
5859
{%- block styles %}
59-
{%- if template.css_href %}
60-
{{ X.link_stylesheet (template.css_href) }}
61-
{%- else %}
62-
{{ MF.inline_CSS (template.CSS) }}
63-
{% endif -%}
64-
{{ MF.link_css (template) }}
60+
{{ BM.style_headers (page, template) }}
6561
{%- endblock styles %}
6662
{%- block scripts %}
6763
{{ MF.scripts (template) }}
6864
{%- endblock scripts -%}
69-
{%- block meta_elements -%}
70-
<!-- copyright "{{ page.copyright.year }} {{ page.copyright.holder }}"-->
71-
<meta name="generator" content="GTW, JNJ, Jinja2" />
72-
{%- endblock meta_elements -%}
7365
{{ page.add_headers|safe }}
7466
{%- endblock head_elements %}
7567
{%- endcall %} {# X.head #}

0 commit comments

Comments
 (0)
Please sign in to comment.