diff --git a/config.toml b/config.toml index 539efa6..44c8a76 100644 --- a/config.toml +++ b/config.toml @@ -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 = "博客" diff --git a/themes/hugo-w2ng/assets/css/styles.css b/themes/hugo-w2ng/assets/css/styles.css index 30fb1fb..5d2826e 100644 --- a/themes/hugo-w2ng/assets/css/styles.css +++ b/themes/hugo-w2ng/assets/css/styles.css @@ -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; diff --git a/themes/hugo-w2ng/layouts/_default/baseof.html b/themes/hugo-w2ng/layouts/_default/baseof.html index a88a21b..af4db3f 100644 --- a/themes/hugo-w2ng/layouts/_default/baseof.html +++ b/themes/hugo-w2ng/layouts/_default/baseof.html @@ -3,7 +3,7 @@ {{- partial "head.html" . -}} -
+
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }} diff --git a/themes/hugo-w2ng/layouts/_default/single.html b/themes/hugo-w2ng/layouts/_default/single.html index 0daba74..7b39499 100644 --- a/themes/hugo-w2ng/layouts/_default/single.html +++ b/themes/hugo-w2ng/layouts/_default/single.html @@ -1,6 +1,45 @@ {{ define "main" }} -
-

{{ .Title }}

- {{ .Content }} +
+ {{ if .IsPage }} +
+

{{ .Title }}

+ {{ if not .Params.disableMeta }} +

+ {{ with $.Site.Params.AuthorName }} +

+

+ {{ with .Params.categories }} + + {{ range . }} + {{ . }} + {{ end }} + + {{ end }} + {{ if .Params.categories }} / {{ end }} + {{ with .Params.tags }} + + {{ range . }} + + {{ end }} + + {{ end }} +

+ {{ end }} +
+ {{ end }} + {{ if not .IsHome }} +
+ {{ end }} +
+ {{ .Content }} +
{{ end }} \ No newline at end of file diff --git a/themes/hugo-w2ng/layouts/partials/header.html b/themes/hugo-w2ng/layouts/partials/header.html index d5919b6..61bb5db 100644 --- a/themes/hugo-w2ng/layouts/partials/header.html +++ b/themes/hugo-w2ng/layouts/partials/header.html @@ -1,28 +1,22 @@ -
-

Wrong.Wang

-

前进

- - -