Merge pull request #2 from cssdao/develop

chore: update Node.js version and dependencies, modify footer links, …
This commit is contained in:
Henry 2024-12-27 12:36:30 +08:00 committed by GitHub
commit 1311d33063
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 75 additions and 53 deletions

View File

@ -1 +1 @@
v20.9.0 v22

View File

@ -26,7 +26,7 @@
}, },
"engines": { "engines": {
"npm": ">=9.3.1", "npm": ">=9.3.1",
"node": "20 || >=22" "node": ">=22"
}, },
"keywords": [ "keywords": [
"site generator", "site generator",

17
pnpm-lock.yaml generated
View File

@ -2387,14 +2387,14 @@ packages:
reading-time@1.5.0: reading-time@1.5.0:
resolution: {integrity: sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==} resolution: {integrity: sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==}
regex-recursion@5.0.0: regex-recursion@5.1.1:
resolution: {integrity: sha512-UwyOqeobrCCqTXPcsSqH4gDhOjD5cI/b8kjngWgSZbxYh5yVjAwTjO5+hAuPRNiuR70+5RlWSs+U9PVcVcW9Lw==} resolution: {integrity: sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==}
regex-utilities@2.3.0: regex-utilities@2.3.0:
resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==}
regex@5.0.2: regex@5.1.1:
resolution: {integrity: sha512-/pczGbKIQgfTMRV0XjABvc5RzLqQmwqxLHdQao2RTXPk+pmTXB2P0IaUHYdYyk412YLwUIkaeMd5T+RzVgTqnQ==} resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==}
rehype-autolink-headings@7.1.0: rehype-autolink-headings@7.1.0:
resolution: {integrity: sha512-rItO/pSdvnvsP4QRB1pmPiNHUskikqtPojZKJPPPAVx9Hj8i8TwMBhofrrAYRhYOOBZH9tgmG5lPqDLuIWPWmw==} resolution: {integrity: sha512-rItO/pSdvnvsP4QRB1pmPiNHUskikqtPojZKJPPPAVx9Hj8i8TwMBhofrrAYRhYOOBZH9tgmG5lPqDLuIWPWmw==}
@ -5184,8 +5184,8 @@ snapshots:
oniguruma-to-es@0.8.1: oniguruma-to-es@0.8.1:
dependencies: dependencies:
emoji-regex-xs: 1.0.0 emoji-regex-xs: 1.0.0
regex: 5.0.2 regex: 5.1.1
regex-recursion: 5.0.0 regex-recursion: 5.1.1
package-json-from-dist@1.0.1: {} package-json-from-dist@1.0.1: {}
@ -5305,13 +5305,14 @@ snapshots:
reading-time@1.5.0: {} reading-time@1.5.0: {}
regex-recursion@5.0.0: regex-recursion@5.1.1:
dependencies: dependencies:
regex: 5.1.1
regex-utilities: 2.3.0 regex-utilities: 2.3.0
regex-utilities@2.3.0: {} regex-utilities@2.3.0: {}
regex@5.0.2: regex@5.1.1:
dependencies: dependencies:
regex-utilities: 2.3.0 regex-utilities: 2.3.0

View File

