Skip to content

Commit 1f70a2a

Browse files
committed
use default baseof layout for year in review page
1 parent 73bddd4 commit 1f70a2a

File tree

2 files changed

+10
-51
lines changed

2 files changed

+10
-51
lines changed

layouts/_default/baseof.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
</head>
66

77
<body>
8-
{{ partial "nav.html" . }}
8+
{{ block "nav" . }}{{ partial "nav.html" . }}{{ end }}
99

10+
{{ block "main" . }}
1011
<!-- Site wrapper -->
1112
<main>
1213
<div class="header">
@@ -23,8 +24,9 @@
2324
{{ block "content" . }}{{ end }}
2425
</div>
2526
</main>
27+
{{ end }}
2628

27-
{{ partial "footer.html" . }}
29+
{{ block "footer" . }}{{ partial "footer.html" . }}{{ end }}
2830
</body>
2931

3032
<script>document.getElementsByTagName("html")[0].classList.remove("no-js")</script>

layouts/_default/year-in-review.html

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,4 @@
1-
<!DOCTYPE html>
2-
<html class="no-js">
3-
<head>
4-
<meta charset="utf-8" />
5-
<meta name="title" content="{{ .Title }}">
6-
<meta name="description" content="{{ .Description }}">
7-
<meta name="keywords" content="{{ .Params.keywords }}">
8-
9-
<meta name="og:title" content="{{ .Title }}">
10-
<meta name="og:url" content="{{ .Permalink }}">
11-
<!-- <meta name="og:image" content="{{ .Params.logo }}"> -->
12-
<meta name="og:description" content="{{ .Description }}">
13-
14-
<meta name="twitter:card" content="summary" />
15-
<meta name="twitter:site" content="{{ .Permalink }}" />
16-
<meta name="twitter:title" content="{{ .Title }}" />
17-
<meta name="twitter:description" content="{{ .Description }}" />
18-
<!-- <meta name="twitter:image" content="{{ .Params.logo }}" /> -->
19-
20-
<meta name="viewport" content="width=device-width, initial-scale=1">
21-
22-
<meta http-equiv='Expires' content='0'>
23-
<meta http-equiv='Pragma' content='no-cache'>
24-
<meta http-equiv='Cache-Control' content='no-cache'>
25-
<meta http-equiv='imagetoolbar' content='no'>
26-
27-
<title>{{ .Title }}</title>
28-
<link rel="shortcut icon" type="image/png" href="{{ "assets/favicon.ico" | relURL }}"/>
29-
30-
<!-- Main CSS -->
31-
{{- $style := resources.Get "css/style.scss" | toCSS | minify | fingerprint }}
32-
<link rel="stylesheet" href="{{ $style.RelPermalink }}"/>
33-
34-
<!-- Custom CSS -->
35-
{{- with .Params.custom_css }}
36-
{{- $style := resources.Get (printf "css/%s" .) | toCSS | minify | fingerprint }}
37-
<link rel="stylesheet" href="{{ $style.RelPermalink }}"/>
38-
{{ end }}
39-
</head>
40-
41-
<body data-spy="scroll" data-target="#YIR-navbar">
1+
{{ define "nav" }}
422
<!-- Navigation Bar -->
433
<nav>
444
<div class="nav-title">
@@ -63,7 +23,9 @@
6323
<li><a href="#follow">@TwitterOSS</a></li>
6424
</ul>
6525
</nav>
26+
{{ end }}
6627

28+
{{ define "main" }}
6729
<!-- Timeline navigation effect from https://codepen.io/nailaahmad/pen/MyZXVE -->
6830
<div class="YIR-wrapper">
6931
<div class="YIR-container">
@@ -323,18 +285,13 @@ <h1>@TwitterOSS</h1>
323285
</section>
324286

325287
</div> <!-- End of YIR-wrapper -->
288+
{{ end }}
326289

327-
</body>
328-
290+
{{ define "footer"}}
329291
<!-- Get all repos and commit counts -->
330292
<script type="text/javascript">
331293
for (element of document.getElementsByClassName("mobile-heading")) {
332294
element.classList.add("hide")
333295
};
334296
</script>
335-
336-
<script>document.getElementsByTagName("html")[0].classList.remove("no-js")</script>
337-
<script src="{{ "js/main.js" | relURL }}"></script>
338-
<script src="{{ printf "js/%s" .Params.custom_js | relURL }}"></script>
339-
{{ partial "ga.html" . }}
340-
</html>
297+
{{ end }}

0 commit comments

Comments
 (0)