1
0
Fork 0

run prettier

This commit is contained in:
nanxiaobei 2022-11-15 08:06:02 +08:00
parent e7ad0b30c6
commit 244187a816
17 changed files with 401 additions and 297 deletions

View file

@ -1,5 +1,4 @@
module.exports = { module.exports = {
printWidth: 100,
singleQuote: true, singleQuote: true,
// https://github.com/tailwindlabs/prettier-plugin-tailwindcss // https://github.com/tailwindlabs/prettier-plugin-tailwindcss

View file

@ -50,7 +50,9 @@ html {
-o-tab-size: 4; -o-tab-size: 4;
tab-size: 4; tab-size: 4;
/* 3 */ /* 3 */
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
/* 4 */ /* 4 */
} }
@ -131,7 +133,8 @@ code,
kbd, kbd,
samp, samp,
pre { pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
'Liberation Mono', 'Courier New', monospace;
/* 1 */ /* 1 */
font-size: 1em; font-size: 1em;
/* 2 */ /* 2 */
@ -356,7 +359,8 @@ textarea {
2. Set the default placeholder color to the user's configured gray 400 color. 2. Set the default placeholder color to the user's configured gray 400 color.
*/ */
input::-moz-placeholder, textarea::-moz-placeholder { input::-moz-placeholder,
textarea::-moz-placeholder {
opacity: 1; opacity: 1;
/* 1 */ /* 1 */
color: #9ca3af; color: #9ca3af;
@ -376,7 +380,7 @@ Set the default cursor for buttons.
*/ */
button, button,
[role="button"] { [role='button'] {
cursor: pointer; cursor: pointer;
} }
@ -425,7 +429,7 @@ video {
} }
html, html,
body { body {
height: 100%; height: 100%;
} }
@ -443,7 +447,9 @@ body {
background-color: rgb(0 0 0 / var(--tw-bg-opacity)); background-color: rgb(0 0 0 / var(--tw-bg-opacity));
} }
*, ::before, ::after { *,
::before,
::after {
--tw-border-spacing-x: 0; --tw-border-spacing-x: 0;
--tw-border-spacing-y: 0; --tw-border-spacing-y: 0;
--tw-translate-x: 0; --tw-translate-x: 0;
@ -589,7 +595,7 @@ body {
max-width: 65ch; max-width: 65ch;
} }
.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) { .prose :where([class~='lead']):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-lead); color: var(--tw-prose-lead);
font-size: 1.25em; font-size: 1.25em;
line-height: 1.6; line-height: 1.6;
@ -597,116 +603,119 @@ body {
margin-bottom: 1.2em; margin-bottom: 1.2em;
} }
.prose :where(a):not(:where([class~="not-prose"] *)) { .prose :where(a):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-links); color: var(--tw-prose-links);
text-decoration: underline; text-decoration: underline;
font-weight: 500; font-weight: 500;
} }
.prose :where(strong):not(:where([class~="not-prose"] *)) { .prose :where(strong):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-bold); color: var(--tw-prose-bold);
font-weight: 600; font-weight: 600;
} }
.prose :where(a strong):not(:where([class~="not-prose"] *)) { .prose :where(a strong):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
} }
.prose :where(blockquote strong):not(:where([class~="not-prose"] *)) { .prose :where(blockquote strong):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
} }
.prose :where(thead th strong):not(:where([class~="not-prose"] *)) { .prose :where(thead th strong):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
} }
.prose :where(ol):not(:where([class~="not-prose"] *)) { .prose :where(ol):not(:where([class~='not-prose'] *)) {
list-style-type: decimal; list-style-type: decimal;
margin-top: 1.25em; margin-top: 1.25em;
margin-bottom: 1.25em; margin-bottom: 1.25em;
padding-left: 1.625em; padding-left: 1.625em;
} }
.prose :where(ol[type="A"]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='A']):not(:where([class~='not-prose'] *)) {
list-style-type: upper-alpha; list-style-type: upper-alpha;
} }
.prose :where(ol[type="a"]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='a']):not(:where([class~='not-prose'] *)) {
list-style-type: lower-alpha; list-style-type: lower-alpha;
} }
.prose :where(ol[type="A" s]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='A' s]):not(:where([class~='not-prose'] *)) {
list-style-type: upper-alpha; list-style-type: upper-alpha;
} }
.prose :where(ol[type="a" s]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='a' s]):not(:where([class~='not-prose'] *)) {
list-style-type: lower-alpha; list-style-type: lower-alpha;
} }
.prose :where(ol[type="I"]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='I']):not(:where([class~='not-prose'] *)) {
list-style-type: upper-roman; list-style-type: upper-roman;
} }
.prose :where(ol[type="i"]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='i']):not(:where([class~='not-prose'] *)) {
list-style-type: lower-roman; list-style-type: lower-roman;
} }
.prose :where(ol[type="I" s]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='I' s]):not(:where([class~='not-prose'] *)) {
list-style-type: upper-roman; list-style-type: upper-roman;
} }
.prose :where(ol[type="i" s]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='i' s]):not(:where([class~='not-prose'] *)) {
list-style-type: lower-roman; list-style-type: lower-roman;
} }
.prose :where(ol[type="1"]):not(:where([class~="not-prose"] *)) { .prose :where(ol[type='1']):not(:where([class~='not-prose'] *)) {
list-style-type: decimal; list-style-type: decimal;
} }
.prose :where(ul):not(:where([class~="not-prose"] *)) { .prose :where(ul):not(:where([class~='not-prose'] *)) {
list-style-type: disc; list-style-type: disc;
margin-top: 1.25em; margin-top: 1.25em;
margin-bottom: 1.25em; margin-bottom: 1.25em;
padding-left: 1.625em; padding-left: 1.625em;
} }
.prose :where(ol > li):not(:where([class~="not-prose"] *))::marker { .prose :where(ol > li):not(:where([class~='not-prose'] *))::marker {
font-weight: 400; font-weight: 400;
color: var(--tw-prose-counters); color: var(--tw-prose-counters);
} }
.prose :where(ul > li):not(:where([class~="not-prose"] *))::marker { .prose :where(ul > li):not(:where([class~='not-prose'] *))::marker {
color: var(--tw-prose-bullets); color: var(--tw-prose-bullets);
} }
.prose :where(hr):not(:where([class~="not-prose"] *)) { .prose :where(hr):not(:where([class~='not-prose'] *)) {
border-color: var(--tw-prose-hr); border-color: var(--tw-prose-hr);
border-top-width: 1px; border-top-width: 1px;
margin-top: 3em; margin-top: 3em;
margin-bottom: 3em; margin-bottom: 3em;
} }
.prose :where(blockquote):not(:where([class~="not-prose"] *)) { .prose :where(blockquote):not(:where([class~='not-prose'] *)) {
font-weight: 500; font-weight: 500;
font-style: italic; font-style: italic;
color: var(--tw-prose-quotes); color: var(--tw-prose-quotes);
border-left-width: 0.25rem; border-left-width: 0.25rem;
border-left-color: var(--tw-prose-quote-borders); border-left-color: var(--tw-prose-quote-borders);
quotes: "\201C""\201D""\2018""\2019"; quotes: '\201C''\201D''\2018''\2019';
margin-top: 1.6em; margin-top: 1.6em;
margin-bottom: 1.6em; margin-bottom: 1.6em;
padding-left: 1em; padding-left: 1em;
} }
.prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"] *))::before { .prose
:where(blockquote p:first-of-type):not(:where([class~='not-prose']
*))::before {
content: open-quote; content: open-quote;
} }
.prose :where(blockquote p:last-of-type):not(:where([class~="not-prose"] *))::after { .prose
:where(blockquote p:last-of-type):not(:where([class~='not-prose'] *))::after {
content: close-quote; content: close-quote;
} }
.prose :where(h1):not(:where([class~="not-prose"] *)) { .prose :where(h1):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-headings); color: var(--tw-prose-headings);
font-weight: 800; font-weight: 800;
font-size: 2.25em; font-size: 2.25em;
@ -715,12 +724,12 @@ body {
line-height: 1.1111111; line-height: 1.1111111;
} }
.prose :where(h1 strong):not(:where([class~="not-prose"] *)) { .prose :where(h1 strong):not(:where([class~='not-prose'] *)) {
font-weight: 900; font-weight: 900;
color: inherit; color: inherit;
} }
.prose :where(h2):not(:where([class~="not-prose"] *)) { .prose :where(h2):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-headings); color: var(--tw-prose-headings);
font-weight: 700; font-weight: 700;
font-size: 1.5em; font-size: 1.5em;
@ -729,12 +738,12 @@ body {
line-height: 1.3333333; line-height: 1.3333333;
} }
.prose :where(h2 strong):not(:where([class~="not-prose"] *)) { .prose :where(h2 strong):not(:where([class~='not-prose'] *)) {
font-weight: 800; font-weight: 800;
color: inherit; color: inherit;
} }
.prose :where(h3):not(:where([class~="not-prose"] *)) { .prose :where(h3):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-headings); color: var(--tw-prose-headings);
font-weight: 600; font-weight: 600;
font-size: 1.25em; font-size: 1.25em;
@ -743,12 +752,12 @@ body {
line-height: 1.6; line-height: 1.6;
} }
.prose :where(h3 strong):not(:where([class~="not-prose"] *)) { .prose :where(h3 strong):not(:where([class~='not-prose'] *)) {
font-weight: 700; font-weight: 700;
color: inherit; color: inherit;
} }
.prose :where(h4):not(:where([class~="not-prose"] *)) { .prose :where(h4):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-headings); color: var(--tw-prose-headings);
font-weight: 600; font-weight: 600;
margin-top: 1.5em; margin-top: 1.5em;
@ -756,73 +765,73 @@ body {
line-height: 1.5; line-height: 1.5;
} }
.prose :where(h4 strong):not(:where([class~="not-prose"] *)) { .prose :where(h4 strong):not(:where([class~='not-prose'] *)) {
font-weight: 700; font-weight: 700;
color: inherit; color: inherit;
} }
.prose :where(img):not(:where([class~="not-prose"] *)) { .prose :where(img):not(:where([class~='not-prose'] *)) {
margin-top: 2em; margin-top: 2em;
margin-bottom: 2em; margin-bottom: 2em;
} }
.prose :where(figure > *):not(:where([class~="not-prose"] *)) { .prose :where(figure > *):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
.prose :where(figcaption):not(:where([class~="not-prose"] *)) { .prose :where(figcaption):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-captions); color: var(--tw-prose-captions);
font-size: 0.875em; font-size: 0.875em;
line-height: 1.4285714; line-height: 1.4285714;
margin-top: 0.8571429em; margin-top: 0.8571429em;
} }
.prose :where(code):not(:where([class~="not-prose"] *)) { .prose :where(code):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-code); color: var(--tw-prose-code);
font-weight: 600; font-weight: 600;
font-size: 0.875em; font-size: 0.875em;
} }
.prose :where(code):not(:where([class~="not-prose"] *))::before { .prose :where(code):not(:where([class~='not-prose'] *))::before {
content: "`"; content: '`';
} }
.prose :where(code):not(:where([class~="not-prose"] *))::after { .prose :where(code):not(:where([class~='not-prose'] *))::after {
content: "`"; content: '`';
} }
.prose :where(a code):not(:where([class~="not-prose"] *)) { .prose :where(a code):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
} }
.prose :where(h1 code):not(:where([class~="not-prose"] *)) { .prose :where(h1 code):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
} }
.prose :where(h2 code):not(:where([class~="not-prose"] *)) { .prose :where(h2 code):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
font-size: 0.875em; font-size: 0.875em;
} }
.prose :where(h3 code):not(:where([class~="not-prose"] *)) { .prose :where(h3 code):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
font-size: 0.9em; font-size: 0.9em;
} }
.prose :where(h4 code):not(:where([class~="not-prose"] *)) { .prose :where(h4 code):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
} }
.prose :where(blockquote code):not(:where([class~="not-prose"] *)) { .prose :where(blockquote code):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
} }
.prose :where(thead th code):not(:where([class~="not-prose"] *)) { .prose :where(thead th code):not(:where([class~='not-prose'] *)) {
color: inherit; color: inherit;
} }
.prose :where(pre):not(:where([class~="not-prose"] *)) { .prose :where(pre):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-pre-code); color: var(--tw-prose-pre-code);
background-color: var(--tw-prose-pre-bg); background-color: var(--tw-prose-pre-bg);
overflow-x: auto; overflow-x: auto;
@ -838,7 +847,7 @@ body {
padding-left: 1.1428571em; padding-left: 1.1428571em;
} }
.prose :where(pre code):not(:where([class~="not-prose"] *)) { .prose :where(pre code):not(:where([class~='not-prose'] *)) {
background-color: transparent; background-color: transparent;
border-width: 0; border-width: 0;
border-radius: 0; border-radius: 0;
@ -850,15 +859,15 @@ body {
line-height: inherit; line-height: inherit;
} }
.prose :where(pre code):not(:where([class~="not-prose"] *))::before { .prose :where(pre code):not(:where([class~='not-prose'] *))::before {
content: none; content: none;
} }
.prose :where(pre code):not(:where([class~="not-prose"] *))::after { .prose :where(pre code):not(:where([class~='not-prose'] *))::after {
content: none; content: none;
} }
.prose :where(table):not(:where([class~="not-prose"] *)) { .prose :where(table):not(:where([class~='not-prose'] *)) {
width: 100%; width: 100%;
table-layout: auto; table-layout: auto;
text-align: left; text-align: left;
@ -868,12 +877,12 @@ body {
line-height: 1.7142857; line-height: 1.7142857;
} }
.prose :where(thead):not(:where([class~="not-prose"] *)) { .prose :where(thead):not(:where([class~='not-prose'] *)) {
border-bottom-width: 1px; border-bottom-width: 1px;
border-bottom-color: var(--tw-prose-th-borders); border-bottom-color: var(--tw-prose-th-borders);
} }
.prose :where(thead th):not(:where([class~="not-prose"] *)) { .prose :where(thead th):not(:where([class~='not-prose'] *)) {
color: var(--tw-prose-headings); color: var(--tw-prose-headings);
font-weight: 600; font-weight: 600;
vertical-align: bottom; vertical-align: bottom;
@ -882,25 +891,25 @@ body {
padding-left: 0.5714286em; padding-left: 0.5714286em;
} }
.prose :where(tbody tr):not(:where([class~="not-prose"] *)) { .prose :where(tbody tr):not(:where([class~='not-prose'] *)) {
border-bottom-width: 1px; border-bottom-width: 1px;
border-bottom-color: var(--tw-prose-td-borders); border-bottom-color: var(--tw-prose-td-borders);
} }
.prose :where(tbody tr:last-child):not(:where([class~="not-prose"] *)) { .prose :where(tbody tr:last-child):not(:where([class~='not-prose'] *)) {
border-bottom-width: 0; border-bottom-width: 0;
} }
.prose :where(tbody td):not(:where([class~="not-prose"] *)) { .prose :where(tbody td):not(:where([class~='not-prose'] *)) {
vertical-align: baseline; vertical-align: baseline;
} }
.prose :where(tfoot):not(:where([class~="not-prose"] *)) { .prose :where(tfoot):not(:where([class~='not-prose'] *)) {
border-top-width: 1px; border-top-width: 1px;
border-top-color: var(--tw-prose-th-borders); border-top-color: var(--tw-prose-th-borders);
} }
.prose :where(tfoot td):not(:where([class~="not-prose"] *)) { .prose :where(tfoot td):not(:where([class~='not-prose'] *)) {
vertical-align: top; vertical-align: top;
} }
@ -941,249 +950,277 @@ body {
line-height: 1.75; line-height: 1.75;
} }
.prose :where(p):not(:where([class~="not-prose"] *)) { .prose :where(p):not(:where([class~='not-prose'] *)) {
margin-top: 1.25em; margin-top: 1.25em;
margin-bottom: 1.25em; margin-bottom: 1.25em;
} }
.prose :where(video):not(:where([class~="not-prose"] *)) { .prose :where(video):not(:where([class~='not-prose'] *)) {
margin-top: 2em; margin-top: 2em;
margin-bottom: 2em; margin-bottom: 2em;
} }
.prose :where(figure):not(:where([class~="not-prose"] *)) { .prose :where(figure):not(:where([class~='not-prose'] *)) {
margin-top: 2em; margin-top: 2em;
margin-bottom: 2em; margin-bottom: 2em;
} }
.prose :where(li):not(:where([class~="not-prose"] *)) { .prose :where(li):not(:where([class~='not-prose'] *)) {
margin-top: 0.5em; margin-top: 0.5em;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
.prose :where(ol > li):not(:where([class~="not-prose"] *)) { .prose :where(ol > li):not(:where([class~='not-prose'] *)) {
padding-left: 0.375em; padding-left: 0.375em;
} }
.prose :where(ul > li):not(:where([class~="not-prose"] *)) { .prose :where(ul > li):not(:where([class~='not-prose'] *)) {
padding-left: 0.375em; padding-left: 0.375em;
} }
.prose :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { .prose :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
margin-top: 0.75em; margin-top: 0.75em;
margin-bottom: 0.75em; margin-bottom: 0.75em;
} }
.prose :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose
:where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.25em; margin-top: 1.25em;
} }
.prose :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose
:where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.25em; margin-bottom: 1.25em;
} }
.prose :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose
:where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.25em; margin-top: 1.25em;
} }
.prose :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose
:where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.25em; margin-bottom: 1.25em;
} }
.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"] *)) { .prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~='not-prose'] *)) {
margin-top: 0.75em; margin-top: 0.75em;
margin-bottom: 0.75em; margin-bottom: 0.75em;
} }
.prose :where(hr + *):not(:where([class~="not-prose"] *)) { .prose :where(hr + *):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose :where(h2 + *):not(:where([class~="not-prose"] *)) { .prose :where(h2 + *):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose :where(h3 + *):not(:where([class~="not-prose"] *)) { .prose :where(h3 + *):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose :where(h4 + *):not(:where([class~="not-prose"] *)) { .prose :where(h4 + *):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose :where(thead th:first-child):not(:where([class~="not-prose"] *)) { .prose :where(thead th:first-child):not(:where([class~='not-prose'] *)) {
padding-left: 0; padding-left: 0;
} }
.prose :where(thead th:last-child):not(:where([class~="not-prose"] *)) { .prose :where(thead th:last-child):not(:where([class~='not-prose'] *)) {
padding-right: 0; padding-right: 0;
} }
.prose :where(tbody td, tfoot td):not(:where([class~="not-prose"] *)) { .prose :where(tbody td, tfoot td):not(:where([class~='not-prose'] *)) {
padding-top: 0.5714286em; padding-top: 0.5714286em;
padding-right: 0.5714286em; padding-right: 0.5714286em;
padding-bottom: 0.5714286em; padding-bottom: 0.5714286em;
padding-left: 0.5714286em; padding-left: 0.5714286em;
} }
.prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"] *)) { .prose
:where(tbody td:first-child, tfoot
td:first-child):not(:where([class~='not-prose'] *)) {
padding-left: 0; padding-left: 0;
} }
.prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"] *)) { .prose
:where(tbody td:last-child, tfoot
td:last-child):not(:where([class~='not-prose'] *)) {
padding-right: 0; padding-right: 0;
} }
.prose :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { .prose :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { .prose :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 0; margin-bottom: 0;
} }
.prose-sm :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { .prose-sm :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
margin-top: 0.5714286em; margin-top: 0.5714286em;
margin-bottom: 0.5714286em; margin-bottom: 0.5714286em;
} }
.prose-sm :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-sm
:where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.1428571em; margin-top: 1.1428571em;
} }
.prose-sm :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-sm
:where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.1428571em; margin-bottom: 1.1428571em;
} }
.prose-sm :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-sm
:where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.1428571em; margin-top: 1.1428571em;
} }
.prose-sm :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-sm
:where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.1428571em; margin-bottom: 1.1428571em;
} }
.prose-sm :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { .prose-sm :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose-sm :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { .prose-sm :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 0; margin-bottom: 0;
} }
.prose-base :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { .prose-base :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
margin-top: 0.75em; margin-top: 0.75em;
margin-bottom: 0.75em; margin-bottom: 0.75em;
} }
.prose-base :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-base
:where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.25em; margin-top: 1.25em;
} }
.prose-base :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-base
:where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.25em; margin-bottom: 1.25em;
} }
.prose-base :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-base
:where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.25em; margin-top: 1.25em;
} }
.prose-base :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-base
:where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.25em; margin-bottom: 1.25em;
} }
.prose-base :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { .prose-base :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose-base :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { .prose-base :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 0; margin-bottom: 0;
} }
.prose-lg :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { .prose-lg :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
margin-top: 0.8888889em; margin-top: 0.8888889em;
margin-bottom: 0.8888889em; margin-bottom: 0.8888889em;
} }
.prose-lg :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-lg
:where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.3333333em; margin-top: 1.3333333em;
} }
.prose-lg :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-lg
:where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.3333333em; margin-bottom: 1.3333333em;
} }
.prose-lg :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-lg
:where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.3333333em; margin-top: 1.3333333em;
} }
.prose-lg :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-lg
:where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.3333333em; margin-bottom: 1.3333333em;
} }
.prose-lg :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { .prose-lg :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose-lg :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { .prose-lg :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 0; margin-bottom: 0;
} }
.prose-xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { .prose-xl :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
margin-top: 0.8em; margin-top: 0.8em;
margin-bottom: 0.8em; margin-bottom: 0.8em;
} }
.prose-xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-xl
:where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.2em; margin-top: 1.2em;
} }
.prose-xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-xl
:where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.2em; margin-bottom: 1.2em;
} }
.prose-xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-xl
:where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.2em; margin-top: 1.2em;
} }
.prose-xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-xl
:where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.2em; margin-bottom: 1.2em;
} }
.prose-xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { .prose-xl :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose-xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { .prose-xl :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 0; margin-bottom: 0;
} }
.prose-2xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) { .prose-2xl :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
margin-top: 0.8333333em; margin-top: 0.8333333em;
margin-bottom: 0.8333333em; margin-bottom: 0.8333333em;
} }
.prose-2xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-2xl
:where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.3333333em; margin-top: 1.3333333em;
} }
.prose-2xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-2xl
:where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.3333333em; margin-bottom: 1.3333333em;
} }
.prose-2xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) { .prose-2xl
:where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) {
margin-top: 1.3333333em; margin-top: 1.3333333em;
} }
.prose-2xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) { .prose-2xl
:where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.3333333em; margin-bottom: 1.3333333em;
} }
.prose-2xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)) { .prose-2xl :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
margin-top: 0; margin-top: 0;
} }
.prose-2xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)) { .prose-2xl :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 0; margin-bottom: 0;
} }
@ -1235,16 +1272,21 @@ body {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity)); color: rgb(255 255 255 / var(--tw-text-opacity));
text-decoration-line: none; text-decoration-line: none;
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1),
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); 0 4px 6px -4px rgb(0 0 0 / 0.1);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color),
0 4px 6px -4px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
transition-duration: 100ms; transition-duration: 100ms;
} }
.btn:active { .btn:active {
--tw-scale-x: .95; --tw-scale-x: 0.95;
--tw-scale-y: .95; --tw-scale-y: 0.95;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y))
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.dark .btn { .dark .btn {
@ -1485,17 +1527,23 @@ body {
.-translate-x-\[1px\] { .-translate-x-\[1px\] {
--tw-translate-x: -1px; --tw-translate-x: -1px;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y))
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.-translate-y-0\.5 { .-translate-y-0\.5 {
--tw-translate-y: -0.125rem; --tw-translate-y: -0.125rem;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y))
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.-translate-y-0 { .-translate-y-0 {
--tw-translate-y: -0px; --tw-translate-y: -0px;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y))
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.cursor-pointer { .cursor-pointer {
@ -1692,9 +1740,12 @@ body {
} }
.shadow-xl { .shadow-xl {
--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); 0 8px 10px -6px rgb(0 0 0 / 0.1);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color),
0 8px 10px -6px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
} }
.duration-200 { .duration-200 {
@ -1710,7 +1761,7 @@ body {
} }
.btn-menu::before, .btn-menu::before,
.btn-menu::after { .btn-menu::after {
display: block; display: block;
height: 2px; height: 2px;
width: 1.25rem; width: 1.25rem;
@ -1721,10 +1772,12 @@ body {
content: var(--tw-content); content: var(--tw-content);
} }
.dark .btn-menu::before,.dark .dark .btn-menu::before,
.btn-menu::after { .dark .btn-menu::after {
--tw-invert: invert(100%); --tw-invert: invert(100%);
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast)
var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate)
var(--tw-sepia) var(--tw-drop-shadow);
} }
.nav-wrapper { .nav-wrapper {
@ -1739,14 +1792,18 @@ body {
width: 1.5rem; width: 1.5rem;
--tw-translate-y: 5.5px; --tw-translate-y: 5.5px;
--tw-rotate: 45deg; --tw-rotate: 45deg;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y))
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.open .btn-menu::after { .open .btn-menu::after {
width: 1.5rem; width: 1.5rem;
--tw-translate-y: -5.5px; --tw-translate-y: -5.5px;
--tw-rotate: -45deg; --tw-rotate: -45deg;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); transform: translate(var(--tw-translate-x), var(--tw-translate-y))
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
} }
.open .nav-wrapper { .open .nav-wrapper {
@ -1770,9 +1827,12 @@ article pre {
margin-left: -2rem; margin-left: -2rem;
margin-right: -2rem; margin-right: -2rem;
padding: 2rem !important; padding: 2rem !important;
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1),
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); 0 4px 6px -4px rgb(0 0 0 / 0.1);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color),
0 4px 6px -4px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
} }
article blockquote { article blockquote {
@ -1866,7 +1926,9 @@ article blockquote {
.dark .dark\:invert { .dark .dark\:invert {
--tw-invert: invert(100%); --tw-invert: invert(100%);
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast)
var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate)
var(--tw-sepia) var(--tw-drop-shadow);
} }
.dark .dark\:\[background-position\:right\] { .dark .dark\:\[background-position\:right\] {

View file

@ -10,11 +10,11 @@ Written in Go, Hugo is an open source static site generator available under the
Hugo makes use of a variety of open source projects including: Hugo makes use of a variety of open source projects including:
* https://github.com/yuin/goldmark - https://github.com/yuin/goldmark
* https://github.com/alecthomas/chroma - https://github.com/alecthomas/chroma
* https://github.com/muesli/smartcrop - https://github.com/muesli/smartcrop
* https://github.com/spf13/cobra - https://github.com/spf13/cobra
* https://github.com/spf13/viper - https://github.com/spf13/viper
Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages. Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.

View file

@ -1,5 +1,5 @@
--- ---
date: 2019-05-28 date: 2019-05-28
type: section type: section
layout: "archives" layout: 'archives'
--- ---

View file

@ -9,7 +9,9 @@ tags = [
+++ +++
Emoji can be enabled in a Hugo project in a number of ways. Emoji can be enabled in a Hugo project in a number of ways.
<!--more--> <!--more-->
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
@ -19,17 +21,18 @@ To enable emoji globally, set `enableEmoji` to `true` in your site's [configurat
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
*** ---
**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
{{< highlight html >}} {{< highlight html >}}
.emoji { .emoji {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
} }
{{< /highlight >}} {{< /highlight >}}
{{< css.inline >}} {{< css.inline >}}
<style> <style>
.emojify { .emojify {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
@ -43,4 +46,5 @@ The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference
} }
} }
</style> </style>
{{< /css.inline >}} {{< /css.inline >}}

View file

@ -17,6 +17,7 @@ aliases = ["migrate-from-jekyl"]
+++ +++
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
<!--more--> <!--more-->
## Headings ## Headings
@ -24,10 +25,15 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest. The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
# H1 # H1
## H2 ## H2
### H3 ### H3
#### H4 #### H4
##### H5 ##### H5
###### H6 ###### H6
## Paragraph ## Paragraph
@ -43,7 +49,7 @@ The blockquote element represents content that is quoted from another source, op
#### Blockquote without attribution #### Blockquote without attribution
> Tiam, ad mint andaepu dandae nostion secatur sequo quae. > Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use *Markdown syntax* within a blockquote. > **Note** that you can use _Markdown syntax_ within a blockquote.
#### Blockquote with attribution #### Blockquote with attribution
@ -56,31 +62,31 @@ The blockquote element represents content that is quoted from another source, op
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Name | Age | Name | Age |
--------|------ | ----- | --- |
Bob | 27 | Bob | 27 |
Alice | 23 | Alice | 23 |
#### Inline Markdown within tables #### Inline Markdown within tables
| Italics | Bold | Code | | Italics | Bold | Code |
| -------- | -------- | ------ | | --------- | -------- | ------ |
| *italics* | **bold** | `code` | | _italics_ | **bold** | `code` |
## Code Blocks ## Code Blocks
#### Code block with backticks #### Code block with backticks
```html ```html
<!doctype html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<title>Example HTML5 Document</title> <title>Example HTML5 Document</title>
</head> </head>
<body> <body>
<p>Test</p> <p>Test</p>
</body> </body>
</html> </html>
``` ```
@ -98,7 +104,9 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</html> </html>
#### Code block with Hugo's internal highlight shortcode #### Code block with Hugo's internal highlight shortcode
{{< highlight html >}} {{< highlight html >}}
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
@ -121,19 +129,19 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
#### Unordered List #### Unordered List
* List item - List item
* Another item - Another item
* And another item - And another item
#### Nested list #### Nested list
* Fruit - Fruit
* Apple - Apple
* Orange - Orange
* Banana - Banana
* Dairy - Dairy
* Milk - Milk
* Cheese - Cheese
## Other Elements — abbr, sub, sup, kbd, mark ## Other Elements — abbr, sub, sup, kbd, mark

View file

@ -7,6 +7,7 @@ math: true
--- ---
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
<!--more--> <!--more-->
In this example we will be using [KaTeX](https://katex.org/) In this example we will be using [KaTeX](https://katex.org/)
@ -28,6 +29,7 @@ In this example we will be using [KaTeX](https://katex.org/)
{{< math.inline >}} {{< math.inline >}}
{{ if or .Page.Params.math .Site.Params.math }} {{ if or .Page.Params.math .Site.Params.math }}
<!-- KaTeX --> <!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script> <script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
@ -38,12 +40,14 @@ In this example we will be using [KaTeX](https://katex.org/)
### Examples ### Examples
{{< math.inline >}} {{< math.inline >}}
<p> <p>
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
</p> </p>
{{</ math.inline >}} {{</ math.inline >}}
Block math: Block math:
$$ $$
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
$$ $$

View file

@ -36,10 +36,12 @@ Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, _oculos nomen_ non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
{{< css.inline >}} {{< css.inline >}}
<style> <style>
.canon { background: white; width: 100%; height: auto; } .canon { background: white; width: 100%; height: auto; }
</style> </style>
{{< /css.inline >}} {{< /css.inline >}}

View file

@ -10,8 +10,8 @@ tags = [
+++ +++
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
<!--more-->
--- ## <!--more-->
## YouTube Privacy Enhanced Shortcode ## YouTube Privacy Enhanced Shortcode

View file

@ -1,3 +1,7 @@
{{ define "main" }} {{ define "main" }}
<h1 class="absolute inset-x-8 top-0 bottom-20 flex items-center justify-center text-9xl">404</h1> <h1
class="absolute inset-x-8 top-0 bottom-20 flex items-center justify-center text-9xl"
>
404
</h1>
{{ end }} {{ end }}

View file

@ -5,8 +5,10 @@
{{ $.Scratch.Delete "avatar_url" }}<!----> {{ $.Scratch.Delete "avatar_url" }}<!---->
<!-- bg_color --> <!-- bg_color -->
{{ $color_map := dict "linen" "#faf6f1" "wheat" "#f1efe1" "gray" "#fbfbfb" "light" "#fff" }}<!----> {{ $color_map := dict "linen" "#faf6f1" "wheat" "#f1efe1" "gray" "#fbfbfb"
{{ $.Scratch.Set "bg_color" (index $color_map (site.Params.color | default (print "linen"))) }}<!----> "light" "#fff" }}<!---->
{{ $.Scratch.Set "bg_color" (index $color_map (site.Params.color | default
(print "linen"))) }}<!---->
<!-- social_list --> <!-- social_list -->
{{ $social_params := slice "twitter" "github" "instagram" "rss" }}<!----> {{ $social_params := slice "twitter" "github" "instagram" "rss" }}<!---->

View file

@ -12,7 +12,8 @@
{{ end }} {{ end }}
<!-- Articles --> <!-- Articles -->
{{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages }}<!----> {{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages
}}<!---->
<!-- avatar --> <!-- avatar -->
{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}<!----> {{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}<!---->
@ -34,7 +35,8 @@
<div> <div>
<h1 class="mt-1.5 mb-3 text-3xl font-bold">{{ site.Params.name }}</h1> <h1 class="mt-1.5 mb-3 text-3xl font-bold">{{ site.Params.name }}</h1>
<div class="break-words"> <div class="break-words">
{{ site.Params.bio | default (print "Personal blog by " site.Params.name) }} {{ site.Params.bio | default (print "Personal blog by " site.Params.name)
}}
</div> </div>
</div> </div>
{{ end }} {{ end }}
@ -45,7 +47,9 @@
<section class="relative my-10 first-of-type:mt-0 last-of-type:mb-0"> <section class="relative my-10 first-of-type:mt-0 last-of-type:mb-0">
<h2 class="!my-0 pb-1 !leading-none">{{ .Title }}</h2> <h2 class="!my-0 pb-1 !leading-none">{{ .Title }}</h2>
<time class="text-sm opacity-60">{{ .Date | time.Format ":date_medium" }}</time> <time class="text-sm opacity-60"
>{{ .Date | time.Format ":date_medium" }}</time
>
<a class="absolute inset-0" href="{{ .Permalink }}"></a> <a class="absolute inset-0" href="{{ .Permalink }}"></a>
</section> </section>
{{ end }} {{ end }}
@ -57,7 +61,9 @@
<a class="btn" href="{{ $paginator.Prev.URL }}">← {{ i18n "prev_page" }}</a> <a class="btn" href="{{ $paginator.Prev.URL }}">← {{ i18n "prev_page" }}</a>
{{ end }}<!----> {{ end }}<!---->
{{ if $paginator.HasNext }} {{ if $paginator.HasNext }}
<a class="btn ml-auto" href="{{ $paginator.Next.URL }}">{{ i18n "next_page" }} →</a> <a class="btn ml-auto" href="{{ $paginator.Next.URL }}"
>{{ i18n "next_page" }} →</a
>
{{ end }} {{ end }}
</nav> </nav>
{{ end }}<!----> {{ end }}<!---->

View file

@ -37,7 +37,9 @@
{{ if and (gt (len $pages) 1) (in $pages . ) }} {{ if and (gt (len $pages) 1) (in $pages . ) }}
<nav class="mt-24 flex rounded-lg bg-black/[3%] text-lg dark:bg-white/[8%]"> <nav class="mt-24 flex rounded-lg bg-black/[3%] text-lg dark:bg-white/[8%]">
{{ with $pages.Next . }} {{ with $pages.Next . }}
<a class="flex w-1/2 items-center p-6 pr-3 no-underline" href="{{ .Permalink }}" <a
class="flex w-1/2 items-center p-6 pr-3 no-underline"
href="{{ .Permalink }}"
><span class="mr-1.5"></span><span>{{ .Name }}</span></a ><span class="mr-1.5"></span><span>{{ .Name }}</span></a
> >
{{ end }}<!----> {{ end }}<!---->

View file

@ -1,11 +1,18 @@
<footer class="opaco mx-auto flex h-[5rem] max-w-3xl items-center px-8 text-[0.9em] opacity-60"> <footer
class="opaco mx-auto flex h-[5rem] max-w-3xl items-center px-8 text-[0.9em] opacity-60"
>
<div class="mr-auto"> <div class="mr-auto">
&copy; {{ now.Year }} &copy; {{ now.Year }}
<a class="link" href="{{ `` | absURL }}">{{ site.Title }}</a> <a class="link" href="{{ `` | absURL }}">{{ site.Title }}</a>
</div> </div>
<a class="link mx-6" href="https://gohugo.io/" rel="noopener" target="_blank">Powered by Hugo</a <a class="link mx-6" href="https://gohugo.io/" rel="noopener" target="_blank"
>Powered by Hugo</a
> >
<a class="link" href="https://github.com/nanxiaobei/hugo-paper" rel="noopener" target="_blank" <a
class="link"
href="https://github.com/nanxiaobei/hugo-paper"
rel="noopener"
target="_blank"
>▷ Paper 6</a >▷ Paper 6</a
> >
</footer> </footer>

View file

@ -1,7 +1,10 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<!-- Title --> <!-- Title -->
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}</title> <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}</title>
@ -10,7 +13,10 @@
<meta name="theme-color" /> <meta name="theme-color" />
{{ if eq .Kind "page" }} {{ if eq .Kind "page" }}
<meta name="description" content="{{ .Summary }}" /> <meta name="description" content="{{ .Summary }}" />
<meta name="author" content="{{ .Params.Author | default site.Author.name }}" /> <meta
name="author"
content="{{ .Params.Author | default site.Author.name }}"
/>
{{ else }} {{ else }}
<meta name="description" content="{{ site.Params.description }}" /> <meta name="description" content="{{ site.Params.description }}" />
<meta name="author" content="{{ site.Author.name }}" /> <meta name="author" content="{{ site.Author.name }}" />
@ -21,7 +27,8 @@
<!----> <!---->
{{ $custom_css := resources.Get "custom.css" }} {{ $custom_css := resources.Get "custom.css" }}
<!----> <!---->
{{ $css := slice $main_css $custom_css | resources.Concat "main.css" | minify }} {{ $css := slice $main_css $custom_css | resources.Concat "main.css" | minify
}}
<link rel="preload stylesheet" as="style" href="{{ $css.Permalink }}" /> <link rel="preload stylesheet" as="style" href="{{ $css.Permalink }}" />
{{ if and .IsPage (not site.Params.disableHLJS) }} {{ if and .IsPage (not site.Params.disableHLJS) }}
@ -33,15 +40,9 @@
{{ end }} {{ end }}
<!-- Preload --> <!-- Preload -->
{{ $dark_icon := "theme.png" }} {{ $dark_icon := "theme.png" }} {{ if site.Params.monoDarkIcon }} {{
{{ if site.Params.monoDarkIcon }} $dark_icon := "theme.svg" }} {{ end }}
{{ $dark_icon := "theme.svg" }} <link rel="preload" as="image" href="{{ $dark_icon | absURL }}" />
{{ end }}
<link
rel="preload"
as="image"
href="{{ $dark_icon | absURL }}"
/>
{{ $avatar_url := $.Scratch.Get "avatar_url" }} {{ $avatar_url := $.Scratch.Get "avatar_url" }}
<!----> <!---->

View file

@ -1,6 +1,8 @@
<header class="mx-auto flex h-[5rem] max-w-3xl px-8 lg:justify-center"> <header class="mx-auto flex h-[5rem] max-w-3xl px-8 lg:justify-center">
<div class="relative z-50 mr-auto flex items-center"> <div class="relative z-50 mr-auto flex items-center">
<a class="-translate-x-[1px] -translate-y-0.5 text-3xl font-bold" href="{{ `` | absURL }}" <a
class="-translate-x-[1px] -translate-y-0.5 text-3xl font-bold"
href="{{ `` | absURL }}"
>{{ site.Title }}</a >{{ site.Title }}</a
> >
<a <a

View file

@ -1,6 +1,7 @@
<!---->{{ if not (.Get "summary") }} <!---->{{ if not (.Get "summary") }}
<!---->{{ errorf "missing param 'summary': %s" .Position }} <!---->{{ errorf "missing param 'summary': %s" .Position }}
<!---->{{ else if not (.Get "content") }}{{ warnf "missing param 'content': %s" .Position }} <!---->{{ else if not (.Get "content") }}{{ warnf "missing param 'content': %s"
.Position }}
<!---->{{ end }} <!---->{{ end }}
<details {{ if (eq (.Get `openByDefault`) true) }}open="true" {{ end }}> <details {{ if (eq (.Get `openByDefault`) true) }}open="true" {{ end }}>