@ -24,8 +24,8 @@ const config: QuartzConfig = {
fontOrigin: "googleFonts", fontOrigin: "googleFonts",
cdnCaching: true, cdnCaching: true,
typography: { typography: {
header: "Schibsted Grotesk", header: "Noto Sans Simplified Chinese",
body: "Source Sans Pro", body: "Noto Sans Simplified Chinese",
code: "IBM Plex Mono", code: "IBM Plex Mono",
}, },
colors: { colors: {

View File

@ -8,8 +8,10 @@ export const sharedPageComponents: SharedLayout = {
afterBody: [], afterBody: [],
footer: Component.Footer({ footer: Component.Footer({
links: { links: {
GitHub: "https://github.com/jackyzha0/quartz", GitHub: "https://github.com/cssdao",
"Discord Community": "https://discord.gg/cRFFHYye7t", "Discord": "https://discord.gg/Yn26BZ5x",
"X(Twitter)": "https://x.com/cssdao",
"Telegram": "https://t.me/brotherblockchain",
}, },
}), }),
} }

View File

@ -11,22 +11,21 @@ export default ((opts?: Options) => {
const Footer: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { const Footer: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
const year = new Date().getFullYear() const year = new Date().getFullYear()
const links = opts?.links ?? [] const links = opts?.links ?? []
return null return (
// ( <footer class={`${displayClass ?? ""}`}>
// <footer class={`${displayClass ?? ""}`}> {/* <p>
// <p> {i18n(cfg.locale).components.footer.createdWith}{" "}
// {i18n(cfg.locale).components.footer.createdWith}{" "} <a href="https://quartz.jzhao.xyz/">Quartz v{version}</a> © {year}
// <a href="https://quartz.jzhao.xyz/">Quartz v{version}</a> © {year} </p> */}
// </p> <ul>
// <ul> {Object.entries(links).map(([text, link]) => (
// {Object.entries(links).map(([text, link]) => ( <li>
// <li> <a href={link}>{text}</a>
// <a href={link}>{text}</a> </li>
// </li> ))}
// ))} </ul>
// </ul> </footer>
// </footer> )
// )
} }
Footer.css = style Footer.css = style

View File

@ -24,6 +24,7 @@ section {
padding: 0 0.1rem; padding: 0 0.1rem;
border-radius: 5px; border-radius: 5px;
} }
::selection { ::selection {
background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0)); background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));
color: var(--darkgray); color: var(--darkgray);
@ -90,6 +91,7 @@ a {
border-radius: 0; border-radius: 0;
padding: 0; padding: 0;
} }
&.tag-link { &.tag-link {
&::before { &::before {
content: "#"; content: "#";
@ -109,6 +111,7 @@ a {
.desktop-only { .desktop-only {
display: initial; display: initial;
@media all and ($mobile) { @media all and ($mobile) {
display: none; display: none;
} }
@ -116,6 +119,7 @@ a {
.mobile-only { .mobile-only {
display: none; display: none;
@media all and ($mobile) { @media all and ($mobile) {
display: initial; display: initial;
} }
@ -124,6 +128,7 @@ a {
.page { .page {
max-width: calc(#{map.get($breakpoints, desktop)} + 300px); max-width: calc(#{map.get($breakpoints, desktop)} + 300px);
margin: 0 auto; margin: 0 auto;
& article { & article {
&>h1 { &>h1 {
font-size: 2rem; font-size: 2rem;
@ -157,6 +162,7 @@ a {
column-gap: #{map.get($desktopGrid, columnGap)}; column-gap: #{map.get($desktopGrid, columnGap)};
row-gap: #{map.get($desktopGrid, rowGap)}; row-gap: #{map.get($desktopGrid, rowGap)};
grid-template-areas: #{map.get($desktopGrid, templateAreas)}; grid-template-areas: #{map.get($desktopGrid, templateAreas)};
@media all and ($tablet) { @media all and ($tablet) {
grid-template-columns: #{map.get($tabletGrid, templateColumns)}; grid-template-columns: #{map.get($tabletGrid, templateColumns)};
grid-template-rows: #{map.get($tabletGrid, templateRows)}; grid-template-rows: #{map.get($tabletGrid, templateRows)};
@ -164,6 +170,7 @@ a {
row-gap: #{map.get($tabletGrid, rowGap)}; row-gap: #{map.get($tabletGrid, rowGap)};
grid-template-areas: #{map.get($tabletGrid, templateAreas)}; grid-template-areas: #{map.get($tabletGrid, templateAreas)};
} }
@media all and ($mobile) { @media all and ($mobile) {
grid-template-columns: #{map.get($mobileGrid, templateColumns)}; grid-template-columns: #{map.get($mobileGrid, templateColumns)};
grid-template-rows: #{map.get($mobileGrid, templateRows)}; grid-template-rows: #{map.get($mobileGrid, templateRows)};
@ -175,6 +182,7 @@ a {
@media all and not ($desktop) { @media all and not ($desktop) {
padding: 0 1rem; padding: 0 1rem;
} }
@media all and ($mobile) { @media all and ($mobile) {
margin: 0 auto; margin: 0 auto;
} }
@ -193,6 +201,7 @@ a {
z-index: 1; z-index: 1;
grid-area: grid-sidebar-left; grid-area: grid-sidebar-left;
flex-direction: column; flex-direction: column;
@media all and ($mobile) { @media all and ($mobile) {
gap: 0; gap: 0;
align-items: center; align-items: center;
@ -209,24 +218,29 @@ a {
grid-area: grid-sidebar-right; grid-area: grid-sidebar-right;
margin-right: 0; margin-right: 0;
flex-direction: column; flex-direction: column;
@media all and ($mobile) { @media all and ($mobile) {
margin-left: inherit; margin-left: inherit;
margin-right: inherit; margin-right: inherit;
} }
@media all and not ($desktop) { @media all and not ($desktop) {
position: initial; position: initial;
height: unset; height: unset;
width: 100%; width: 100%;
flex-direction: row; flex-direction: row;
padding: 0; padding: 0;
&>* { &>* {
flex: 1; flex: 1;
} }
&>.toc { &>.toc {
display: none; display: none;
} }
} }
} }
& .page-header, & .page-header,
& .page-footer { & .page-footer {
margin-top: 1rem; margin-top: 1rem;
@ -235,6 +249,7 @@ a {
& .page-header { & .page-header {
grid-area: grid-header; grid-area: grid-header;
margin: $topSpacing 0 0 0; margin: $topSpacing 0 0 0;
@media all and ($mobile) { @media all and ($mobile) {
margin-top: 0; margin-top: 0;
padding: 0; padding: 0;
@ -255,14 +270,17 @@ a {
min-width: 100%; min-width: 100%;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@media all and ($tablet) { @media all and ($tablet) {
margin-right: 0; margin-right: 0;
} }
@media all and ($mobile) { @media all and ($mobile) {
margin-right: 0; margin-right: 0;
margin-left: 0; margin-left: 0;
} }
} }
& footer { & footer {
margin-left: 0; margin-left: 0;
} }
@ -470,7 +488,7 @@ code {
tbody, tbody,
li, li,
p { p {
line-height: 1.6rem; line-height: 1.75em;
} }
.table-container { .table-container {
@ -504,6 +522,7 @@ td {
tr { tr {
border-bottom: 1px solid var(--lightgray); border-bottom: 1px solid var(--lightgray);
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
@ -556,6 +575,7 @@ ol.overflow {
&>li:last-of-type { &>li:last-of-type {
margin-bottom: 30px; margin-bottom: 30px;
} }
/*&:after { /*&:after {
pointer-events: none; pointer-events: none;
content: ""; content: "";