add font
This commit is contained in:
@@ -35,6 +35,5 @@
|
||||
"3mhm7lcyvpm2z",
|
||||
"3mhm7litch332",
|
||||
"3mhm7lrzmep33",
|
||||
"3mhme7m5cxj34",
|
||||
"list"
|
||||
"3mhme7m5cxj34"
|
||||
]
|
||||
@@ -35,6 +35,5 @@
|
||||
"3mhm7lcyvpm2z",
|
||||
"3mhm7litch332",
|
||||
"3mhm7lrzmep33",
|
||||
"3mhme7m5cxj34",
|
||||
"list"
|
||||
"3mhme7m5cxj34"
|
||||
]
|
||||
@@ -150,6 +150,5 @@
|
||||
"3mhmdm05bt23",
|
||||
"3mhmdm06bt23",
|
||||
"3mhmdm07bt23",
|
||||
"3mhmdm08bt23",
|
||||
"list"
|
||||
"3mhmdm08bt23"
|
||||
]
|
||||
@@ -150,6 +150,5 @@
|
||||
"3mhmdm05us22",
|
||||
"3mhmdm06us22",
|
||||
"3mhmdm07us22",
|
||||
"3mhmdm08us22",
|
||||
"list"
|
||||
"3mhmdm08us22"
|
||||
]
|
||||
@@ -1,5 +1,4 @@
|
||||
[
|
||||
"3mchqlshygs2s",
|
||||
"3mf653plsl722",
|
||||
"list"
|
||||
"3mf653plsl722"
|
||||
]
|
||||
BIN
public/font/aifont.woff2
Normal file
BIN
public/font/aifont.woff2
Normal file
Binary file not shown.
@@ -65,7 +65,7 @@ pub fn run(content_dir: &Path) -> Result<()> {
|
||||
if !filename.ends_with(".json") {
|
||||
continue;
|
||||
}
|
||||
if filename == "index.json" || filename == "describe.json" || filename == "self.json" {
|
||||
if filename == "index.json" || filename == "list.json" || filename == "describe.json" || filename == "self.json" {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ async function getLocalPosts(did: string, collection: string): Promise<Post[]> {
|
||||
try {
|
||||
const listRes = await fetch(`/at/${did}/${collection}/list.json`)
|
||||
if (listRes.ok && isJsonResponse(listRes)) {
|
||||
const posts: Post[] = await listRes.json()
|
||||
const posts: Post[] = (await listRes.json()).filter((p: Post) => p && p.value && p.value.publishedAt)
|
||||
return posts.sort((a, b) =>
|
||||
new Date(b.value.publishedAt).getTime() - new Date(a.value.publishedAt).getTime()
|
||||
)
|
||||
@@ -195,7 +195,7 @@ async function getLocalPosts(did: string, collection: string): Promise<Post[]> {
|
||||
return null
|
||||
})
|
||||
)
|
||||
const posts = results.filter((p): p is Post => p !== null)
|
||||
const posts = results.filter((p): p is Post => p !== null && !!p.value && !!p.value.publishedAt)
|
||||
return posts.sort((a, b) =>
|
||||
new Date(b.value.publishedAt).getTime() - new Date(a.value.publishedAt).getTime()
|
||||
)
|
||||
@@ -221,7 +221,7 @@ export async function getPosts(did: string, collection: string, localOnly = fals
|
||||
const res = await fetchWithTimeout(url, {}, 8000)
|
||||
if (res.ok) {
|
||||
const data: ListRecordsResponse<Post> = await res.json()
|
||||
return data.records.sort((a, b) =>
|
||||
return data.records.filter(r => r && r.value && r.value.publishedAt).sort((a, b) =>
|
||||
new Date(b.value.publishedAt).getTime() - new Date(a.value.publishedAt).getTime()
|
||||
)
|
||||
}
|
||||
@@ -451,6 +451,7 @@ export async function getChatMessages(
|
||||
])
|
||||
|
||||
const messages = [...userMessages, ...botMessages]
|
||||
.filter(m => m && m.value && m.value.publishedAt)
|
||||
|
||||
// Sort by publishedAt
|
||||
return messages.sort((a, b) =>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
@font-face {
|
||||
font-family: 'aifont';
|
||||
src: url('/font/aifont.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
:root {
|
||||
--btn-color: #0066cc;
|
||||
}
|
||||
@@ -9,7 +15,7 @@
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
||||
font-family: 'aifont', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #1a1a1a;
|
||||
background: #fff;
|
||||
|
||||
Reference in New Issue
Block a user