project -> blog
This commit is contained in:
parent
3f9cf6a057
commit
424a8d0837
10 changed files with 72 additions and 72 deletions
14
libs/types/src/config/routing.d.ts
vendored
14
libs/types/src/config/routing.d.ts
vendored
|
@ -1,6 +1,6 @@
|
|||
import { Router } from 'vue-router'
|
||||
import { BlogEntry } from '../content/templates/blog-list'
|
||||
import { GalleryEntry } from '../content/templates/gallery-list'
|
||||
import { ProjectListingInfo } from '../content/templates/project-list'
|
||||
import { TemplateType } from '../content/templates/templateType'
|
||||
import { WarningModal } from './warnings'
|
||||
|
||||
|
@ -39,10 +39,10 @@ export type MarkdownDefinition = ContentfulRouteDefintion & {
|
|||
}
|
||||
|
||||
/**
|
||||
* Defines the config for a route using the `project-list` {@link TemplateType}
|
||||
* Defines the config for a route using the `blog-list` {@link TemplateType}
|
||||
*/
|
||||
export type ProjectListDefinition = ConfigfulRouteDefinition & {
|
||||
template: 'project-list'
|
||||
export type BlogListDefinition = ConfigfulRouteDefinition & {
|
||||
template: 'blog-list'
|
||||
view: {
|
||||
stylesheetUrls: string[]
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ export type GalleryListDefinition = ConfigfulRouteDefinition & {
|
|||
*/
|
||||
export type RouteDefinition =
|
||||
| MarkdownDefinition
|
||||
| ProjectListDefinition
|
||||
| BlogListDefinition
|
||||
| GalleryListDefinition
|
||||
|
||||
/**
|
||||
|
@ -77,9 +77,9 @@ export type RouteCollection = { [key: string]: RouteDefinition }
|
|||
export interface RoutedWindow extends Window {
|
||||
/** refers to a template's primary route config; may briefly refer to sub config until a view is fully resolved */
|
||||
routeConfig: RouteDefinition
|
||||
/** refers to a template's sub config in the case of child routes under a template (e.g. project-view under project-list) */
|
||||
/** refers to a template's sub config in the case of child routes under a template (e.g. blog-view under blog-list) */
|
||||
routeSubConfig: any
|
||||
/** refers to content config for various view routes (e.g. {@link GalleryEntry}, {@link ProjectListingInfo}, etc.) */
|
||||
/** refers to content config for various view routes (e.g. {@link GalleryEntry}, {@link BlogEntry}, etc.) */
|
||||
routeContentConfig: any
|
||||
/** vue-router instance */
|
||||
router?: Router
|
||||
|
|
6
libs/types/src/content/entryTag.d.ts
vendored
6
libs/types/src/content/entryTag.d.ts
vendored
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Defines a tag used by entries in a gallery-list/project-list,
|
||||
* Defines a tag used by entries in a gallery-list/blog-list,
|
||||
* used for filtering entries from view
|
||||
*/
|
||||
export type EntryTag = {
|
||||
|
@ -19,11 +19,11 @@ export type EntryTag = {
|
|||
}
|
||||
|
||||
/**
|
||||
* Defines the list of tags in a gallery-list/project-list,
|
||||
* Defines the list of tags in a gallery-list/blog-list,
|
||||
* a key-value object where the value is the entry,
|
||||
* and the key represents the id of a tag;
|
||||
* the id of a tag must be unique,
|
||||
* and the ids specified in a gallery/project entry must match
|
||||
* and the ids specified in a gallery/blog entry must match
|
||||
* the ids specified in `EntryTagCollection` in order for them to work effectively
|
||||
*/
|
||||
export type EntryTagCollection = { [id: string]: EntryTag }
|
||||
|
|
|
@ -3,22 +3,22 @@ import type { EntryTagCollection } from '../entryTag'
|
|||
import type { EntryWithConfig, EntryWithContent } from './shared'
|
||||
|
||||
/**
|
||||
* This describes aditional information about a project.
|
||||
* to display when listing the project on the portfolio page.
|
||||
* This describes aditional information about a blog entry
|
||||
* to display when listing the entry on the blog-list page.
|
||||
* At minimum, the title should be specified.
|
||||
*/
|
||||
export type ProjectListingInfo = {
|
||||
export type BlogEntry = {
|
||||
date?: DateRange | string | number
|
||||
/**[Supports Markdown]
|
||||
* Information to summarize a project
|
||||
* Information to summarize an entry
|
||||
*/
|
||||
description?: string
|
||||
/**
|
||||
* Tags that correspond to project filters on the portfolio page if defined
|
||||
* Tags that correspond to filters on the blog-list page if defined
|
||||
*/
|
||||
tags?: string[]
|
||||
/**[Supports Markdown]
|
||||
* The title of the project
|
||||
* The title of the blog entry
|
||||
*/
|
||||
title: string
|
||||
thumbnail?: {
|
||||
|
@ -26,13 +26,13 @@ export type ProjectListingInfo = {
|
|||
}
|
||||
}
|
||||
|
||||
export type ProjectEntries = { [key: string]:
|
||||
export type BlogEntries = { [key: string]:
|
||||
& EntryWithContent
|
||||
& EntryWithConfig<ProjectListingInfo>
|
||||
& EntryWithConfig<BlogEntry>
|
||||
}
|
||||
|
||||
export type ProjectList = {
|
||||
projects: ProjectEntries
|
||||
export type BlogList = {
|
||||
entries: BlogEntries
|
||||
tags?: EntryTagCollection
|
||||
removeFromView?: boolean
|
||||
}
|
|
@ -4,5 +4,5 @@
|
|||
*/
|
||||
export type TemplateType =
|
||||
| 'markdown'
|
||||
| 'project-list'
|
||||
| 'blog-list'
|
||||
| 'gallery-list'
|
||||
|
|
2
libs/types/src/index.d.ts
vendored
2
libs/types/src/index.d.ts
vendored
|
@ -8,6 +8,6 @@ export * from './content/dateRange'
|
|||
export * from './content/entryTag'
|
||||
export * from './content/link'
|
||||
|
||||
export * from './content/templates/blog-list'
|
||||
export * from './content/templates/gallery-list'
|
||||
export * from './content/templates/project-list'
|
||||
export * from './content/templates/templateType'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue