merge home?
This commit is contained in:
parent
90e98199fd
commit
ac450938b3
|
@ -31,20 +31,44 @@
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
<header>
|
{{- partial "home.html" . -}}
|
||||||
<a href='{{ "" | relURL }}' class="title">
|
{{ else }}
|
||||||
<h2>{{ .Site.Title }}</h2>
|
{{ if eq .Page.Path "blog" }}
|
||||||
</a>
|
<header>
|
||||||
</header>
|
<a href='{{ "" | relURL }}' class="title">
|
||||||
{{ end }}
|
<h2>{{ .Site.Title }}</h2>
|
||||||
<main>
|
</a>
|
||||||
{{- block "main" . }}{{- end }}
|
</header>
|
||||||
</main>
|
{{ else if not .Page.IsPage }}
|
||||||
<script>
|
<header class="subhead">
|
||||||
console.log("Sending statistics to server. Personal info is redacted afterwards.");
|
{{ $path := .Page.File.Dir }}
|
||||||
console.log(fetch(`https://log.blog.morgan.kr/?url=${encodeURIComponent(document.location)}&referer=${encodeURIComponent(document.referrer)}`));
|
{{ $segments := split $path "/" }}
|
||||||
</script>
|
|
||||||
</body>
|
{{ $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 }}
|
||||||
|
</main>
|
||||||
|
<script>
|
||||||
|
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>
|
||||||
|
{{ end }}
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,27 +1,20 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<content>
|
<content>
|
||||||
{{- $pages := union .RegularPages .Sections }}
|
{{- $pages := union .RegularPages .Sections }}
|
||||||
|
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||||
{{- if .IsHome }}
|
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
||||||
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
|
||||||
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
<ul class="blog-posts">
|
|
||||||
{{ range $pages }}
|
|
||||||
<li>
|
|
||||||
<span class="date">
|
|
||||||
{{ .Date.Format "2006-01-02" }} |
|
|
||||||
</span>
|
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</content>
|
|
||||||
{{- if .IsHome }}
|
|
||||||
<a href="/blogs" style="font-size:10px; color: #AAA; bottom: 12px; position: fixed;">-</a>
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
|
<ul class="blog-posts">
|
||||||
|
{{ range $pages }}
|
||||||
|
<li>
|
||||||
|
<span class="date">
|
||||||
|
{{ .Date.Format "2006-01-02" }} |
|
||||||
|
</span>
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</content>
|
||||||
<div class="utils">
|
<div class="utils">
|
||||||
<div id="copy">©morgan.kr</div>
|
<div id="copy">©morgan.kr</div>
|
||||||
<div id="toggleColor">Toggle Darkmode</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;
|
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 {
|
.title {
|
||||||
color: var(--title-color);
|
color: var(--title-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
Loading…
Reference in New Issue