forked from NixOS/nixos-homepage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.tt
174 lines (150 loc) · 5.62 KB
/
layout.tt
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
[%-
USE HTML;
USE date;
# Automatically marks the link with the class "active" if it is the current page.
# title: Link label
# content: use custom content instead of title in link.
# href: Page output filename without leading slash
# class: Additional classes
BLOCK navigationLink %]
[% SET outputPrefix = outputName.split('/').first %]
<li class="[% outputPrefix == href ? " active" : "" %] [% class %]">
[%- IF href -%]
<a href="[% root %][% href %]">[% title %]</a>
[%- ELSE -%]
[%- content -%]
[%- END -%]
</li>
[% END;
-%]
[% DEFAULT
title = ''
description = 'Nix is a tool that takes a unique approach to package management and system configuration. Learn how to make reproducible, declarative and reliable systems. '
%]
<html lang="en" class="without-js">
<head>
[% IF title != "" %]
<title>[% title %] | Nix & NixOS </title>
[% ELSE %]
<title>Nix & NixOS | Reproducible builds and deployments</title>
[% END %]
<meta name="description" content="[% description %]" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0" />
<link rel="stylesheet" href="[% root %]styles/index.css" type="text/css" />
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
<meta property="og:image" content="/logo/nixos-lores.png" />
<meta name="google-site-verification" content="ir-07nYvo3u3x_VmkTO1wCfYJ8uC-SrVBGR7hZgqPSE" />
[%# This has to happen ASAP, even before jQuery is initialized. %]
<script>
var html = document.documentElement;
html.className = html.className.replace("without-js", "with-js");
</script>
<script type="text/javascript" src="[% root %]js/jquery.min.js"></script>
[% documentHeadTags.join("\n") %]
</head>
<body>
<header>
<div>
<h1><a href="[% root %]">NixOS</a></h1>
[%# ???! go read `navbar.less` and `nixos-site.js`, it's all fine I swear. %]
<nav style="display: none;">
<ul>
[% INCLUDE navigationLink href="explore.html" title="Explore" %]
[% INCLUDE navigationLink href="download.html" title="Download" %]
[% INCLUDE navigationLink href="learn.html" title="Learn" %]
[% INCLUDE navigationLink href="community" title="Community" %]
[% INCLUDE navigationLink href="blog" title="Blog" %]
[% INCLUDE navigationLink href="donate.html" title="Donate" %]
[% WRAPPER navigationLink class="search" title="Search" %]
<a href="https://search.nixos.org/packages">Search</a>
[% END %]
</ul>
</nav>
</div>
</header>
<main>
[% IF !handlesLayout %]
<div class="generic-layout">
[% END %]
[% content %]
[% IF !handlesLayout %]
</div>
[% END %]
</main>
<footer>
<div>
<div class="upper">
<section>
<h4>The project</h4>
<ul>
<li><a href="https://status.nixos.org/">Channel Status</a></li>
<li><a href="https://search.nixos.org/packages">Packages search</a></li>
<li><a href="https://search.nixos.org/options">Options search</a></li>
<li><a href="https://reproducible.nixos.org/">Reproducible Builds Status</a></li>
<li><a href="[% root %]community/teams/security.html">Security</a></li>
</ul>
</section>
<section>
<h4>Get in Touch</h4>
<ul>
<li><a href="https://discourse.nixos.org/">Forum</a></li>
<li><a href="https://matrix.to/#/#community:nixos.org">Matrix Chat</a></li>
<li><a href="[% root %]community/commercial-support.html">Commercial support</a></li>
</ul>
</section>
<section>
<h4>Contribute</h4>
<ul>
<li><a href="https://nix.dev/contributing/how-to-contribute">Contributing Guide</a></li>
<li><a href="[% root %]donate.html">Donate</a></li>
</ul>
</section>
<section>
<h4>Stay up to date</h4>
<ul>
<li><a href="[% root %]blog/index.html">Blog</a></li>
<li><a href="https://weekly.nixos.org/">Newsletter</a></li>
</ul>
</section>
</div>
<hr />
<div class="lower">
<section class="footer-copyright">
<h4>NixOS</h4>
<div>
<span>
Copyright © [% date.format(date.now, '%Y') %] NixOS contributors
</span>
<a href="https://github.com/NixOS/nixos-homepage/blob/master/LICENSES/CC-BY-SA-4.0.txt">
<abbr title="Creative Commons Attribution Share Alike 4.0 International">
CC-BY-SA-4.0
</abbr>
</a>
</div>
</section>
<section class="footer-social">
<h4>Connect with us</h4>
<ul>
<li class="social-icon -twitter"><a href="https://twitter.com/nixos_org">Twitter</a></li>
<li class="social-icon -youtube"><a
href="https://www.youtube.com/channel/UC3vIimi9q4AT8EgxYp_dWIw">Youtube</a></li>
<li class="social-icon -github"><a href="https://github.com/NixOS">GitHub</a></li>
</ul>
<a style="display: none" rel="me" href="https://chaos.social/@nixos_org">Mastodon</a>
</section>
</div>
</div>
</footer>
<script src="[% root %]js/nixos-site.js"></script>
[% IF anchors %]
<script src="[% root %]js/anchor.min.js"></script>
<script>
anchors.add('main h1, main h2, main h3');
</script>
[% END %]
[% documentEndTags.join("\n") %]
</body>
</html>