single almost over
This commit is contained in:
parent
eee76ebb5f
commit
b6bd7ece4d
@ -3,9 +3,9 @@ languageCode = "en-us"
|
||||
title = "My New Hugo Site"
|
||||
theme = "hugo-w2ng"
|
||||
pygmentsStyle="github"
|
||||
|
||||
[params]
|
||||
Footer = "© 2019 王不对 - **[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)** - **[RSS](/index.xml)**"
|
||||
AuthorName = "王不对"
|
||||
|
||||
[[menu.main]]
|
||||
name = "博客"
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4 {
|
||||
@apply font-bold leading-loose;
|
||||
@apply leading-loose;
|
||||
}
|
||||
.markdown blockquote {
|
||||
@apply bg-gray-100 p-3 mx-3 my-2 border-l-4 border-gray-400;
|
||||
@ -50,7 +50,7 @@
|
||||
@apply bg-gray-200;
|
||||
}
|
||||
.markdown pre code {
|
||||
@apply bg-transparent;
|
||||
@apply bg-transparent font-mono;
|
||||
}
|
||||
.markdown ul {
|
||||
@apply text-base pl-8 list-disc;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body class="">
|
||||
<div class="flex flex-wrap flex-col md:flex-row md:w-4/5 mx-auto py-5 min-h-screen">
|
||||
<div class="flex flex-col md:flex-row md:w-4/5 mx-auto py-5 min-h-screen">
|
||||
{{- partial "header.html" . -}}
|
||||
<main class="flex-1 p-4 md:border-l-2 md:border-black">
|
||||
{{- block "main" . }}{{- end }}
|
||||
|
||||
@ -1,6 +1,45 @@
|
||||
{{ define "main" }}
|
||||
<article class="flex-shrink max-w-3xl mx-auto leading-relaxed markdown">
|
||||
<h1 class="text-center">{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
<article itemscope itemtype="http://schema.org/Article" class="max-w-3xl mx-auto leading-relaxed">
|
||||
{{ if .IsPage }}
|
||||
<section class="flex flex-col meta">
|
||||
<h1 class="text-center text-4xl my-8 md:my-12">{{ .Title }}</h1>
|
||||
{{ if not .Params.disableMeta }}
|
||||
<h3 class="text-center text-2xl">
|
||||
{{ with $.Site.Params.AuthorName }}
|
||||
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
<span itemprop="name">{{ . }}</span>
|
||||
{{ end }}
|
||||
{{ if .Params.date }}
|
||||
{{ if $.Site.Params.AuthorName }} / {{ end }}
|
||||
<span itemprop="datePublished"
|
||||
content="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</span>
|
||||
{{ end }}
|
||||
</h3>
|
||||
<h3 class="md:order-first text-xl text-right mt-4 md:mt-0">
|
||||
{{ with .Params.categories }}
|
||||
<span itemprop="articleSection" class="category">
|
||||
{{ range . }}
|
||||
<a href="{{ . | printf "categories/%s" | relURL }}" rel="category">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ if .Params.categories }} / {{ end }}
|
||||
{{ with .Params.tags }}
|
||||
<span itemprop="keywords" class="tags text-base font-mono">
|
||||
{{ range . }}
|
||||
<a href="{{ . | printf "tags/%s" | relURL }}" class="m-1" rel="tag">#{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</h3>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ if not .IsHome }}
|
||||
<hr class="block my-10 mx-auto max-w-xs h-px border-t border-black">
|
||||
{{ end }}
|
||||
<section itemprop="articleBody" class="content markdown">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
</article>
|
||||
{{ end }}
|
||||
@ -1,28 +1,22 @@
|
||||
<header class="flex flex-col w-full md:w-1/5 md:text-right md:pr-8 bg-white text-center">
|
||||
<h1 class="text-4xl my-6 md:my-12 font-medium mt-4 md:mb-12"><a href="#">Wrong.Wang</a></h1>
|
||||
<p class="font-thin italic">前进</p>
|
||||
<!-- <input type="checkbox" class="hidden" id="expand-toggle" />
|
||||
<div class="block absolute right-0 md:hidden">
|
||||
<label for="expand-toggle" id="expand-btn" class="flex items-center px-3 py-2 border rounded">
|
||||
<svg class="h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Menu</title>
|
||||
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
|
||||
</svg>
|
||||
</label>
|
||||
</div> -->
|
||||
<input id="menu-check" type="checkbox" class="hidden"/>
|
||||
<label id="menu-label" for="menu-check" class="unselectable md:hidden inline-block py-4 h-12 cursor-pointer mt-3 text-xl text-gray-900">
|
||||
<header class="flex flex-col relative border-black border-b-4 md:border-none pb-6 mx-4 md:mx-0 md:w-1/5 md:text-right md:pr-8 bg-white md:text-center">
|
||||
<div class="">
|
||||
<h1 class="text-4xl md:my-12 mt-4 md:mb-12"><a href="#">Wrong.Wang</a></h1>
|
||||
<p class="font-thin italic">前进</p>
|
||||
</div>
|
||||
<input id="menu-check" type="checkbox" class="hidden" />
|
||||
<label id="menu-label" for="menu-check"
|
||||
class="absolute right-0 text-right md:hidden inline-block py-4 h-12 cursor-pointer mt-10 text-xl text-gray-900">
|
||||
<span class="icon close-icon">✕</span>
|
||||
<span class="icon open-icon">☰</span>
|
||||
<span class="text">MENU</span>
|
||||
</label>
|
||||
<nav id="menu" class="my-2 md:flex-row-reverse hidden md:block">
|
||||
<nav id="menu" class="my-2 w-full md:flex-row-reverse hidden md:block">
|
||||
<ul class="list-none pl-0 mx-auto justify-center max-w-xs">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="my-4 border-black border-b-2 md:border-none pb-1">
|
||||
<li class="my-4 border-black text-center md:text-right border-b-2 md:border-none pb-1">
|
||||
<a class="py-4 md:border-black md:border-b-2 md:pb-1" href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
</header>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user