added PageTop component, markdown styles, white background on logo svg, and documentation comments

This commit is contained in:
2024-09-26 23:59:47 +09:00
parent a55bd18ebc
commit e1cac6ff05
34 changed files with 3345 additions and 2113 deletions

49
utils/news.ts Normal file
View File

@@ -0,0 +1,49 @@
/**
* Types for news data
* @module utils/news
*/
/**
* Enumeration for news entry type of either article or tweet style
* @readonly
* @enum {number}
*/
export const enum EntryType {
Article,
Tweet,
}
/**
* Interface for article information
* @typedef {object} ArticleInfo
* @property {number | null} date Unix time of article creation
* @property {string | null} article content of article itself
* @property {string | null} linkPath path to the article
* @property {string | null} coverImagePath Path to the cover image
*/
interface ArticleInfo {
date: number | null;
cardContent: string | null;
article: string | null;
linkPath: string | null;
coverImagePath: string | null;
}
/**
* Interface for news
* @typedef {object} NewsEntry
* @property {number | null} date Unix time of creation
* @property {EntryType | null} entryType Type of news
* @property {string | null} cardContent Content displayed on card
* @property {string | null} linkPath Link path to the article
* @property {string | null} coverImagePath Path to the cover image
*/
interface NewsEntry {
date: number | null;
entryType: EntryType | null;
cardContent: string | null;
linkPath: string | null;
coverImagePath: string | null;
}
export type { ArticleInfo, NewsEntry };