edited post
This commit is contained in:
parent
093448c1bb
commit
fec51d0124
|
@ -1,7 +1,7 @@
|
|||
baseURL: "http://blog.morgan.kr"
|
||||
title: Morgan's Blog
|
||||
paginate: 50
|
||||
theme: "mytheme"
|
||||
theme: "newtheme"
|
||||
|
||||
enableRobotsTXT: true
|
||||
buildDrafts: false
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
+++
|
||||
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||
date = {{ .Date }}
|
||||
draft = true
|
||||
+++
|
|
@ -0,0 +1 @@
|
|||
console.log('This site was generated by Hugo.');
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body class="bg-gray-100 py-24 mx-auto ">
|
||||
<header>
|
||||
</header>
|
||||
<main class="max-w-7xl mx-auto">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
<footer>
|
||||
{{ partial "footer.html" . }}
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
{{ define "main" }}
|
||||
<div class="max-w-6xl mx-auto">
|
||||
<div class="mb-20 text-center">
|
||||
<h1 class="text-3xl font-bold mb-2 text-black">{{ .Title }}</h1>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 gap-8 auto-rows-max">
|
||||
{{- $pages := union .RegularPages .Sections }}
|
||||
|
||||
{{- if .IsHome }}
|
||||
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
||||
{{- end }}
|
||||
{{ range $pages }}
|
||||
<div class="bg-white shadow-lg rounded-lg p-10">
|
||||
<div class="text-[18px] font-semibold pb-2">
|
||||
<a href="{{ .RelPermalink }}" class="text-bold hover:underline">
|
||||
{{ .LinkTitle }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="font-light pb-2">{{ .Date | time.Format ":date_long" }}</div>
|
||||
<div class="text-[14px] rounded-md line-clamp-3">
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,21 @@
|
|||
{{ define "main" }}
|
||||
<div class="max-w-6xl mx-auto bg-white p-10 pt-16 rounded-lg shadow-xl">
|
||||
<div class="mb-10 text-center ">
|
||||
<h1 class="text-3xl font-bold mb-6 text-black">{{ .Title }}</h1>
|
||||
<div class="date text-2xl">
|
||||
{{ .Date | time.Format ":date_long" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-400 h-[1px] mb-8"></div>
|
||||
<div class="content text-[1.4rem] leading-relaxed">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="text-2xl font-bold mt-10 ml-10">
|
||||
<a href="#" onclick="window.history.back()">
|
||||
< Back
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
{{ end }}
|
|
@ -0,0 +1,71 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
|
||||
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" onload="renderMathInElement(document.body);"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{left: "$$", right: "$$", display: true},
|
||||
{left: "$", right: "$", display: false}
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ partialCached "head/css.html" . }}
|
||||
{{ partialCached "head/js.html" . }}
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
fontFamily: {
|
||||
'sans': ["'Source Sans 3'", "Pretendard", 'sans-serif'],
|
||||
'mono': ['monospace'],
|
||||
},
|
||||
extend: {
|
||||
lineHeight: {
|
||||
'extra-loose': '3',
|
||||
'seperate': '4'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style type="text/tailwindcss">
|
||||
@layer base {
|
||||
h1 {
|
||||
@apply text-5xl;
|
||||
}
|
||||
h2 {
|
||||
@apply text-4xl;
|
||||
}
|
||||
h3 {
|
||||
@apply text-3xl;
|
||||
}
|
||||
h4 {
|
||||
@apply text-2xl;
|
||||
}
|
||||
h5 {
|
||||
@apply text-xl;
|
||||
}
|
||||
h6 {
|
||||
@apply text-lg;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
@apply font-bold;
|
||||
@apply leading-[4rem];
|
||||
@apply mb-6;
|
||||
}
|
||||
p {
|
||||
@apply mb-6;
|
||||
}
|
||||
.katex-display {
|
||||
@apply m-8;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,9 @@
|
|||
{{- with resources.Get "css/main.css" }}
|
||||
{{- if eq hugo.Environment "development" }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
{{- else }}
|
||||
{{- with . | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,12 @@
|
|||
{{- with resources.Get "js/main.js" }}
|
||||
{{- if eq hugo.Environment "development" }}
|
||||
{{- with . | js.Build }}
|
||||
<script src="{{ .RelPermalink }}"></script>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $opts := dict "minify" true }}
|
||||
{{- with . | js.Build $opts | fingerprint }}
|
||||
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,45 @@
|
|||
{{- /*
|
||||
Renders a menu for the given menu ID.
|
||||
|
||||
@context {page} page The current page.
|
||||
@context {string} menuID The menu ID.
|
||||
|
||||
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
|
||||
*/}}
|
||||
|
||||
{{- $page := .page }}
|
||||
{{- $menuID := .menuID }}
|
||||
|
||||
{{- with index site.Menus $menuID }}
|
||||
<nav>
|
||||
<ul>
|
||||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{- end }}
|
||||
|
||||
{{- define "partials/inline/menu/walk.html" }}
|
||||
{{- $page := .page }}
|
||||
{{- range .menuEntries }}
|
||||
{{- $attrs := dict "href" .URL }}
|
||||
{{- if $page.IsMenuCurrent .Menu . }}
|
||||
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
|
||||
{{- else if $page.HasMenuCurrent .Menu .}}
|
||||
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
|
||||
{{- end }}
|
||||
<li>
|
||||
<a
|
||||
{{- range $k, $v := $attrs }}
|
||||
{{- with $v }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
>{{ or (T .Identifier) .Name | safeHTML }}</a>
|
||||
{{- with .Children }}
|
||||
<ul>
|
||||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -0,0 +1,23 @@
|
|||
{{- /*
|
||||
For a given taxonomy, renders a list of terms assigned to the page.
|
||||
|
||||
@context {page} page The current page.
|
||||
@context {string} taxonomy The taxonony.
|
||||
|
||||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
*/}}
|
||||
|
||||
{{- $page := .page }}
|
||||
{{- $taxonomy := .taxonomy }}
|
||||
|
||||
{{- with $page.GetTerms $taxonomy }}
|
||||
{{- $label := (index . 0).Parent.LinkTitle }}
|
||||
<div>
|
||||
<div>{{ $label }}:</div>
|
||||
<ul>
|
||||
{{- range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end }}
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1 @@
|
|||
name = 'newtheme'
|
Loading…
Reference in New Issue