-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.twig
More file actions
executable file
·41 lines (34 loc) · 1.21 KB
/
default.twig
File metadata and controls
executable file
·41 lines (34 loc) · 1.21 KB
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
{% extends "layout.twig" %}
{% block class %}template-default{% endblock %}
{% block content %}
<!-- Header -->
<div class="template-header">
<div class="template-header-container">
<div class="brand">
{{widget('logo', 'logo', {"defaultlogo": asset('images/logo.png')})|raw}}
{{widget('companyname', 'companyname', {
"business": "profile",
"showTplWidget":"0"
})|raw}}
</div>
{{widget('extendednavigation', 'navigation', {"align":"center"})|raw}}
</div>
</div>
<!-- Main Widet Zone -->
<section class="container">
{{zone('main')|raw}}
</section>
{% endblock %}
{% block scripts %}
<script nonce="{{ numberUsedOnce }}">
var stickyElem = document.querySelector(".template-header");
var currentStickyPos = stickyElem.getBoundingClientRect().top + window.pageYOffset;
window.onscroll = function() {
if(window.pageYOffset > currentStickyPos) {
stickyElem.classList.add('sticky');
} else {
stickyElem.classList.remove('sticky');
}
}
</script>
{% endblock %}