Skip to content

Commit

Permalink
chore: status metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitgentleman committed Mar 20, 2024
1 parent 47818f9 commit 09fffd7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
6 changes: 3 additions & 3 deletions quartz.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const config: QuartzConfig = {
header: "Poppins",
body: "Crimson Pro",
code: "IBM Plex Mono",
test: "Italiana",
cursive1: "Delicious Handrawn",
cursive2: "Patrick Hand SC",
// test: "Italiana",
// cursive1: "Delicious Handrawn",
// cursive2: "Patrick Hand SC",
},
colors: {
lightMode: {
Expand Down
2 changes: 1 addition & 1 deletion quartz.layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const defaultContentPageLayout: PageLayout = {
beforeBody: [
// Component.Breadcrumbs(),
Component.ArticleTitle(),
Component.ContentMeta(),
Component.ContentMeta({showComma:false}),
Component.TagList(),
],
left: [
Expand Down
16 changes: 14 additions & 2 deletions quartz/components/ContentMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default ((opts?: Partial<ContentMetaOptions>) => {

function ContentMetadata({ cfg, fileData, displayClass }: QuartzComponentProps) {
const text = fileData.text

const status = fileData.frontmatter?.status

if (text) {
const segments: (string | JSX.Element)[] = []

Expand All @@ -41,7 +42,18 @@ export default ((opts?: Partial<ContentMetaOptions>) => {
})
segments.push(displayedTime)
}

if (status) {
const linkDest = `../tags/${status}`;
const statusElement = (
<span className="essay-status">
<strong key="statusLabel">Status:</strong>
<a key="statusLink" href={linkDest} className="internal essay-status" data-tag={status}>
<span className="hash">#</span>{status}
</a>
</span>
);
segments.push(statusElement);
}
const segmentsElements = segments.map((segment) => <span>{segment}</span>)

return (
Expand Down
6 changes: 4 additions & 2 deletions quartz/styles/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ article {
.hash:not(.essay-status .hash){
color:var(--secondary);
}


}
a.internal::before{
color:var(--secondary);
}

// external links
a.external {
padding-right: 10px;
Expand Down

0 comments on commit 09fffd7

Please sign in to comment.