header
This commit is contained in:
parent
b5af441715
commit
5eba78f6bc
21
config.toml
21
config.toml
@ -4,6 +4,27 @@ title = "My New Hugo Site"
|
||||
theme = "hugo-w2ng"
|
||||
pygmentsStyle="github"
|
||||
|
||||
[[menu.main]]
|
||||
name = "博客"
|
||||
url = "/blog/"
|
||||
weight = 2
|
||||
[[menu.main]]
|
||||
name = "飞行手册"
|
||||
url = "/flight-rules/"
|
||||
weight = 4
|
||||
[[menu.main]]
|
||||
name = "论文笔记"
|
||||
url = "/paper-notes/"
|
||||
weight = 5
|
||||
[[menu.main]]
|
||||
name = "只言片语"
|
||||
url = "/quote/"
|
||||
weight = 6
|
||||
[[menu.main]]
|
||||
name = "关于"
|
||||
url = "/about/"
|
||||
weight = 3
|
||||
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.extensions]
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body>
|
||||
<div class="flex flex-col md:flex-row md:w-4/5 mx-auto py-5">
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="content" class="flex md:w-4/5 mx-auto py-5">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,29 +1,8 @@
|
||||
{{ define "main" }}
|
||||
<section class="w-full md:w-1/5">
|
||||
<div class="bg-white my-2">
|
||||
<ul class="list-reset">
|
||||
<li>
|
||||
<a href="#" class="block p-4 text-grey-darker font-bold">Home</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="block p-4 text-grey-darker font-bold">About
|
||||
us</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="block p-4 text-grey-darker font-bold">Services</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="block p-4 text-grey-darker font-bold">Contact
|
||||
us</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<!-- <article class=" p-4"> -->
|
||||
<section class="flex-1 p-4 border-l-2 border-black">
|
||||
<main class="flex-1 p-4 md:border-l-2 md:border-black">
|
||||
<article class="max-w-3xl mx-auto ">
|
||||
<h1 class="">{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
</main>
|
||||
{{ end }}
|
||||
@ -0,0 +1,13 @@
|
||||
<header class="flex flex-col w-full md:w-1/5 md:text-right md:pr-8 bg-white text-center">
|
||||
<h1 class="font-medium mt-4 md:mb-12">Wrong.Wang</h1>
|
||||
<p class="font-thin italic">前进</p>
|
||||
<nav class="my-2 md:flex-row-reverse">
|
||||
<ul class="list-none pl-0">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="my-4 border-black border-b-2 md:border-none pb-1">
|
||||
<a class="md:border-black md:border-b-2 md:pb-1" href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
Loading…
Reference in New Issue
Block a user