From 5333c185a26d799c6507220303cb5ef883b44992 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 25 Feb 2024 23:03:37 +0100 Subject: [PATCH] use Tagify in edit view close #394 for a smoother tag experience ! --- app/class/Controllerpage.php | 8 ++ app/view/templates/edit.php | 7 +- app/view/templates/editleftbar.php | 2 +- assets/css/base.css | 10 ++- assets/css/edit.css | 42 +++++++++++ assets/css/theme/audrey-s-book.css | 11 +-- assets/css/theme/blue-whale.css | 5 +- assets/css/theme/dark-doriphore.css | 2 +- assets/css/theme/default.css | 2 +- assets/css/theme/funky-freddy.css | 2 +- assets/css/theme/fuzzy-flamingo.css | 4 +- assets/css/theme/industrial-dream.css | 4 +- package-lock.json | 101 ++++++++++++++++++++++++++ package.json | 1 + src/edit.js | 58 ++++++++++++++- 15 files changed, 233 insertions(+), 26 deletions(-) diff --git a/app/class/Controllerpage.php b/app/class/Controllerpage.php index 282497b9..7b7acdc8 100644 --- a/app/class/Controllerpage.php +++ b/app/class/Controllerpage.php @@ -234,6 +234,14 @@ public function edit($page) exit; } + $servicetags = new Servicetags(); + + try { + $datas['taglist'] = $servicetags->taglist(); + } catch (Filesystemexception $e) { + Logger::errorex($e); + } + $datas['faviconlist'] = $this->mediamanager->listfavicon(); $datas['thumbnaillist'] = $this->mediamanager->listthumbnail(); $datas['pagelist'] = $this->pagemanager->list(); diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php index 59200da5..afeb157d 100644 --- a/app/view/templates/edit.php +++ b/app/view/templates/edit.php @@ -1,6 +1,10 @@ layout('layout', ['title' => '✏ '.$page->title(), 'stylesheets' => [$css . 'edit.css', Wcms\Model::jspath() . 'edit.bundle.css'], 'favicon' => $page->favicon()]) ?> +$this->layout('layout', ['title' => '✏ '.$page->title(), 'stylesheets' => [ + Wcms\Model::jspath() . 'edit.bundle.css', + $css . 'edit.css', + $css . 'tagcolors.css' +], 'favicon' => $page->favicon()]) ?> @@ -33,6 +37,7 @@ const pageid = 'e($page->id()) ?>'; let pagetitle = 'e($page->title()) ?>'; let theme = 'e($workspace->highlighttheme()) ?>'; + const taglist = ; diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index a99f9ed7..97705807 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -21,7 +21,7 @@ class="toggle" - +