pagex: support pagination in content

voidcannon: pagination in editorial content
content: updates
This commit is contained in:
bignutty
2025-10-23 22:56:30 +02:00
parent f53ebe11de
commit f9139c1087
5 changed files with 50 additions and 4 deletions

2
pagex

Submodule pagex updated: 327ebd163f...059956a48a

View File

@@ -22,7 +22,7 @@ export default {
label: "Article Title (gm3)",
base: {
_transform: PagexResourceTransformer.MEDIA,
path: "../playground/assets/header/background.png"
path: "../playground/assets/header/background-street.png"
},
immersive_content: {
left: {

View File

@@ -10,6 +10,7 @@ import ContentByIdentifierTransformer from "voidcannon/src/transformers/ContentB
import playground from "../../articles/playground/playground.pagex.js";
import playgroundP3 from "../../articles/playground-p3/playground-p3.pagex.js";
import playgroundTotk from "../../articles/playground-totk/playground-totk.pagex.js";
import recentArticlesPagex from "../recent-articles/recent-articles.pagex.js";
export default {
type: VoidcannonContentType.EDITORIAL,
@@ -64,7 +65,14 @@ export default {
amount: 15
},
label: "Recent Articles",
icon: "history"
icon: "history",
cta: {
label: "View All",
target: {
type: VoidcannonContentType.EDITORIAL,
id: recentArticlesPagex.id
},
}
},
{
type: VoidcannonSectionType.CAROUSEL,

View File

@@ -0,0 +1,38 @@
import {
VoidcannonContentType,
VoidcannonSectionType
} from "voidcannon";
import {PagexResourceTransformer} from "pagex";
import CollectionContentTransformer from "voidcannon/src/transformers/CollectionContent.transformer.js";
import RecentContentTransformer from "voidcannon/src/transformers/RecentContent.transformer.js";
import ContentByIdentifierTransformer from "voidcannon/src/transformers/ContentByIdentifier.transformer.js";
import playground from "../../articles/playground/playground.pagex.js";
import playgroundP3 from "../../articles/playground-p3/playground-p3.pagex.js";
import playgroundTotk from "../../articles/playground-totk/playground-totk.pagex.js";
export default {
type: VoidcannonContentType.EDITORIAL,
id: "voidcannon-recent",
slug: "recent-articles",
paging: {
entries: {
_transform: RecentContentTransformer,
},
per_page: 3
},
name: "Recent Articles",
description: "Recent Articles",
color: null,
sections: [
{
type: VoidcannonSectionType.CONTENT_GRID,
content: "$paginationItems",
label: "Recent Articles",
icon: "history"
},
{
type: VoidcannonSectionType.PAGINATOR
}
]
}