diff --git a/config.toml b/config.toml index 29a61f8..539efa6 100644 --- a/config.toml +++ b/config.toml @@ -4,6 +4,9 @@ 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)**" + [[menu.main]] name = "博客" url = "/blog/" diff --git a/themes/hugo-w2ng/assets/css/styles.css b/themes/hugo-w2ng/assets/css/styles.css index 6b0dad9..942ba75 100644 --- a/themes/hugo-w2ng/assets/css/styles.css +++ b/themes/hugo-w2ng/assets/css/styles.css @@ -7,62 +7,60 @@ /* Tailwind's utility classes - generated based on config file */ @import "node_modules/tailwindcss/utilities"; -h1 { - @apply text-4xl; +.markdown h1 { + @apply text-4xl my-12; } -h2 { - @apply text-2xl; +.markdown h2 { + @apply text-2xl my-8; } -h3 { - @apply text-lg; +.markdown h3 { + @apply text-lg my-4; } -h1, -h2, -h3, -h4 { +.markdown h4 { + @apply my-2; +} +.markdown h1, +.markdown h2, +.markdown h3, +.markdown h4 { @apply font-bold leading-loose; } - -blockquote { +.markdown blockquote { @apply bg-gray-100 p-3 mx-3 my-2 border-l-4 border-gray-400; } - -table { +.markdown table { @apply m-auto border-t border-b border-gray-800 border-solid; - } -table thead th { - @apply border-b border-solid border-gray-700 +.markdown table thead th { + @apply border-b border-solid border-gray-700; } -th, -td { +.markdown th, +.markdown td { @apply p-1; } -thead, -tfoot, -tr:nth-child(even) { +.markdown thead, +.markdown tfoot, +.markdown tr:nth-child(even) { @apply bg-gray-200; } - -pre { - box-shadow: 5px 5px 5px #eee; - @apply overflow-x-auto p-4 border-2 border-solid border-gray-100; +.markdown pre { + @apply overflow-x-auto shadow-md p-4 border-2 border-solid border-gray-100; } -code { +.markdown code { @apply bg-gray-200; } -pre code { +.markdown pre code { @apply bg-transparent; } - -ul { +.markdown ul { @apply text-base pl-8 list-disc; } - -ol { +.markdown ol { @apply text-base pl-8 list-decimal; } - -kbd { +.markdown kbd { @apply text-xs inline-block bg-gray-100 rounded border p-1 align-middle font-normal font-mono shadow; } +.markdown hr { + @apply block my-6 mx-auto max-w-md h-px border-t border-black; +} diff --git a/themes/hugo-w2ng/layouts/_default/baseof.html b/themes/hugo-w2ng/layouts/_default/baseof.html index eb6e00f..a88a21b 100644 --- a/themes/hugo-w2ng/layouts/_default/baseof.html +++ b/themes/hugo-w2ng/layouts/_default/baseof.html @@ -2,10 +2,12 @@ {{- partial "head.html" . -}} - -
+ +
{{- partial "header.html" . -}} - {{- block "main" . }}{{- end }} +
+ {{- block "main" . }}{{- end }} +
{{- partial "footer.html" . -}} diff --git a/themes/hugo-w2ng/layouts/_default/single.html b/themes/hugo-w2ng/layouts/_default/single.html index 662136f..a3e47d1 100644 --- a/themes/hugo-w2ng/layouts/_default/single.html +++ b/themes/hugo-w2ng/layouts/_default/single.html @@ -1,8 +1,6 @@ {{ define "main" }} -
-
-

{{ .Title }}

- {{ .Content }} -
-
+
+

{{ .Title }}

+ {{ .Content }} +
{{ end }} \ No newline at end of file diff --git a/themes/hugo-w2ng/layouts/partials/footer.html b/themes/hugo-w2ng/layouts/partials/footer.html index e69de29..d29ad46 100644 --- a/themes/hugo-w2ng/layouts/partials/footer.html +++ b/themes/hugo-w2ng/layouts/partials/footer.html @@ -0,0 +1,7 @@ + \ 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 df5391a..20a3f0f 100644 --- a/themes/hugo-w2ng/layouts/partials/header.html +++ b/themes/hugo-w2ng/layouts/partials/header.html @@ -1,8 +1,8 @@
-

Wrong.Wang

+

Wrong.Wang

前进

-
+