-
-
Notifications
You must be signed in to change notification settings - Fork 467
Expand file tree
/
Copy pathtop.hbs
More file actions
executable file
·65 lines (65 loc) · 3.63 KB
/
Copy pathtop.hbs
File metadata and controls
executable file
·65 lines (65 loc) · 3.63 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<div class="site-container">
<header class="top" id="js-header">
<a class="logo" href="{{@website.url}}">
{{#if @website.logo}}
<img src="{{@website.logo}}" alt="{{@website.name}}">
{{else}}
{{@website.name}}
{{/if}}
</a>
{{#if menus.mainMenu}}
{{> menu menus.mainMenu}}
{{/if}}
{{#if @config.custom.search}}
<div class="search">
<div class="search__overlay js-search-overlay">
<div class="search__overlay-inner">
{{#checkIf @config.custom.searchMode '===' "external"}}
<form action="{{@config.custom.searchServer}}" class="search__form" method="{{@config.custom.searchMethod}}" {{#if @config.custom.searchTab}}target="_blank"{{/if}} {{#if @config.custom.searchForceWebsiteResults}}onsubmit="configInputSubmit();"{{/if}}>
{{#if @config.custom.searchForceWebsiteResults}}
<input
id="search_input"
class="search__input js-search-input"
type="search"
placeholder="{{ translate 'search.placeholder' }}"
aria-label="{{ translate 'search.placeholder' }}"
autofocus="autofocus"/>
<input
id="search_go"
type="hidden"
name="{{@config.custom.searchParam}}"/>
{{else}}
<input
class="search__input js-search-input"
type="search"
name="{{@config.custom.searchParam}}"
placeholder="{{ translate 'search.placeholder' }}"
aria-label="{{ translate 'search.placeholder' }}"
autofocus="autofocus"/>
{{/if}}
</form>
{{#if @config.custom.searchForceWebsiteResults}}<script>function configInputSubmit(){document.getElementById('search_go').value='site:'+window.location.hostname+' '+document.getElementById('search_input').value;return true;}</script>{{/if}}
{{else}}
<form action="{{@website.searchUrl}}" class="search__form" {{#if @config.custom.searchTab}}target="_blank"{{/if}}>
<input
class="search__input js-search-input"
type="search"
name="{{@config.custom.searchParam}}"
placeholder="{{ translate 'search.placeholder' }}"
aria-label="{{ translate 'search.placeholder' }}"
autofocus="autofocus"/>
</form>
{{/checkIf}}
<button class="search__close js-search-close" aria-label="{{ translate 'search.close' }}">
{{ translate 'search.close' }}
</button>
</div>
</div>
<button class="search__btn js-search-btn" aria-label="{{ translate 'search.search' }}">
<svg role="presentation" focusable="false">
<use xlink:href="{{@website.assetsUrl}}/svg/svg-map.svg#search"/>
</svg>
</button>
</div>
{{/if}}
</header>