-
-
Notifications
You must be signed in to change notification settings - Fork 581
Expand file tree
/
Copy pathdefault.hbs
More file actions
135 lines (115 loc) · 4.56 KB
/
default.hbs
File metadata and controls
135 lines (115 loc) · 4.56 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
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
132
133
134
135
<!DOCTYPE html>
<html lang="{{@site.locale}}">
<head>
{{!-- Document Settings --}}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
{{!-- Base Meta --}}
<title>{{meta_title}}</title>
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{!-- Styles'n'Scripts --}}
<link rel="stylesheet" type="text/css" href="{{asset "css/style.css"}}" />
<script>
var siteUrl = '{{@site.url}}';
</script>
<script>
var localTheme = localStorage.getItem('attila_theme');
switch (localTheme) {
case 'dark':
document.documentElement.classList.add('theme-dark');
break;
case 'light':
document.documentElement.classList.add('theme-light');
break;
default:
document.documentElement.classList.remove('theme-dark', 'theme-light');
break;
}
</script>
{{#match @custom.color_scheme "Dark"}}
<script>localStorage.setItem('attila_theme', 'dark');</script>
<style>.js-theme {display:none!important;}</style>
{{/match}}
{{#match @custom.color_scheme "Light"}}
<script>localStorage.setItem('attila_theme', 'light');</script>
<style>.js-theme {display:none!important;}</style>
{{/match}}
{{#match @custom.color_scheme "!=" "Light"}}
{{#if @custom.darkmode_accent_color}}
<style>
.theme-dark:root {
--ghost-accent-color: {{@custom.darkmode_accent_color}};
}
@media (prefers-color-scheme: dark) {
html:not(.theme-light):root {
--ghost-accent-color: {{@custom.darkmode_accent_color}};
}
}
</style>
{{/if}}
{{/match}}
{{ghost_head}}
</head>
<body class="{{body_class}}">
<div class="viewport">
<div class="nav-header">
<nav class="nav-wrapper" aria-label="{{t "Main"}}">
{{#if @site.logo}}
<span class="logo">
<a href="{{@site.url}}" title="{{t "Home"}}"><img src="{{@site.logo}}" alt="{{t "Logo"}}" /></a>
</span>
{{/if}}
{{navigation}}
<a class="nav-search" title="{{t "Search"}}" aria-label="{{t "Search"}}" data-ghost-search><i class="icon icon-search" aria-hidden="true">{{> "icons/icon-search"}}</i></a>
{{#if @site.members_enabled}}
<span class="nav-members">
{{#unless @member}}
{{#unless @site.members_invite_only}}
<a class="nav-button-secondary" href="#/portal/signin" data-portal="signin">{{t "Sign in"}}</a>
{{#unless hideSubscribeButton}}
<a class="nav-button-primary" href="#/portal/signup" data-portal="signup">{{t "Subscribe"}}</a>
{{/unless}}
{{else}}
<a class="nav-button-primary" href="#/portal/signin" data-portal="signin">{{t "Sign in"}}</a>
{{/unless}}
{{else}}
<a class="nav-button-secondary" href="#/portal/account" data-portal="account">{{t "Account"}}</a>
{{/unless}}
</span>
{{/if}}
</nav>
<div class="nav-wrapper-control">
<div class="inner">
<a class="nav-menu" role="button"><i class="icon icon-menu" aria-hidden="true">{{> "icons/icon-menu"}}</i> {{t "Menu"}}</a>
<a class="nav-search" title="{{t "Search"}}" aria-label="{{t "Search"}}" role="button" data-ghost-search><i class="icon icon-search" aria-hidden="true">{{> "icons/icon-search"}}</i></a>
</div>
</div>
</div>
<div class="nav-close" role="button" aria-label="{{t "Close"}}"></div>
<section class="page-wrapper">
{{{body}}}
<div class="nav-footer">
<nav class="nav-wrapper" aria-label="{{t "Footer"}}">
<span class="nav-copy">{{@site.title}} © {{date format='YYYY'}}</span>
<span class="nav-center">
<span class="nav-mode">
<a class="js-theme" href="#" data-system="System" data-dark="Dark" data-light="Light"><span class="theme-icon"></span><span class="theme-text">System</span> </a>
</span>
{{#if @site.secondary_navigation}}
{{navigation type="secondary"}}
{{/if}}
</span>
<span class="nav-publish">{{t "Published with"}} <a href="https://ghost.org">Ghost</a> {{t "and" }} <a href="https://github.com/zutrinken/attila">Attila</a></span>
</nav>
</div>
</section>
</div>
{{!-- Load basic scripts --}}
<script type="text/javascript" src="{{asset "js/script.js"}}"></script>
{{!-- The #block helper will pull in data from the #contentFor other template files. In this case, there's some JavaScript which we only want to use in post.hbs, but it needs to be included down here, after jQuery has already loaded. --}}
{{{block "scripts"}}}
{{!-- Ghost outputs important scripts and data with this tag - it should always be the very last thing before the closing body tag --}}
{{ghost_foot}}
</body>
</html>