diff options
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/homepage.js | 82 | ||||
-rw-r--r-- | src/page/index.js | 2 |
2 files changed, 17 insertions, 67 deletions
diff --git a/src/page/homepage.js b/src/page/homepage.js index d65b2ba7..8d06c0b6 100644 --- a/src/page/homepage.js +++ b/src/page/homepage.js @@ -13,6 +13,21 @@ import { export const description = `main wiki homepage`; +export function pathsTargetless({wikiData}) { + return [ + { + type: 'page', + path: ['home'], + + contentFunction: { + name: 'generateWikiHomePage', + args: [wikiData.homepageLayout], + }, + }, + ]; +} + +/* export function writeTargetless({wikiData}) { const {newsData, homepageLayout, wikiInfo} = wikiData; @@ -140,74 +155,9 @@ export function writeTargetless({wikiData}) { ]))), ], }, - - sidebarLeft: { - collapse: false, - wide: true, - stickyMode: 'none', - - multiple: [ - homepageLayout.sidebarContent && - transformMultiline(homepageLayout.sidebarContent, { - thumb: 'medium', - }), - - wikiInfo.enableNews && - [ - html.tag('h1', - language.$('homepage.news.title')), - - ...newsData - .slice(0, 3) - .map((entry, i) => - html.tag('article', - { - class: [ - 'news-entry', - i === 0 && 'first-news-entry', - ], - }, - [ - html.tag('h2', [ - html.tag('time', - language.formatDate(entry.date)), - link.newsEntry(entry), - ]), - - transformMultiline(entry.contentShort, { - thumb: 'medium', - }), - - entry.contentShort !== entry.content && - link.newsEntry(entry, { - text: language.$('homepage.news.entry.viewRest') - }), - ])), - ], - ], - }, - - nav: { - linkContainerClasses: ['nav-links-index'], - links: [ - link.home('', {text: wikiInfo.nameShort, class: 'current', to}), - - ...html.fragment( - homepageLayout.navbarLinks?.map(text => - transformInline(text, { - link: - withEntries(link, entries => - entries.map(([key, fn]) => - [key, bindOpts(fn, { - preferShortName: true, - })])), - }))), - ] - .filter(Boolean) - .map((html) => ({html})), - }, }), }; return [page]; } +*/ diff --git a/src/page/index.js b/src/page/index.js index fd550509..408a7e72 100644 --- a/src/page/index.js +++ b/src/page/index.js @@ -12,7 +12,7 @@ export * as artist from './artist.js'; export * as artistAlias from './artist-alias.js'; // export * as flash from './flash.js'; export * as group from './group.js'; -// export * as homepage from './homepage.js'; +export * as homepage from './homepage.js'; export * as listing from './listing.js'; // export * as news from './news.js'; export * as static from './static.js'; |