From e0588a6113ff6b3c1000fa6c82629f81fb5e05b5 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 15 Mar 2025 18:53:29 +0000 Subject: [refactor] move some templates to subdirs --- templates/pages/list_item.php | 11 +++++++++++ templates/pages/list_page.php | 19 +++++++++++++++++++ templates/pages/new_form.php | 26 ++++++++++++++++++++++++++ templates/pages/new_page.php | 4 ++++ templates/pages/page.php | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 96 insertions(+) create mode 100644 templates/pages/list_item.php create mode 100644 templates/pages/list_page.php create mode 100644 templates/pages/new_form.php create mode 100644 templates/pages/new_page.php create mode 100644 templates/pages/page.php (limited to 'templates/pages') diff --git a/templates/pages/list_item.php b/templates/pages/list_item.php new file mode 100644 index 0000000..3d4d2e2 --- /dev/null +++ b/templates/pages/list_item.php @@ -0,0 +1,11 @@ +getPage(); +?> + + $note->author]) ?> +
+
title) ?>
+
author->displayName) ?>
+
+
\ No newline at end of file diff --git a/templates/pages/list_page.php b/templates/pages/list_page.php new file mode 100644 index 0000000..e347e18 --- /dev/null +++ b/templates/pages/list_page.php @@ -0,0 +1,19 @@ + __('note.page.list.pageTitle')], function () { + ?> + + $note]); + } + if (count($notes) == 0) { + call_template('placeholder_text'); + } else { + call_template('placeholder_text', ['count' => Note::countWithExtension(Note::EXTENSION_PAGES) - count($notes)]); + } +}); \ No newline at end of file diff --git a/templates/pages/new_form.php b/templates/pages/new_form.php new file mode 100644 index 0000000..a8dde16 --- /dev/null +++ b/templates/pages/new_form.php @@ -0,0 +1,26 @@ +
+
+ + +
+ +
+ + + +
+ +
+ + +
+ +
+ +
+
\ No newline at end of file diff --git a/templates/pages/new_page.php b/templates/pages/new_page.php new file mode 100644 index 0000000..9bb44b4 --- /dev/null +++ b/templates/pages/new_page.php @@ -0,0 +1,4 @@ + __('note.page.new.pageTitle')], function () { + call_template('pages/new_form'); +}); \ No newline at end of file diff --git a/templates/pages/page.php b/templates/pages/page.php new file mode 100644 index 0000000..bc17664 --- /dev/null +++ b/templates/pages/page.php @@ -0,0 +1,36 @@ +getPage(); + +call_template('skeleton', ['pageTitle' => $page->title, 'renderTitleHeading' => false], function () use ($note, $page) { ?> +
+
+

title) ?>

+ + $note->author]); ?> + ' . htmlspecialchars($note->author->displayName) . '' + ) ?> + +
+ created)) ?> +
+ modified) && $note->modified != $note->created): ?> +
+ modified)) ?> +
+ +
+
+ getBestContentAsHtml() ?> +
+
+
+