Skip to content

Commit 85fb5b7

Browse files
committed
Update theme style and add params to confing.toml
1 parent 8d52eb0 commit 85fb5b7

File tree

8 files changed

+87
-40
lines changed

8 files changed

+87
-40
lines changed

config.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
baseURL = 'https://github.com/frankheat/offsecnotes/'
22
languageCode = 'en-us'
33
title = 'offsecnotes'
4-
theme = "mytheme"
4+
theme = "mytheme"
5+
enableGitInfo = true
6+
7+
[params]
8+
GITHUB_PROJECT = "https://github.com/frankheat/offsecnotes"
9+
NICKNAME = "frankheat"
10+
GITHUB_PROFILE = "https://github.com/frankheat"
11+
LINKEDIN_PROFILE = "https://www.linkedin.com/in/francesco-volpe98/"

themes/mytheme/layouts/_default/single.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<body>
99
<div class="top-bar row">
10-
{{ partial "top-bar.html" }}
10+
{{ partial "top-bar.html" . }}
1111
</div>
1212

1313
<div class="main-container container-fluid">
@@ -21,16 +21,15 @@
2121
<div class="main-content">
2222
{{ .Content }}
2323
</div>
24-
24+
{{ partial "footer.html" . }}
2525
</div>
2626

2727
{{ if findRE "<ul>" .TableOfContents }}
28-
<div class="sidebar-right col-xl-3 ps-5 py-4 d-none d-xl-block" id="sidebarRight">
28+
<div class="sidebar-right col-xl-3 ps-5 pe-0 py-4 d-none d-xl-block" id="sidebarRight">
2929
<span>Table of contents</span>
3030
<div class="pt-2">
3131
{{ .TableOfContents }}
3232
</div>
33-
3433
</div>
3534
{{ end }}
3635
</div>

themes/mytheme/layouts/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<style>
88
h1 {
9-
color: rgb(214, 51, 132);
9+
color: #002BFE;
1010
font-size: 60px;
1111
text-align: center;
1212
font-weight: bold;
@@ -21,8 +21,8 @@
2121
}
2222

