From ed6f028598a27f9637db80a2e3497dd01745b7ff Mon Sep 17 00:00:00 2001 From: ro Date: Wed, 26 Jun 2024 14:08:53 -0600 Subject: [PATCH] added layout varible to sorting, updated ignore data sorting needed a new variable to differentiate between index page rendering and standard page rendering, so that was added to the return as well as updating the render script to include the variable that wasn't being added for tags also updated the git ignore file to ignore global images that are not used by the base system. the script theme folder needs to be ignore as well as that is going to updated by the theme itself for front end coding and not used by the system --- .gitignore | 26 +++++++++++++++++++----- app/Http/Controllers/ThemeController.php | 2 +- app/Services/Assets/RenderService.php | 2 +- app/Services/Data/SortingService.php | 4 +++- public/assets/scripts/theme/Base.js | 20 ++++++++---------- 5 files changed, 35 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index c50420d..491b2a5 100644 --- a/.gitignore +++ b/.gitignore @@ -33,16 +33,32 @@ yarn-error.log public/* !public/favicon.ico !public/index.php -!public/assets +!public/assets/ public/assets/* -!public/assets/css +!public/assets/css/ public/assets/css/* !public/assets/css/dash -!public/assets/scripts -!public/assets/images +!public/assets/scripts/ +!public/assets/scripts/theme/ +public/assets/scripts/theme/* +# images +!public/assets/images/ public/assets/images/* !public/assets/images/global/ -!public/assets/images/global/* +public/assets/images/global/* +# base assets used by the app +!public/assets/images/global/close.svg +!public/assets/images/global/default-avi.svg +!public/assets/images/global/default-avi-2.svg +!public/assets/images/global/default-bg.jpg +!public/assets/images/global/fipamo-logo-primary.svg +!public/assets/images/global/fipamo-logo-secondary.svg +!public/assets/images/global/menu.svg +!public/assets/images/global/sprite.svg +!public/assets/images/global/upload-audio.png +!public/assets/images/global/upload-doc.png +!public/assets/images/global/upload-video.png + !content/ content/* diff --git a/app/Http/Controllers/ThemeController.php b/app/Http/Controllers/ThemeController.php index aa038d9..96743af 100644 --- a/app/Http/Controllers/ThemeController.php +++ b/app/Http/Controllers/ThemeController.php @@ -71,7 +71,7 @@ class ThemeController extends Controller break; default: $template = $currentTheme . '.index'; - $page = $this->pages->getById('F791DED9-0359-4662-8976-4C474803D2C6'); + $page = $this->pages->getById('26245BDB-1A38-4455-80A2-7A03DE26EE33'); $pageData = $this->sort->page($page); } if ($this->member::status()) { diff --git a/app/Services/Assets/RenderService.php b/app/Services/Assets/RenderService.php index 66586d7..45ada8c 100644 --- a/app/Services/Assets/RenderService.php +++ b/app/Services/Assets/RenderService.php @@ -80,6 +80,7 @@ class RenderService 'theme' => $this->theme, // for theme kit 'title' => 'Pages Tagged as ' . $item['tag_name'], 'dynamicRender' => $data['dynamicRender'], + 'layout' => 'page', 'info' => $data['info'], 'menu' => $data['menu'], 'pages' => $item['pages'], @@ -91,7 +92,6 @@ class RenderService if (!is_dir('../public/tags')) { mkdir('../public/tags', 0755, true); } - File::put( $location, view($template) diff --git a/app/Services/Data/SortingService.php b/app/Services/Data/SortingService.php index d8a3100..df54ff3 100644 --- a/app/Services/Data/SortingService.php +++ b/app/Services/Data/SortingService.php @@ -66,6 +66,7 @@ class SortingService } $tagData = [ 'debug' => $debug, // for theme kit + 'layout' => 'page', 'tags' => $this->p_tags, 'theme' => $this->info['theme'], // for theme kit 'title' => 'Pages Tagged as Tag', @@ -152,6 +153,7 @@ class SortingService $archiveData = [ 'debug' => $debug, // for theme kit 'theme' => $this->info['theme'], // for theme kit + 'layout' => 'page', 'title' => 'Archives', 'dynamicRender' => $this->info['dynamicRender'], 'archive' => $this->p_archive, @@ -231,7 +233,6 @@ class SortingService } } } - $pageData = [ "debug" => $debug, "theme" => $this->info['theme'], @@ -243,6 +244,7 @@ class SortingService "media" => $page['media'], "files" => $page['docs'], "content" => $page['html'], + "layout" => $page['layout'], "recent" => $recent, "feature" => $featured, "tags" => $meta['tags'], diff --git a/public/assets/scripts/theme/Base.js b/public/assets/scripts/theme/Base.js index a9d7156..1cbc0c2 100644 --- a/public/assets/scripts/theme/Base.js +++ b/public/assets/scripts/theme/Base.js @@ -1,3 +1,6 @@ +import Nav from './NavControl.js'; +import Audio from './AudioControl.js'; + export default class Base { //-------------------------- // constructor @@ -5,23 +8,18 @@ export default class Base { constructor() { this.currentSlide = 0; this.slides = document.querySelectorAll('.slide'); - //alert('FRESH'); - document.getElementById('menu-open').addEventListener('click', e => { - document.getElementById('menu').style.opacity = '100%'; - document.getElementById('menu').style.visibility = 'visible'; - }); - document.getElementById('menu-close').addEventListener('click', e => { - document.getElementById('menu').style.opacity = '0'; - document.getElementById('menu').style.visibility = 'hidden'; - }); + this.nav = new Nav(); + if (document.querySelector('[role="page-meta"]')) { + let audio = new Audio(); + } this.start(); } start() { if (this.slides.length > 1) { this.slideInterval = setInterval(() => { - this.slides[this.currentSlide].className = 'hide slide'; + this.slides[this.currentSlide].className = 'hide'; this.currentSlide = (this.currentSlide + 1) % this.slides.length; - this.slides[this.currentSlide].className = 'show slide'; + this.slides[this.currentSlide].className = 'show'; }, 3000); } }