File tree Expand file tree Collapse file tree 5 files changed +63
-12
lines changed Expand file tree Collapse file tree 5 files changed +63
-12
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ baseURL = 'https://randy.gg'
3
3
languageCode = ' en-us'
4
4
theme = ' lugo'
5
5
6
+
7
+
6
8
# Feel free to adjust these Parameters as you need :D
7
9
[params ]
8
10
# favicon = "/favicon.ico"
@@ -30,4 +32,22 @@ noClasses = false
30
32
[params .fonts ]
31
33
google_fonts = false
32
34
33
-
35
+
36
+ [menu ]
37
+ [[menu .nav ]]
38
+ identifier = " home"
39
+ name = " home"
40
+ url = " /"
41
+ weight = 1
42
+
43
+ [[menu .nav ]]
44
+ identifier = " work"
45
+ name = " work"
46
+ url = " /work/"
47
+ weight = 2
48
+
49
+ [[menu .nav ]]
50
+ identifier = " team"
51
+ name = " Team"
52
+ url = " /team/"
53
+ weight = 3
Original file line number Diff line number Diff line change 1
-
2
1
{{ define "title" -}}
3
2
{{ .Title }}
4
3
{{- end }}
5
4
5
+ {{ define "nav" }}
6
+ {{ partial "nav.html" . }}
7
+ {{ end }}
8
+
9
+
6
10
{{ define "main" }}
7
11
8
12
Original file line number Diff line number Diff line change @@ -16,6 +16,31 @@ body {
16
16
line-height : 1.4 ;
17
17
}
18
18
19
+ div # nav {
20
+ display : flex;
21
+ width : 100% ;
22
+ align-items : center;
23
+ justify-content : center;
24
+ gap : 5px ;
25
+ text-transform : uppercase;
26
+ }
27
+
28
+ div # nav a {
29
+ color : black;
30
+ text-decoration-line : none;
31
+ text-decoration : none;
32
+ font-size : 1.2em ;
33
+ }
34
+
35
+ div # nav a .is-active {
36
+ font-weight : bold;
37
+ text-decoration : underline;
38
+ }
39
+
40
+ div # nav : last-child () {
41
+ display : none;
42
+ }
43
+
19
44
h1 ,
20
45
h2 ,
21
46
h3 ,
@@ -34,7 +59,7 @@ h1#title {
34
59
main {
35
60
max-width : 650px ;
36
61
margin : auto;
37
- margin-top : 50 px ;
62
+ margin-top : 30 px ;
38
63
}
39
64
40
65
p .centered {
Original file line number Diff line number Diff line change 17
17
< meta charset ="utf-8 ">
18
18
</ head >
19
19
< body >
20
- {{ if .Site.Menus.main }}{{ partial "nav.html" . }}{{ end -}}
21
20
< main >
21
+
22
+ {{ block "nav" . }}
23
+
24
+ {{ end }}
25
+
22
26
< header > < h1 id ="tag_{{ .Title }} "> {{ block "title" . }}{{ end }}</ h1 > </ header >
23
27
24
28
< article >
Original file line number Diff line number Diff line change 1
- < nav >
2
- < ul >
3
- {{- $sec := .Page.Section }}{{ $file := .File.TranslationBaseName -}}
4
- {{ range.Site.Menus.main.ByWeight }}{{ $base := path.Base .URL }}
5
- < li > < a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive " {{ end }}href ="{{ .URL }} "> < span class =pre > {{ .Pre }}</ span > < span class =menuname > {{ .Name }}</ span > </ a > </ li >
6
- {{- end }}
7
- </ ul >
8
- </ nav >
1
+ < div id ="nav ">
2
+ {{ $currentPage := . }}
3
+ {{ range .Site.Menus.nav }}
4
+ < a class ="navbar-item {{ if eq .URL $currentPage.RelPermalink }} is-active {{ end }} " href ="{{ .URL }} "> {{ .Name }}</ a > |
5
+ {{ end }}
6
+ </ div >
You can’t perform that action at this time.
0 commit comments