forked from praswicaksono/html5up-striped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_header.twig
131 lines (113 loc) · 6.88 KB
/
_header.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE HTML>
<!--
Striped by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>{% if record.title is defined %}{{ record.title|striptags }} | {% endif %}
{{ app.config.get('general/sitename') }}
{% if record.title is not defined and app.config.get('general/payoff') %} | {{ app.config.get('general/payoff') }}{% endif %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="{% if record.teaser is defined %}{{record.teaser|striptags}}{% else %}{{ app.config.get('general/payoff')}} {% endif %}" />
<meta name="keywords" content="{% if record.taxonomy.tags is defined %}
{% for tag in record.taxonomy.tags %}
{{ tag|trim }}{% if not loop.last %}, {% endif %}
{% endfor %}
{% endif %}" />
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="{{ paths.theme }}js/jquery.min.js"></script>
<script src="{{ paths.theme }}js/skel.min.js"></script>
<script src="{{ paths.theme }}js/skel-layers.min.js"></script>
<script>
/*
Striped by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
skel.init({
reset: 'full',
breakpoints: {
global: { range: '*', href: '{{ paths.theme }}css/style.css', containers: '100%', grid: { gutters: 50 }, viewport: { scalable: false } },
desktop: { range: '641-', href: '{{ paths.theme }}css/style-desktop.css' },
wide: { range: '1201-', href: '{{ paths.theme }}css/style-wide.css' },
narrow: { range: '737-1200', href: '{{ paths.theme }}css/style-narrow.css' },
narrower: { range: '737-1000', href: '{{ paths.theme }}css/style-narrower.css' },
mobile: { range: '-736', href: '{{ paths.theme }}css/style-mobile.css', containers: '100%!', grid: { collapse: true } }
},
plugins: {
layers: {
sidePanel: {
animation: 'revealX',
breakpoints: ['narrower', 'mobile'],
clickToHide: true,
height: '100%',
hidden: true,
html: '<div data-action="moveElement" data-args="sidebar"></div>',
orientation: 'vertical',
position: 'top-left',
side: 'left',
width: 275
},
titleBar: {
breakpoints: ['narrower', 'mobile'],
height: 44,
html: '<span class="toggle" data-action="toggleLayer" data-args="sidePanel"></span><span class="title" data-action="copyText" data-args="logo"></span>',
position: 'top-left',
side: 'top',
width: '100%'
}
}
}
});
$(function() {
var $window = $(window),
$body = $('body'),
$document = $(document);
// Disable animations/transitions until the page has loaded.
$body.addClass('is-loading');
$window.on('load', function() {
$body.removeClass('is-loading');
});
// Forms (IE<10).
var $form = $('form');
if ($form.length > 0) {
if (skel.vars.IEVersion < 10) {
$.fn.n33_formerize=function(){var _fakes=new Array(),_form = $(this);_form.find('input[type=text],textarea').each(function() { var e = $(this); if (e.val() == '' || e.val() == e.attr('placeholder')) { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } }).blur(function() { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) return; if (e.val() == '') { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } }).focus(function() { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) return; if (e.val() == e.attr('placeholder')) { e.removeClass('formerize-placeholder'); e.val(''); } }); _form.find('input[type=password]').each(function() { var e = $(this); var x = $($('<div>').append(e.clone()).remove().html().replace(/type="password"/i, 'type="text"').replace(/type=password/i, 'type=text')); if (e.attr('id') != '') x.attr('id', e.attr('id') + '_fakeformerizefield'); if (e.attr('name') != '') x.attr('name', e.attr('name') + '_fakeformerizefield'); x.addClass('formerize-placeholder').val(x.attr('placeholder')).insertAfter(e); if (e.val() == '') e.hide(); else x.hide(); e.blur(function(event) { event.preventDefault(); var e = $(this); var x = e.parent().find('input[name=' + e.attr('name') + '_fakeformerizefield]'); if (e.val() == '') { e.hide(); x.show(); } }); x.focus(function(event) { event.preventDefault(); var x = $(this); var e = x.parent().find('input[name=' + x.attr('name').replace('_fakeformerizefield', '') + ']'); x.hide(); e.show().focus(); }); x.keypress(function(event) { event.preventDefault(); x.val(''); }); }); _form.submit(function() { $(this).find('input[type=text],input[type=password],textarea').each(function(event) { var e = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) e.attr('name', ''); if (e.val() == e.attr('placeholder')) { e.removeClass('formerize-placeholder'); e.val(''); } }); }).bind("reset", function(event) { event.preventDefault(); $(this).find('select').val($('option:first').val()); $(this).find('input,textarea').each(function() { var e = $(this); var x; e.removeClass('formerize-placeholder'); switch (this.type) { case 'submit': case 'reset': break; case 'password': e.val(e.attr('defaultValue')); x = e.parent().find('input[name=' + e.attr('name') + '_fakeformerizefield]'); if (e.val() == '') { e.hide(); x.show(); } else { e.show(); x.hide(); } break; case 'checkbox': case 'radio': e.attr('checked', e.attr('defaultValue')); break; case 'text': case 'textarea': e.val(e.attr('defaultValue')); if (e.val() == '') { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } break; default: e.val(e.attr('defaultValue')); break; } }); window.setTimeout(function() { for (x in _fakes) _fakes[x].trigger('formerize_sync'); }, 10); }); return _form; };
$form.n33_formerize();
}
}
// Sidebar height hack.
var $sc = $('#sidebar'), tid;
$window
.on('resize', function() {
window.clearTimeout(tid);
tid = window.setTimeout(function() {
if (skel.isActive('mobile') || skel.isActive('narrower'))
$sc.css('min-height', '0').css('height', 'auto');
else
$sc.css('min-height', $window.height()).css('height', $document.height());
}, 100);
})
.on('load', function() {
$window.trigger('resize');
})
.trigger('resize')
.on('scroll', function() {
$window.trigger('resize');
});
});
})(jQuery);
</script>
<noscript>
<link rel="stylesheet" href="{{ paths.theme }}css/skel.css" />
<link rel="stylesheet" href="{{ paths.theme }}css/style.css" />
<link rel="stylesheet" href="{{ paths.theme }}css/style-desktop.css" />
<link rel="stylesheet" href="{{ paths.theme }}css/style-wide.css" />
</noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
<script src="{{ paths.theme }}js/prism.js"></script>
<link rel="stylesheet" href="{{ paths.theme }}css/prism.css" />
</head>