Skip to content

Commit 02fc43f

Browse files
committed
merge upstream changes
2 parents bdbb1b3 + 097abc3 commit 02fc43f

File tree

5 files changed

+39
-18
lines changed

5 files changed

+39
-18
lines changed

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@clack/prompts": "^0.7.0",
3838
"@floating-ui/dom": "^1.6.3",
3939
"@napi-rs/simple-git": "0.1.16",
40-
"async-mutex": "^0.4.1",
40+
"async-mutex": "^0.5.0",
4141
"chalk": "^5.3.0",
4242
"chokidar": "^3.6.0",
4343
"cli-spinner": "^0.2.10",
@@ -103,6 +103,6 @@
103103
"esbuild": "^0.19.9",
104104
"prettier": "^3.2.4",
105105
"tsx": "^4.7.1",
106-
"typescript": "^5.3.3"
106+
"typescript": "^5.4.2"
107107
}
108108
}

quartz/components/ContentMeta.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@ import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
33
import readingTime from "reading-time"
44
import { classNames } from "../util/lang"
55
import { i18n } from "../i18n"
6+
import { JSX } from "preact"
7+
import style from "./styles/contentMeta.scss"
68

79
interface ContentMetaOptions {
810
/**
911
* Whether to display reading time
1012
*/
1113
showReadingTime: boolean
14+
showComma: boolean
1215
}
1316

1417
const defaultOptions: ContentMetaOptions = {
1518
showReadingTime: true,
19+
showComma: true,
1620
}
1721

1822
export default ((opts?: Partial<ContentMetaOptions>) => {
@@ -25,7 +29,7 @@ export default ((opts?: Partial<ContentMetaOptions>) => {
2529
if (text) {
2630
var modifiedSegment: string = ""
2731
var createdSegment: string = ""
28-
// const segments: string[] = []
32+
//const segments: (string | JSX.Element)[] = []
2933

3034
if (fileData.dates) {
3135
const cfgDefaultDataType = cfg.defaultDateType // For backward compatibility, just in case this is used somewhere else by the original author
@@ -59,16 +63,19 @@ export default ((opts?: Partial<ContentMetaOptions>) => {
5963
Created: &nbsp;{createdSegment} <br /> Modified: {modifiedSegment} <br /> {readingTimeStr}
6064
</p>
6165
)
66+
67+
/*const segmentsElements = segments.map((segment) => <span>{segment}</span>)
68+
return (
69+
<p show-comma={options.showComma} class={classNames(displayClass, "content-meta")}>
70+
{segmentsElements}
71+
</p>
72+
)*/
6273
} else {
6374
return null
6475
}
6576
}
6677

67-
ContentMetadata.css = `
68-
.content-meta {
69-
margin-top: 0;
70-
color: var(--gray);
71-
}
72-
`
78+
ContentMetadata.css = style
79+
7380
return ContentMetadata
7481
}) satisfies QuartzComponentConstructor
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.content-meta {
2+
margin-top: 0;
3+
color: var(--gray);
4+
5+
&[show-comma="true"] {
6+
> span:not(:last-child) {
7+
margin-right: 8px;
8+
9+
&::after {
10+
content: ",";
11+
}
12+
}
13+
}
14+
}

quartz/i18n/locales/fr-FR.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default {
6363
lastFewNotes: ({ count }) => `Les dernières ${count} notes`,
6464
},
6565
error: {
66-
title: "Pas trouvé",
66+
title: "Introuvable",
6767
notFound: "Cette page est soit privée, soit elle n'existe pas.",
6868
},
6969
folderContent: {

0 commit comments

Comments
 (0)