Работа над opds

This commit is contained in:
Book Pauk
2022-11-20 19:52:10 +07:00
parent 037b42a5b4
commit aba0c206f8
4 changed files with 61 additions and 23 deletions

View File

@@ -1,4 +1,5 @@
const BasePage = require('./BasePage');
const AuthorPage = require('./AuthorPage');
class RootPage extends BasePage {
constructor(config) {
@@ -6,6 +7,8 @@ class RootPage extends BasePage {
this.id = 'root';
this.title = '';
this.authorPage = new AuthorPage(config);
}
async body() {
@@ -20,17 +23,8 @@ class RootPage extends BasePage {
this.title = 'Неизвестная коллекция';
}
result.link = [
this.navLink({rel: 'start'}),
this.navLink({rel: 'self'}),
];
result.entry = [
this.makeEntry({
id: 'author',
title: 'Авторы',
link: this.navLink({rel: 'subsection', href: '/author'}),
}),
this.authorPage.myEntry(),
];
return this.makeBody(result);