2323
.title {
24-
border-top: 1px solid rgb(214, 51, 132);
25-
border-bottom: 1px solid rgb(214, 51, 132);
24+
border-top: 1px solid #00CCFF;
25+
border-bottom: 1px solid #00CCFF;
2626
padding-top: 1%;
2727
padding-bottom: 1%;
2828
margin-bottom: 3%;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<footer>
2+
<div class="bottom-of-page container">
3+
<div class="row">
4+
<div class="col">
5+
© 2025, {{ .Site.Params.NICKNAME }}
6+
{{- $lastmod := now.AddDate -100 0 0 -}}
7+
{{- range .Site.RegularPages -}}
8+
{{- if gt .Lastmod $lastmod -}}
9+
{{- $lastmod = .Lastmod -}}
10+
{{- end -}}
11+
{{- end -}}
12+
<br>Last updated on: {{ $lastmod.Format "02 Jan 2006" }}
13+
<br><a href="{{ .Site.Params.GITHUB_PROJECT }}">Source code</a>
14+
</div>
15+
<div class="col text-center">
16+
<p>Powered by <a href="https://gohugo.io/" target="_blank">Hugo</a></p>
17+
</div>
18+
<div class="col text-end">
19+
Find me on:
20+
<br><a href="{{ .Site.Params.GITHUB_PROFILE }}">GitHub</a>
21+
<br><a href="{{ .Site.Params.LINKEDIN_PROFILE }}">LinkedIn</a>
22+
</div>
23+
</div>
24+
</div>
25+
</footer>

themes/mytheme/layouts/partials/head.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@
1717

1818
<!-- stylesheet -->
1919
<link rel="stylesheet" href='{{ absURL "css/style.css" }}'>
20+
21+
<!-- font -->
22+
<link rel="preconnect" href="https://fonts.googleapis.com">
23+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
24+
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet">

themes/mytheme/layouts/partials/site-nav.html

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,41 @@
66
<li>
77
<strong>{{ .Title }}</strong>
88
<ul>
9-
9+
1010
{{ range .Sections.ByWeight }}
1111
<li>
12-
13-
{{ $s := .Path }}
14-
{{ $s := replace $s "/_index.md" ""}}
15-
{{ $s := replace $s "/" "-" }}
16-
{{ $s := replace $s " " "-" }}
12+
13+
{{ $s := "" }}
14+
{{ with .File }}
15+
{{ $s = .Path }}
16+
{{ end }}
17+
{{ $s = replace $s "/_index.md" "" }}
18+
{{ $s = replace $s "/" "-" }}
19+
{{ $s = replace $s " " "-" }}
20+
1721
<a data-bs-toggle="collapse" href="#{{ $s }}" role="button" aria-expanded="false"
1822
aria-controls="{{ $s }}" style="display: flex; justify-content: space-between;"
1923
onclick="toggleRotation(this)">
2024
{{ .Title }}
2125
<span class="icon-expand" id="{{ $s }}-icon">
2226
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13"
23-
viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
27+
viewBox="0 0 512 512">
2428
<path fill="#cfcfcf"
2529
d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" />
2630
</svg>
2731
</span>
2832
</a>
29-
33+
3034
{{ if .Pages }}
31-
32-
{{ $s := .Path }}
33-
{{ $s := replace $s "/_index.md" ""}}
34-
{{ $s := replace $s "/" "-" }}
35-
{{ $s := replace $s " " "-" }}
35+
36+
{{ $s := "" }}
37+
{{ with .File }}
38+
{{ $s = .Path }}
39+
{{ end }}
40+
{{ $s = replace $s "/_index.md" "" }}
41+
{{ $s = replace $s "/" "-" }}
42+
{{ $s = replace $s " " "-" }}
43+
3644
<div class="collapse" id="{{ $s }}">
3745
<ul>
3846
{{ range .Pages.ByWeight }}
@@ -41,10 +49,10 @@
4149
</ul>
4250
</div>
4351
{{ end }}
44-
52+
4553
</li>
4654
{{ end }}
47-
55+
4856
{{ range .Pages.ByWeight }}
4957
{{ if not .IsSection }}
5058
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
@@ -54,5 +62,6 @@
5462
</li>
5563
{{ end }}
5664
</ul>
65+
5766
</nav>
5867
</div>

themes/mytheme/layouts/partials/top-bar.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@
1212
</div>
1313
</div>
1414
<div class="col-4 text-end">
15-
<a href="https://github.com/frankheat/offsecnotes" target="_blank"
15+
<a href="{{ .Site.Params.GITHUB_PROJECT }}" target="_blank"
1616
class="d-inline-flex align-items-center text-decoration-none text-white rounded-pill px-3 py-1"
17-
style="background-color: rgb(214, 51, 132);">
18-
<svg height="18" width="18" viewBox="0 0 16 16" fill="currentColor" class="me-2">
17+
style="background-color: #00CCFF;">
18+
<svg height="18" width="18" viewBox="0 0 16 16" fill="black" class="me-2">
1919
<path
2020
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.2 1.87.86 2.33.66.07-.52.28-.86.51-1.06-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.03 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.28.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.19 0 .21.15.46.55.38A8.012 8.012 0 0016 8c0-4.42-3.58-8-8-8z" />
2121
</svg>
22-
<span style="font-size: 18px;">Star</span>
23-
<span id="star-count" class="ms-1" style="font-size: 18px;"></span>
22+
<span style="font-size: 18px; color: black">Star</span>
23+
<span id="star-count" class="ms-1" style="font-size: 18px; color: black"></span>
2424
</a>
25-
26-
2725
</div>

themes/mytheme/static/css/style.css

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
h1 {
77
color: white;
88
font-size: 50px;
9-
text-align: center;
109
font-weight: bold;
11-
border-top: 1px solid white;
12-
border-bottom: 1px solid white;
1310
padding-top: 1%;
1411
padding-bottom: 1%;
1512
margin-bottom: 3%;
@@ -119,7 +116,7 @@
119116
left: -50%;
120117
width: 230%;
121118
height: 140%;
122-
background-color: rgb(214, 51, 132);
119+
background-color: #002BFE;
123120
background-size: cover;
124121
background-position: center;
125122
filter: blur(80px);
@@ -189,15 +186,14 @@
189186

190187
#TableOfContents li a.active,
191188
#index li a.active {
192-
color: white;
193-
background-color: #43454a;
189+
color: #00CCFF;
190+
font-weight: 550;
194191
}
195192

196193
#TableOfContents li a:hover,
197194
#index li a:hover {
198195
color: white;
199-
background-color: rgb(170, 40, 105);
200-
196+
background-color: rgb(67, 69, 74);
201197
}
202198

203199
#TableOfContents ul ul,
@@ -225,15 +221,15 @@
225221

226222
::-webkit-scrollbar-thumb {
227223
border-radius: 8px;
228-
background-color: rgb(214, 51, 132);
224+
background-color: rgb(0, 204, 255);
229225
}
230226

231227

232228
/* Section settings */
233229
body {
234230
align-items: center;
235231
font-family: 'Inter', sans-serif;
236-
font-size: 18px;
232+
font-size: 17.5px;
237233
background-color: rgb(19, 20, 22);
238234
color: rgb(207, 208, 208);
239235
}
@@ -284,6 +280,14 @@
284280
scrollbar-gutter: stable;
285281
}
286282

283+
.bottom-of-page {
284+
margin-top: 80px;
285+
padding-top: 30px;
286+
border-top: 1px solid rgb(82, 82, 82);
287+
padding-bottom: 30px;
288+
font-size: 15px;;
289+
}
290+
287291
@media (max-width: 992px) {
288292
.site-nav {
289293
position: static;

0 commit comments

Comments
 (0)