From cdec6903f607ee786c2450072490e3b479d6c1f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer=20=28Macbook=29?= Date: Thu, 16 Jan 2020 11:05:38 +0100 Subject: [PATCH] BooksList+BooksView --- www/frames/default_frame.php | 8 +- www/pages/books_list.php | 85 +++++++--------- www/pages/books_view.php | 181 ++++++++++++++++------------------- 3 files changed, 121 insertions(+), 153 deletions(-) diff --git a/www/frames/default_frame.php b/www/frames/default_frame.php index d0221c6..9f4a928 100644 --- a/www/frames/default_frame.php +++ b/www/frames/default_frame.php @@ -16,12 +16,12 @@ require_once (__DIR__ . '/../internals/website.php'); canonical_url !== null) echo ''; - foreach ($FRAME_OPTIONS->stylesheets as $cssfile) echo ''; + if ($FRAME_OPTIONS->canonical_url !== null) echo '' . "\n"; + foreach ($FRAME_OPTIONS->stylesheets as $cssfile) echo '' . "\n"; foreach ($FRAME_OPTIONS->scripts as $scriptfile) { - if ($scriptfile[1]) echo ''; - else echo ''; + if ($scriptfile[1]) echo '' . "\n"; + else echo '' . "\n"; } ?> diff --git a/www/pages/books_list.php b/www/pages/books_list.php index fe98383..32688cc 100644 --- a/www/pages/books_list.php +++ b/www/pages/books_list.php @@ -1,64 +1,47 @@ - - - - - Mikescher.com - Converted Books - - - - - -
- +title = 'Converted Books'; +$FRAME_OPTIONS->canonical_url = 'https://www.mikescher.com/books'; +$FRAME_OPTIONS->activeHeader = 'books'; -
+$allbooks = $SITE->modules->Books()->listAllNewestFirst(); +?> -
+
-

Books/Webserials I self-printed


+

Books/Webserials I self-printed


-

- These are some books I read but that do not have an official print version.
- So I type-setted them myself (mostly in LyX) and printed them online.
- I do not own the rights of any of these books.
- The LyX files and generated PDF's are public and everyone who wants can print them on his own. -

+

+ These are some books I read but that do not have an official print version.
+ So I type-setted them myself (mostly in LyX) and printed them online.
+ I do not own the rights of any of these books.
+ The LyX files and generated PDF's are public and everyone who wants can print them on his own. +

- ' . "\n"; - foreach ($allbooks as $book) - { - echo ''; - echo '
'; - echo ' Thumbnail '  . $book['title'] . ''; - echo '
'; - echo '
'; - echo '
' . $book['date'] . '
'; - echo '
' . htmlspecialchars($book['title']) . '
'; - echo '
'; - echo '
' . "\n"; - } - echo '
' . "\n"; + echo '' . "\n"; - ?> - -
- -
- - + ?>
- - - - \ No newline at end of file diff --git a/www/pages/books_view.php b/www/pages/books_view.php index 4df3087..59de11a 100644 --- a/www/pages/books_view.php +++ b/www/pages/books_view.php @@ -1,127 +1,112 @@ - - - - - Mikescher.com - <?php echo $book['title']; ?> - - - '; ?> - - - -
- +parameter['id']; -
+$book = $SITE->modules->Books()->getBook($id); +if ($book === null) { $FRAME_OPTIONS->setForced404("Books not found"); return; } -
+$FRAME_OPTIONS->title = $book['title']; +$FRAME_OPTIONS->canonical_url = $book['url']; +$FRAME_OPTIONS->activeHeader = 'book'; -
+$FRAME_OPTIONS->addScript('/data/javascript/ms_basic.js', true); +?> -


-
-
<?php echo $book['title'] ?>
-
-
Name:
-
+
-
Pages:
-
'; - $pagi++; - } - } - ?>
+ -
- + +
- - - - \ No newline at end of file