merge home?
This commit is contained in:
parent
90e98199fd
commit
ac450938b3
|
@ -31,13 +31,36 @@
|
|||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ if .IsHome }}
|
||||
<body>
|
||||
{{ if .IsHome }}
|
||||
{{- partial "home.html" . -}}
|
||||
{{ else }}
|
||||
{{ if eq .Page.Path "blog" }}
|
||||
<header>
|
||||
<a href='{{ "" | relURL }}' class="title">
|
||||
<h2>{{ .Site.Title }}</h2>
|
||||
</a>
|
||||
</header>
|
||||
{{ else if not .Page.IsPage }}
|
||||
<header class="subhead">
|
||||
{{ $path := .Page.File.Dir }}
|
||||
{{ $segments := split $path "/" }}
|
||||
|
||||
{{ $currentPath := "" }}
|
||||
{{ range $index, $element := $segments }}
|
||||
{{ if ne $element "" }}
|
||||
{{ if $index }}
|
||||
/
|
||||
{{ end }}
|
||||
{{ $currentPath = printf "%s/%s" $currentPath $element }}
|
||||
<a href='{{ relURL (print $currentPath "/") }}'>
|
||||
{{ $element }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
/
|
||||
|
||||
</header>
|
||||
{{ end }}
|
||||
<main>
|
||||
{{- block "main" . }}{{- end }}
|
||||
|
@ -46,5 +69,6 @@
|
|||
console.log("Sending statistics to server. Personal info is redacted afterwards.");
|
||||
console.log(fetch(`https://log.blog.morgan.kr/?url=${encodeURIComponent(document.location)}&referer=${encodeURIComponent(document.referrer)}`));
|
||||
</script>
|
||||
</body>
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
{{ define "main" }}
|
||||
<content>
|
||||
<content>
|
||||
{{- $pages := union .RegularPages .Sections }}
|
||||
|
||||
{{- if .IsHome }}
|
||||
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
||||
{{- end }}
|
||||
|
||||
<ul class="blog-posts">
|
||||
{{ range $pages }}
|
||||
|
@ -17,11 +14,7 @@
|
|||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</content>
|
||||
{{- if .IsHome }}
|
||||
<a href="/blogs" style="font-size:10px; color: #AAA; bottom: 12px; position: fixed;">-</a>
|
||||
{{- end }}
|
||||
|
||||
</content>
|
||||
<div class="utils">
|
||||
<div id="copy">©morgan.kr</div>
|
||||
<div id="toggleColor">Toggle Darkmode</div>
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<style type="text/css">
|
||||
.btnc a {
|
||||
padding: 2px 8px;
|
||||
background: white;
|
||||
border: 0.5px solid black;
|
||||
border-radius: 6px;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<div style="height: 100vh; display: flex; align-items: center; justify-content: center;">
|
||||
<div style="text-align: center;">
|
||||
<h1 style="font-size: 42px; font-weight: bold; margin-bottom: 24px;">Morgan J.</h1>
|
||||
<p style="font-size: 20px; margin-bottom: 56px;">Average Linux user</p>
|
||||
|
||||
<div style="font-size: 16px;display: flex; justify-content: center; gap: 16px; margin-bottom: 24px;" class="btnc">
|
||||
<a href="https://github.com/morgan9e">GitHub</a>
|
||||
<a href="https://twitter.com/mgsql">Twitter</a>
|
||||
<a href="https://t.me/morgan9e">Telegram</a>
|
||||
<a href="mailto:">Mail</a>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 16px;display: flex; justify-content: center; gap: 16px;" class="btnc">
|
||||
<a href="pub.asc">PGP</a>
|
||||
<a href="https://git.morgan.kr">Git</a>
|
||||
<a href="/blog">Blog</a>
|
||||
<a href="https://AS214578.net">Net</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -76,6 +76,21 @@
|
|||
font-size: 14px;
|
||||
}
|
||||
|
||||
.subhead {
|
||||
margin: 10px 0;
|
||||
padding-bottom: 12px;
|
||||
padding-top: 18px;
|
||||
color: var(--title-color);
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.subhead a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: var(--title-color);
|
||||
text-decoration: none;
|
||||
|
|
Loading…
Reference in New Issue