Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic ordering #69

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/releases/Release Notes 03.14.24.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Release Notes 03.14.24
date: 03.14.23
date: 03.14.24
tags:
- releases
- demos
Expand Down Expand Up @@ -47,4 +47,4 @@ CHANGED
- API Server now uses async methods to make use of benefits of FastAPI

FIXED
- URL encoding all GET requests in honcho client
- URL encoding all GET requests in honcho client
4 changes: 2 additions & 2 deletions content/releases/Release Notes 03.21.24.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Release Notes 03.21.24
date: 03.14.23
date: 03.21.24
tags:
- releases
- announcements
Expand Down Expand Up @@ -39,4 +39,4 @@ CHANGED
FIXED
- API Response schema removed unnecessary fields
- OTEL logging to properly work with async database engine
- `fly.toml` default settings
- `fly.toml` default settings
62 changes: 60 additions & 2 deletions quartz.layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,39 @@ export const defaultContentPageLayout: PageLayout = {
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()),
Component.DesktopOnly(Component.Explorer({
sortFn: (a, b) => {
if (a.file && b.file) {
const aDate = new Date(a.file.frontmatter.date)
const bDate = new Date(b.file.frontmatter.date)
// console.log(a.file)
if (a.file.slug.includes("release")) {
console.log(a.file.frontmatter.title, a.file.frontmatter.date, aDate)
console.log(b.file.frontmatter.title, b.file.frontmatter.date, bDate)
console.log(aDate < bDate)
}
// console.log(a.file.frontmatter.title, aDate)
// console.log(b.file.frontmatter.title, bDate)
if (aDate < bDate) {
return 1
} else {
return -1
}
}
else if ((!a.file && !b.file)) {
return a.displayName.localeCompare(b.displayName, undefined, {
numeric: true,
sensitivity: "base",
})
// console.log(a.file)
}
if (a.file && !b.file) {
return 1
} else {
return -1
}
}
})),
],
right: [
Component.Graph(),
Expand All @@ -46,7 +78,33 @@ export const defaultListPageLayout: PageLayout = {
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()),
Component.DesktopOnly(Component.Explorer({
sortFn: (a, b) => {
if (a.file && b.file) {
const aDate = new Date(a.file.frontmatter.date)
const bDate = new Date(b.file.frontmatter.date)
// console.log(a.file.frontmatter.title, aDate)
// console.log(b.file.frontmatter.title, bDate)
if (aDate < bDate) {
return 1
} else {
return -1
}
}
else if ((!a.file && !b.file)) {
return a.displayName.localeCompare(b.displayName, undefined, {
numeric: true,
sensitivity: "base",
})
// console.log(a.file)
}
if (a.file && !b.file) {
return 1
} else {
return -1
}
}
})),
],
right: [],
}