diff --git a/.gitignore b/.gitignore index c8528f7..2e891b4 100644 --- a/.gitignore +++ b/.gitignore @@ -48,8 +48,8 @@ public/assets/images/* content/* !content/themes content/themes/* -!content/themes/fipamo-default -!content/themes/fipamo-default/* +!content/themes/fipamo-default-v2 +!content/themes/fipamo-default-v2/* *.DS_Store *.codekit3 diff --git a/app/Http/Controllers/Theming/ThemeController.php b/app/Http/Controllers/Theming/ThemeController.php new file mode 100644 index 0000000..26cbdf2 --- /dev/null +++ b/app/Http/Controllers/Theming/ThemeController.php @@ -0,0 +1,114 @@ +pages = $pageRepository; + $this->auth = $authService; + $this->themes = $themeService; + $this->sort = $sortService; + $theme = $this->themes->getCurrentTheme(); + $themeTestImagePath = '../public/theme/images/global/'; + $themeTestCSSPath = '../public/theme/css/theme/'; + $themeTestScriptsPath = '../public/theme/scripts/theme/'; + //TODO: Create assset service class to handle moving theme assets around + //move assets to public for testing + foreach ( + new \DirectoryIterator('../content/themes/' . $theme . '/assets/images/global/') as $file + ) { + if ($file->isDot()) { + continue; + } + //make theme directory if not present + if (!is_dir($themeTestImagePath)) { + mkdir($themeTestImagePath, 0755, true); + } + + if (!is_file($themeTestImagePath . $file->getFileName())) { + copy( + '../content/themes/' . + $theme . + '/assets/images/global/' . + $file->getFileName(), + $themeTestImagePath . $file->getFileName() + ); + } else { + //image is already there, so chill + } + //print $file->getFilename() . "\n"; + } + //clear test theme css and script directories + $styles = glob($themeTestCSSPath . '*'); // get all file names + foreach ($styles as $file) { // iterate files + if (is_file($file)) { + unlink($file); // delete file + } + } + $scripts = glob($themeTestScriptsPath . '*'); // get all file names + foreach ($scripts as $file) { // iterate files + if (is_file($file)) { + unlink($file); // delete file + } + } + + // + + //copy theme assets to public + $newcss = glob('../content/themes/' . $theme . '/assets/css/*'); + if (!is_dir($themeTestCSSPath)) { + mkdir($themeTestCSSPath, 0755, true); + } + foreach ($newcss as $file) { // iterate files + if (is_file($file)) { + $path = explode('/', $file); + copy($file, $themeTestCSSPath . $path[6]); + } + } + $newjs = glob('../content/themes/' . $theme . '/assets/scripts/*'); + if (!is_dir($themeTestScriptsPath)) { + mkdir($themeTestScriptsPath, 0755, true); + } + foreach ($newjs as $file) { // iterate files + if (is_file($file)) { + $path = explode('/', $file); + copy($file, $themeTestScriptsPath . $path[6]); + } + } + } + + public function getView($view) + { + if ($this->auth::status()) { + $page = $this->pages->getById('09E5A362-BA31-4AE2-9DEE-C93DFBE005C3')->first(); + $options = $this->sort->page($page); + return view('fipamo-default-v2.base', [ + "debug" => "true", + "theme" => 'fipamo-default-v2', + "status" => $this->auth::status(), + "title" => "THEME PAGE", + "page" => $page, + "info" => $options['info'], + ]); + } else { + return redirect('dashboard/start'); + } + } +} diff --git a/app/Providers/FipamoServiceProvider.php b/app/Providers/FipamoServiceProvider.php index 82af3a8..5ef4250 100644 --- a/app/Providers/FipamoServiceProvider.php +++ b/app/Providers/FipamoServiceProvider.php @@ -57,7 +57,14 @@ class FipamoServiceProvider extends ServiceProvider }); $this->app->bind(RenderService::class, function ($app) { - return new RenderService(); + return new RenderService( + new SortingService( + new SettingsService(new DocService()), + new ContentService(), + new StringService(), + ), + new SettingsService(new DocService()) + ); }); $this->app->bind(SortingService::class, function ($app) { diff --git a/app/Services/RenderService.php b/app/Services/RenderService.php index cb6c9ab..bd2a344 100644 --- a/app/Services/RenderService.php +++ b/app/Services/RenderService.php @@ -4,7 +4,49 @@ namespace App\Services; class RenderService { - public function __construct() + private $sort; + private $settings; + private $pageInfo; + private $menu; + private $background; + + public function __construct(SortingService $sortingService, SettingsService $settingsService) { + $this->sort = $sortingService; + $this->settings = $settingsService; + } + + public function tag() + { + $list = $this->sort->tags(); + foreach ($list as $item) { + $template = 'tags.twig'; + $pageOptions = [ + 'title' => 'Pages Tagged as ' . $item['tag_name'], + 'background' => $this->pageInfo['image'], + 'tag_list' => $item['pages'], + 'info' => $this->pageInfo, + 'menu' => $this->menu, + 'media' => [['file' => $this->pageInfo['image'], 'type' => trim(pathinfo($this->pageInfo['image'], PATHINFO_EXTENSION))]], + ]; + + $html = $this->twig->render($template, $pageOptions); + + $location = '../public/tags/' . $item['slug'] . '.html'; + + //if tags folder doesn't exist, make it + if (!is_dir('../public/tags')) { + mkdir('../public/tags', 0755, true); + } else { + } + + if (!is_file($location)) { + file_put_contents($location, $html); + } else { + ($new = fopen($location, 'w')) or die('Unable to open file!'); + fwrite($new, $html); + fclose($new); + } + } } } diff --git a/app/Services/SortingService.php b/app/Services/SortingService.php index 3239ac5..5ca31b2 100644 --- a/app/Services/SortingService.php +++ b/app/Services/SortingService.php @@ -223,7 +223,7 @@ class SortingService 'files' => $page['docs'], ]; } - var_dump($pageOptions); - //return $pageOptions; + //var_dump($pageOptions); + return $pageOptions; } } diff --git a/app/Services/ThemeService.php b/app/Services/ThemeService.php index 8ebef01..6145915 100644 --- a/app/Services/ThemeService.php +++ b/app/Services/ThemeService.php @@ -19,6 +19,11 @@ class ThemeService } } + public function getCurrentTheme() + { + return $this->settings->getGlobal()['theme']; + } + public function getThemes() { return $this->themes; diff --git a/config/view.php b/config/view.php index 22b8a18..538724c 100644 --- a/config/view.php +++ b/config/view.php @@ -15,6 +15,7 @@ return [ 'paths' => [ resource_path('views'), + realpath(base_path('content/themes')), ], /* diff --git a/content/themes/fipamo-default-v2/archive.twig b/content/themes/fipamo-default-v2/archive.twig new file mode 100644 index 0000000..7b97a40 --- /dev/null +++ b/content/themes/fipamo-default-v2/archive.twig @@ -0,0 +1,37 @@ +{% extends "frame.twig" %} + +{% block title %} + {{ title }} +{% endblock %} + +{% block mainContent %} +
+

{{ title }}

+ +
+ {% for item in archives %} +
+

{{ item.year }}

+ {% for data in item.year_data %} +
+

{{ data.full_month }}

+ {% for page in data.pages %} + {% if dynamicRender is defined %} + {% if dynamicRender == 'true' %} + {{ page.title }}
+ {% else %} + {{ page.title }}
+ {% endif %} + + {% else %} + {{ page.title }}
+ {% endif %} + {% endfor %} +
+ + {% endfor %} +
+ {% endfor %} +
+
+{% endblock %} \ No newline at end of file diff --git a/content/themes/fipamo-default-v2/assets/css/color.css b/content/themes/fipamo-default-v2/assets/css/color.css new file mode 100644 index 0000000..8719c4f --- /dev/null +++ b/content/themes/fipamo-default-v2/assets/css/color.css @@ -0,0 +1,9 @@ +/* BASE COLORS */ +:root { + --primary: #1d3040; + --secondary: #fc6399; + --tertiary: #f5ab35; + --highlight: #63fcc6ff; + --white: #ebe5d4; + --black: #32302f; +} diff --git a/content/themes/fipamo-default-v2/assets/css/frame.css b/content/themes/fipamo-default-v2/assets/css/frame.css new file mode 100644 index 0000000..a4e5743 --- /dev/null +++ b/content/themes/fipamo-default-v2/assets/css/frame.css @@ -0,0 +1,202 @@ +html { + margin: 0; + padding: 0; + width: 100%; + height: 100%; + overflow: hidden; + font: 400 1.2em/1.4em var(--base-type); +} + +html body { + background: var(--white); + margin: 0; + padding: 0; + perspective: 1px; + transform-style: preserve-3d; + height: 100%; + width: 100%; + overflow-y: scroll; + overflow-x: hidden; +} + +/* GLOBALS */ + +a { + color: var(--primary); + text-decoration: none; + border-bottom: 1px solid var(--secondary); + transition: all 0.2s linear; +} + +a:hover { + border-bottom: 1px solid var(--highlight); +} + +sup { + background: var(--black); + color: var(--white); + padding: 3px; + border-radius: 3px; +} + +pre, +code { + background: var(--black); + color: var(--highlight); + border-radius: 3px; + padding: 3px; +} + +/* HEADER */ + +header { + background: var(--primary); + height: 90%; + width: 100%; + border-top: var(--white) 3px solid; +} + +/* HEADER -> Slideshow */ + +header > div[role="slide-show"] { + width: 100%; + height: 90%; + position: absolute; +} + +header > div[role="slide-show"] > div[role="slide"] { + transition: all 0.7s linear; + width: 100%; + height: 100%; + position: absolute; +} + +.hide { + opacity: 0; +} + +.show { + opacity: 1; +} + +header > div[role="slide-show"] > div[role="slide"] > video { + width: 100%; + height: 100%; + object-fit: cover; +} + +/* HEADER -> Navigation */ + +nav { + width: 97%; + margin: 10px auto; + display: grid; + grid-template-columns: 50% 50%; + z-index: 1000; + position: relative; + color: var(--primary); +} + +nav img { + width: 50px; + border-bottom: none; +} + +nav div[role="nav-right"] { + margin-left: auto; + margin-right: 0; +} + +nav a[role="home-link"] { + border-bottom: none; +} + +nav a[role="menu-link"] { + background: var(--secondary); + margin-bottom: 14px; + padding: 3px; + border-radius: 2px; + display: inline-block; + font-size: 0.8em; + border-bottom: none; +} + +/* MAIN CONTENT */ +main { + z-index: 2; + background: var(--white); + line-height: 30px; + font-weight: lighter; + width: 100%; + color: var(--black); +} + +main > article { + position: relative; + background: var(--white); + vertical-align: top; + color: var(--black); + padding: 0 15%; +} + +main > article > div[role="archives"] { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + column-gap: 10px; + margin-bottom: 20px; +} + +main article div[role="archives"] h1, +main article div[role="archives"] h2, +main article div[role="archives"] h3 { + color: var(--primary); +} + +main > section { + background: var(--primary); + display: grid; + grid-template-columns: 50% 50%; + padding: 0 15%; + max-width: 1000px; + color: var(--secondary); +} + +main > section > div { + padding-bottom: 20px; +} + +main > section[role="page-meta"] > div a { + color: var(--white); +} + +/* FOOTER */ +footer { + background: var(--highlight); + padding: 30px 15%; + color: var(--primary); +} + +/* RESPONSIVE */ + +@media only screen and (max-width: 640px) { + main > article { + padding: 0 10%; + } + + main > section { + padding: 0 10%; + } + + footer { + background: var(--highlight); + padding: 30px 10%; + } +} + +@media only screen and (max-width: 480px) { + main > section { + display: inline-grid; + grid-template-columns: 50%; + width: 100%; + } +} diff --git a/content/themes/fipamo-default-v2/assets/css/start.css b/content/themes/fipamo-default-v2/assets/css/start.css new file mode 100644 index 0000000..500b0fe --- /dev/null +++ b/content/themes/fipamo-default-v2/assets/css/start.css @@ -0,0 +1,3 @@ +@import url("color.css"); +@import url("typography.css"); +@import url("frame.css"); diff --git a/content/themes/fipamo-default-v2/assets/css/typography.css b/content/themes/fipamo-default-v2/assets/css/typography.css new file mode 100644 index 0000000..cd88d74 --- /dev/null +++ b/content/themes/fipamo-default-v2/assets/css/typography.css @@ -0,0 +1,29 @@ +:root { + --base-type: helvetica, arial, sans-serif; + --mono-type: "Lucida Console", monaco, monospace; +} + +h1, +h2, +h3 { + color: var(--white); +} + +h1 { + font-size: 2em; + font-weight: 700; +} + +h2 { + font-size: 1.8em; + font-weight: 600; +} + +h3 { + font-size: 1.5em; + font-weight: 500; +} + +main > article > h1 { + color: var(--primary); +} diff --git a/content/themes/fipamo-default/assets/images/global/default-avi.png b/content/themes/fipamo-default-v2/assets/images/global/default-avi-2.png similarity index 100% rename from content/themes/fipamo-default/assets/images/global/default-avi.png rename to content/themes/fipamo-default-v2/assets/images/global/default-avi-2.png diff --git a/content/themes/fipamo-default-v2/assets/images/global/default-avi.png b/content/themes/fipamo-default-v2/assets/images/global/default-avi.png new file mode 100644 index 0000000..99ee4bb Binary files /dev/null and b/content/themes/fipamo-default-v2/assets/images/global/default-avi.png differ diff --git a/content/themes/fipamo-default/assets/images/global/default-bg.jpg b/content/themes/fipamo-default-v2/assets/images/global/default-bg.jpg similarity index 100% rename from content/themes/fipamo-default/assets/images/global/default-bg.jpg rename to content/themes/fipamo-default-v2/assets/images/global/default-bg.jpg diff --git a/content/themes/fipamo-default/assets/images/global/sprite.svg b/content/themes/fipamo-default-v2/assets/images/global/sprite.svg similarity index 100% rename from content/themes/fipamo-default/assets/images/global/sprite.svg rename to content/themes/fipamo-default-v2/assets/images/global/sprite.svg diff --git a/content/themes/fipamo-default-v2/assets/images/global/the-logo.svg b/content/themes/fipamo-default-v2/assets/images/global/the-logo.svg new file mode 100644 index 0000000..824cdc4 --- /dev/null +++ b/content/themes/fipamo-default-v2/assets/images/global/the-logo.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/themes/fipamo-default-v2/assets/scripts/Base.js b/content/themes/fipamo-default-v2/assets/scripts/Base.js new file mode 100644 index 0000000..d5fc1ad --- /dev/null +++ b/content/themes/fipamo-default-v2/assets/scripts/Base.js @@ -0,0 +1,27 @@ +export default class Base { + //-------------------------- + // constructor + //-------------------------- + constructor() { + this.currentSlide = 0; + this.slides = document.querySelectorAll('[role="slide"]'); + //alert('FRESH'); + this.start(); + } + start() { + if (this.slides.length > 1) { + this.slideInterval = setInterval(() => { + this.slides[this.currentSlide].className = 'hide'; + this.currentSlide = (this.currentSlide + 1) % this.slides.length; + this.slides[this.currentSlide].className = 'show'; + }, 3000); + } + } + //-------------------------- + // methods + //-------------------------- + + //-------------------------- + // event handlers + //-------------------------- +} diff --git a/content/themes/fipamo-default-v2/assets/scripts/ThemeStart.js b/content/themes/fipamo-default-v2/assets/scripts/ThemeStart.js new file mode 100644 index 0000000..6f275a3 --- /dev/null +++ b/content/themes/fipamo-default-v2/assets/scripts/ThemeStart.js @@ -0,0 +1,9 @@ +import Base from "./Base.js"; + +document.addEventListener( + "DOMContentLoaded", + function () { + var base = new Base(); + }, + false +); diff --git a/content/themes/fipamo-default-v2/base.blade.php b/content/themes/fipamo-default-v2/base.blade.php new file mode 100644 index 0000000..1caa6f8 --- /dev/null +++ b/content/themes/fipamo-default-v2/base.blade.php @@ -0,0 +1,103 @@ + +@php + if(isset($debug)) + { + $assetPath = '/theme/'; + }else{ + $assetPath = '/assets/'; + } +@endphp + + + + + @yield('title') + + + + + + + + + + + +
+
+ @if(count($page['media'])>1) + @foreach($page['media'] as $item) + @if($item['type'] == "mp4") +
+ +
+ @else +
+ @endif + @endforeach + @else + @if($page['media'] != '') + @if($page['media']['type'] == "mp4") +
+ +
+ @else +
+ @endif + @endif + @endif +
+ +
+
+ CONTAINTER BOY BOY +
+ + + + + diff --git a/content/themes/fipamo-default/error.twig b/content/themes/fipamo-default-v2/error.twig similarity index 100% rename from content/themes/fipamo-default/error.twig rename to content/themes/fipamo-default-v2/error.twig diff --git a/content/themes/fipamo-default-v2/frame.twig b/content/themes/fipamo-default-v2/frame.twig new file mode 100644 index 0000000..afc700b --- /dev/null +++ b/content/themes/fipamo-default-v2/frame.twig @@ -0,0 +1,110 @@ + + +{% if debug is defined %} + {% set assetPath = theme~'/assets/' %} +{% else %} + {% set assetPath = '/assets/' %} +{% endif %} + + + + + {% block title %} + {{ title }} + {% endblock %} + + + + + + + + + + + + + +
+
+ {% if media|length > 1 %} + {% for item in media %} + {% if item.type == "mp4" %} +
+ +
+ {% else %} +
+ {% endif %} + {% endfor %} + {% else %} + {% if media[0] != '' %} + {% if media[0].type == "mp4" %} +
+ +
+ {% else %} +
+ {% endif %} + {% else %} + {% endif %} + {% endif %} +
+ +
+
+ {% apply spaceless %} + {% block mainContent %}{% endblock %} + {% endapply %} +
+ + + + + \ No newline at end of file diff --git a/content/themes/fipamo-default-v2/index.twig b/content/themes/fipamo-default-v2/index.twig new file mode 100644 index 0000000..ec2156f --- /dev/null +++ b/content/themes/fipamo-default-v2/index.twig @@ -0,0 +1,57 @@ +{% extends "frame.twig" %} + +{% block title %} + {{ title }} +{% endblock %} + +{% block mainContent %} +
+

{{ title }}

+

{{ content | raw }}

+
+
+
+

RECENT

+ {% for item in recent %} + {% if dynamicRender is defined %} + {% if dynamicRender == 'true' %} + + {{ item.title }} +
+ {% else %} + + {{ item.title }} +
+ {% endif %} + + {% else %} + + {{ item.title }} +
+ {% endif %} + {% endfor %} + +
+
+

FEATURED

+ {% for item in featured %} + {% if dynamicRender is defined %} + {% if dynamicRender == 'true' %} + + {{ item.title }} +
+ {% else %} + + {{ item.title }} +
+ {% endif %} + + {% else %} + + {{ item.title }} +
+ {% endif %} + {% endfor %} +
+
+{% endblock %} \ No newline at end of file diff --git a/content/themes/fipamo-default-v2/page.twig b/content/themes/fipamo-default-v2/page.twig new file mode 100644 index 0000000..30e6fa9 --- /dev/null +++ b/content/themes/fipamo-default-v2/page.twig @@ -0,0 +1,57 @@ +{% extends "frame.twig" %} + +{% block title %} + {{ title }} +{% endblock %} + +{% block mainContent %} +
+

{{ title }}

+

{{ content | raw }}

+
+
+
+

Files

+ {% for doc in files %} + {% if doc.type != "mp3" %} + {% set path = doc.file|split('/') %} + {{ path[6] }} + + {% endif %} + {% endfor %} +
+
+

Sounds

+ {% for doc in files %} + {% if doc.type == "mp3" %} + + {% endif %} + {% endfor %} +
+
+

Info

+ {{ meta['who'] }} + dropped this + {{ meta['when'] }}
+ +
+
+

Tags

+ {% for tag in meta['tags'] %} + {% if dynamicRender is defined %} + {% if dynamicRender == 'true' %} + {{ tag.label }} + {% else %} + {{ tag.label }} + {% endif %} + {% else %} + {{ tag.label }} + {% endif %} + {% endfor %} +
+
+ + {% endblock %} \ No newline at end of file diff --git a/content/themes/fipamo-default-v2/tags.twig b/content/themes/fipamo-default-v2/tags.twig new file mode 100644 index 0000000..57a52c1 --- /dev/null +++ b/content/themes/fipamo-default-v2/tags.twig @@ -0,0 +1,23 @@ +{% extends "frame.twig" %} + +{% block title %} + {{ title }} +{% endblock %} + +{% block mainContent %} +
+

{{ title }}

+ {% for tag in tag_list %} + {% if dynamicRender is defined %} + {% if dynamicRender == 'true' %} + {{ tag.title }}
+ {% else %} + {{ tag.title }}
+ {% endif %} + + {% else %} + {{ tag.title }}
+ {% endif %} + {% endfor %} +
+{% endblock %} \ No newline at end of file diff --git a/content/themes/fipamo-default/theme.json b/content/themes/fipamo-default-v2/theme.json similarity index 100% rename from content/themes/fipamo-default/theme.json rename to content/themes/fipamo-default-v2/theme.json diff --git a/content/themes/fipamo-default/archive.twig b/content/themes/fipamo-default/archive.twig deleted file mode 100644 index 681596e..0000000 --- a/content/themes/fipamo-default/archive.twig +++ /dev/null @@ -1,45 +0,0 @@ -{% extends "frame.twig" %} - -{% block title %} - {{ title }} -{% endblock %} - - {% block mainContent %} -
-
- {{title}} -
-
-
-
- {% for item in archives %} -
- - {{item.year}} - - {% for data in item.year_data %} -
- - {{data.full_month}} - - {% for page in data.pages %} - {% if dynamicRender is defined %} - {% if dynamicRender == 'true' %} - {{page.title}}
- {% else %} - {{page.title}}
- {% endif %} - - {% else %} - {{page.title}}
- {% endif %} - {% endfor %} -
- - {% endfor %} -
- {% endfor %} - -
-
- {% endblock %} \ No newline at end of file diff --git a/content/themes/fipamo-default/assets/css/base.css b/content/themes/fipamo-default/assets/css/base.css deleted file mode 100644 index 2242b2b..0000000 --- a/content/themes/fipamo-default/assets/css/base.css +++ /dev/null @@ -1,600 +0,0 @@ -h1, h2, h3 { - color: #ebe5d4; -} - -h1 { - font-size: 2em; - font-weight: 400; -} - -h2 { - font-size: 1.75em; - font-weight: 400; -} - -h3 { - font-size: 1.5em; - font-weight: 300; -} - -html { - line-height: 1.15; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; -} - -body { - margin: 0; -} - -article, -aside, -footer, -header, -nav, -section { - display: block; -} - -h1 { - font-size: 2em; - margin: 0.67em 0; - line-height: 1em; -} - -figcaption, -figure, -main { - display: block; -} - -figure { - margin: 1em 40px; -} - -hr { - box-sizing: content-box; - height: 0; - overflow: visible; -} - -pre { - font-family: monospace, monospace; - font-size: 1em; -} - -a { - background-color: transparent; - -webkit-text-decoration-skip: objects; -} - -a:active, -a:hover { - outline-width: 0; -} - -abbr[title] { - border-bottom: none; - text-decoration: underline; - text-decoration: underline dotted; -} - -b, -strong { - font-weight: inherit; - font-weight: bolder; -} - -kbd, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -dfn { - font-style: italic; -} - -mark { - background-color: #ff0; - color: #000; -} - -small { - font-size: 80%; -} - -sub, -sup { - font-size: 60%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.55em; - background: #151d26; - color: #151d26; - border-radius: 2px; - padding: 0 2px 0 2px; - margin: 0 2px 0 0; -} - -audio, -video { - display: inline-block; -} - -audio:not([controls]) { - display: none; - height: 0; -} - -img { - border-style: none; -} - -svg:not(:root) { - overflow: hidden; -} - -button, -input, -optgroup, -select, -textarea { - font-family: sans-serif; - font-size: 100%; - line-height: 1.15; - margin: 0; -} - -button, -input { - overflow: visible; -} - -button, -select { - text-transform: none; -} - -button, html [type=button], -[type=reset], -[type=submit] { - -webkit-appearance: button; -} - -[type=button]::-moz-focus-inner, -[type=reset]::-moz-focus-inner, -[type=submit]::-moz-focus-inner, -button::-moz-focus-inner { - border-style: none; - padding: 0; -} - -[type=button]:-moz-focusring, -[type=reset]:-moz-focusring, -[type=submit]:-moz-focusring, -button:-moz-focusring { - outline: 1px dotted ButtonText; -} - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; -} - -progress { - display: inline-block; - vertical-align: baseline; -} - -textarea { - overflow: auto; -} - -[type=checkbox], -[type=radio] { - box-sizing: border-box; - padding: 0; -} - -[type=number]::-webkit-inner-spin-button, -[type=number]::-webkit-outer-spin-button { - height: auto; -} - -[type=search] { - -webkit-appearance: textfield; - outline-offset: -2px; -} - -[type=search]::-webkit-search-cancel-button, -[type=search]::-webkit-search-decoration { - -webkit-appearance: none; -} - -::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; -} - -details, -menu { - display: block; -} - -summary { - display: list-item; -} - -canvas { - display: inline-block; -} - -template { - display: none; -} - -[hidden] { - display: none; -} - -form { - display: inline-block; -} -form a { - color: #151d26; -} -form p { - background: #e8c33e; - color: #151d26; - padding: 5px; - display: block; - border-radius: 5px; - text-align: left; -} - -input[type=email], input[type=password], input[type=text] { - border: 0; - border-radius: 5px; - padding: 5px; - margin: 10px 5px 0 0; - font: 18px Helvetica, Arial, sans-serif; - display: inline-block; - background: #151d26; - color: #e8c33e; -} - -textarea { - border: 0; - border-radius: 3px; - color: #ebe5d4; - font: 15px Helvetica, Arial, sans-serif; - background: #151d26; -} - -button, input[type=submit] { - background: #7ED07E; - color: #151d26; - font: 20px Helvetica, Arial, sans-serif; - border-radius: 5px; - position: relative; - cursor: pointer; - border: 0; - padding: 10px 0 5px 0; - transition: all 0.3s linear; -} - -select { - font: 14px Helvetica, Arial, sans-serif; - border: 1px solid #FC6399; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - color: #151d26; -} - -::-webkit-input-placeholder { - font: 25px Helvetica, Arial, sans-serif; - color: #ebe5d4; -} - -:-moz-placeholder { - /* Firefox 18- */ - font: 25px Helvetica, Arial, sans-serif; - color: #ebe5d4; -} - -::-moz-placeholder { - /* Firefox 19+ */ - font: 15px Helvetica, Arial, sans-serif; - color: #ebe5d4; -} - -:-ms-input-placeholder { - font: 25px Helvetica, Arial, sans-serif; - color: #ebe5d4; -} - -html { - margin: 0; - padding: 0; - width: 100%; - height: 100%; - overflow: hidden; - font: 400 1.2em/1.4em Helvetica, Arial, sans-serif; -} -html body { - background: #ebe5d4; - margin: 0; - padding: 0; - perspective: 1px; - transform-style: preserve-3d; - height: 100%; - width: 100%; - overflow-y: scroll; - overflow-x: hidden; -} -html body a { - color: #151d26; - text-decoration: none; - border-bottom: 1px solid #7ED07E; -} -html body a:hover { - border-bottom: 1px solid #FC6399; -} -html body code { - background: #32302f; - color: #7ED07E; - border-radius: 3px; - padding: 3px; -} -html body pre { - background: #32302f; - color: #7ED07E; - border-radius: 3px; - padding: 3px; -} -html body code { - color: #FC6399; - background: none; -} -html body svg.icons { - width: 25px; - fill: #ebe5d4; -} -html body header { - background: #151d26; - height: 90%; - width: 100%; - border-top: #ebe5d4 3px solid; -} -html body header #media { - width: 100%; - height: 90%; - position: absolute; -} -html body header #media .slide { - transition: all 0.7s linear; - width: 100%; - height: 100%; - position: absolute; -} -html body header #media .hide { - opacity: 0; -} -html body header #media .show { - opacity: 1; -} -html body header #media video { - width: 100%; - height: 100%; - object-fit: cover; -} -html body header nav { - width: 97%; - margin: 10px auto; - z-index: 1000; - position: relative; - color: #151d26; -} -html body header nav .left, html body header nav .right { - width: 50%; - display: inline-block; - vertical-align: top; -} -html body header nav .left a.logo-link { - border-bottom: none; - margin: 0 0 20px 0; - display: block; -} -html body header nav .left a.logo-link #logo { - width: 50px; - border-bottom: none; -} -html body header nav .right { - text-align: right; -} -html body header nav .right a.menu-link { - background: #FC6399; - margin-bottom: 4px; - padding: 3px; - border-radius: 2px; - display: inline-block; - font-size: 0.8em; - border-bottom: none; -} -html body header nav .right a.menu-link:hover { - background: #FC6399; -} -html body .container { - z-index: 2; - background: #ebe5d4; - line-height: 30px; - font-weight: lighter; - width: 100%; - color: #32302f; -} -html body .container article { - position: relative; - width: 80%; - height: 80%; - max-width: 840px; - background: #ebe5d4; - vertical-align: top; - color: #32302f; - margin: 0 auto; -} -html body .container article .index, html body .container article .page { - padding: 0 0 15px 0; -} -html body .container article .index img, html body .container article .page img { - display: block; - width: 100%; -} -html body .container article .index h1, html body .container article .index h2, html body .container article .page h1, html body .container article .page h2 { - color: #151d26; -} -html body .container article .index p, html body .container article .page p { - font: 300 1.25em/1.6em Helvetica, Arial, sans-serif; -} -html body .container article .index .page_files .page_doc a, html body .container article .page .page_files .page_doc a { - background: #32302f; - border-radius: 3px; - color: #ebe5d4; - padding: 3px; - margin: 0 5px 0 0; -} -html body .container article .index .meta, html body .container article .page .meta { - font: 500 0.8em/1.3em Helvetica, Arial, sans-serif; - padding: 5px 0 0 0; - border-top: 1px solid #151d26; - background: #ebe5d4; -} -html body .container article .index .meta a, html body .container article .page .meta a { - font-size: 0.8em; - font-weight: 400; -} -html body .container article .index .archive-item, html body .container article .page .archive-item { - padding: 15px 0 20px 0; -} -html body .container article .index .archive-item span.year, html body .container article .page .archive-item span.year { - font-size: 1.5em; - font-weight: 500; - padding: 5px; - display: block; - color: #151d26; -} -html body .container article .index .archive-item .archive-month, html body .container article .page .archive-item .archive-month { - display: inline-block; - vertical-align: top; - width: 30%; - padding: 5px; -} -html body .container article .index .archive-item .archive-month span.month, html body .container article .page .archive-item .archive-month span.month { - color: #FC6399; - font-size: 1.5em; - font-weight: 300; - padding: 5px; - display: block; -} -html body .container section { - padding: 0 0 20px 0; - background: #151d26; -} -html body .container section a { - color: #ebe5d4; -} -html body .container section .index-lists, html body .container section .page-title { - max-width: 840px; - width: 80%; - margin: 0 auto; - padding: 20px 0 0 0; -} -html body .container section .index-lists span, html body .container section .page-title span { - font-size: 2em; - color: #FC6399; - font-weight: 400; - width: 80%; - margin: 0 auto; - padding: 20px 0 0 0; -} -html body .container section .index-lists .recent, html body .container section .index-lists .featured, html body .container section .page-title .recent, html body .container section .page-title .featured { - display: inline-block; - width: 50%; - vertical-align: top; -} -html body .container section .index-lists label, html body .container section .page-title label { - background: #32302f; - color: #ebe5d4; - font-size: 1.5em; - line-height: 1.3; -} -html body footer { - background: #ebe5d4; - padding: 10px; - color: #151d26; - font-size: 0.8em; - font-weight: 600; - height: 100px; -} -html body footer .inner { - margin: 20px auto; - width: 80%; - max-width: 840px; -} -html body footer .inner a { - color: #FC6399; -} -html body header nav { - width: 98%; -} -html body header span { - font-size: 2.5em; -} -html body header .container article .index .archive-item .archive-month, html body header .container article .page .archive-item .archive-month { - width: 45%; -} -html body header nav { - width: 96%; -} -html body header .container article .index, html body header .container article .page { - margin: 0; -} -html body header .container article .index p, html body header .container article .page p { - font: 300 1em/1.6em Helvetica, Arial, sans-serif; -} -html body header .container section .index-lists .recent, html body header .container section .index-lists .featured { - width: 100% !important; -} -html body header nav { - width: 95%; -} -html body .container article .index, html body .container article .page { - margin: 0; -} -html body .container article .index p, html body .container article .page p { - font: 300 0.9em/1.7em Helvetica, Arial, sans-serif; -} -html body .container article .index .archive-item .archive-month, html body .container article .page .archive-item .archive-month { - width: 95%; -} - -/*# sourceMappingURL=base.css.map */ diff --git a/content/themes/fipamo-default/assets/css/base.css.map b/content/themes/fipamo-default/assets/css/base.css.map deleted file mode 100644 index 361940b..0000000 --- a/content/themes/fipamo-default/assets/css/base.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sourceRoot":"","sources":["../../../styles/_typography.sass","../../../styles/_normalize.sass","../../../styles/_colors.sass","../../../styles/_forms.sass","../../../styles/_structure.sass"],"names":[],"mappings":"AAGA;EACI;;;AAEJ;EACI;EACA;;;AAEJ;EACI;EACA;;;AAEJ;EACI;EACA;;;AChBJ;EACI;EACA;EACA;;;AAEJ;EACI;;;AAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;EAMI;;;AAEJ;EACI;EACA;EACA;;;AAEJ;AAAA;AAAA;EAGI;;;AAEJ;EACI;;;AAEJ;EACI;EACA;EACA;;;AAEJ;EACI;EACA;;;AACJ;EACI;EACA;;;AAEJ;AAAA;EAEI;;;AAEJ;EACI;EACA;EACA;;;AAEJ;AAAA;EAEI;EACA;;;AAGJ;AAAA;EAEI;EACA;;;AAEJ;EACI;;;AAEJ;EACI;EACA;;;AAEJ;EACI;;;AAEJ;AAAA;EAEI;EACA;EACA;EACA;;;AAEJ;EACI;;;AAEJ;EACI;EACA,YCnFM;EDoFN,OCpFM;EDqFN;EACA;EACA;;;AAEJ;AAAA;EAEI;;;AAGA;EACI;EACA;;;AAER;EACI;;;AAGA;EACI;;;AAER;AAAA;AAAA;AAAA;AAAA;EAKI;EACA;EACA;EACA;;;AAEJ;AAAA;EAEI;;;AAEJ;AAAA;EAEI;;;AAEJ;AAAA;AAAA;EAGI;;;AAEJ;AAAA;AAAA;AAAA;EAII;EACA;;;AAEJ;AAAA;AAAA;AAAA;EAII;;;AAEJ;EACI;EACA;EACA;;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAEJ;EACI;EACA;;;AAEJ;EACI;;;AAEJ;AAAA;EAEI;EACA;;;AAEJ;AAAA;EAEI;;;AAEJ;EACI;EACA;;;AAEJ;AAAA;EAEI;;;AAEJ;EACI;EACA;;;AAEJ;AAAA;EAEI;;;AAEJ;EACI;;;AAEJ;EACI;;;AAEJ;EACI;;;AAEJ;EACI;;;AEpMJ;EACI;;AACA;EACI,ODHE;;ACIN;EACI,YDHI;ECIJ,ODNE;ECOF;EACA;EACA;EACA;;;AAER;EACI;EACA;EACA;EACA;EACA;EACA;EACA,YDnBM;ECoBN,ODlBQ;;;ACoBZ;EACI;EACA;EACA,ODrBK;ECsBL;EACA,YD3BM;;;AC6BV;EACI,YD3BS;EC4BT,OD/BM;ECgCN;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA,OD9CM;;;ACgDV;EACI;EACA,OD9CK;;;ACgDT;AACI;EACA;EACA,ODnDK;;;ACqDT;AACI;EACA;EACA,ODxDK;;;AC0DT;EACI;EACA,OD5DK;;;AEJT;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE,YFLK;EEML;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE,OFpBI;EEqBJ;EACA;;AAEA;EACE;;AAEJ;EACE,YFvBG;EEwBH,OF1BO;EE2BP;EACA;;AAEF;EACE,YF7BG;EE8BH,OFhCO;EEiCP;EACA;;AACF;EACE,OFtCO;EEuCP;;AAEF;EACE;EACA,MFxCG;;AE0CL;EACE,YF/CI;EEgDJ;EACA;EACA;;AACA;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AACF;EACE;;AACF;EACE;;AACF;EACE;EACA;EACA;;AACJ;EACE;EACA;EACA;EACA;EACA,OFzEE;;AE0EF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AACA;EACE;EACA;;AACN;EACE;;AACA;EACE,YFxFC;EEyFD;EACA;EACA;EACA;EACA;EACA;;AACA;EACE,YFhGD;;AEkGT;EACE;EACA,YFjGG;EEkGH;EACA;EACA;EAEA,OFrGG;;AEsGH;EACE;EACA;EACA;EACA;EAEA,YF7GC;EE8GD;EACA,OF9GC;EE+GD;;AAGA;EACE;;AACA;EACE;EACA;;AACF;EACE,OF7HF;;AE8HA;EACE;;AAIE;EACE,YF/HP;EEgIO;EACA,OFlIP;EEmIO;EACA;;AACN;EACE;EACA;EACA;EACA,YFzIH;;AE0IG;EACE;EACA;;AAEJ;EACE;;AACA;EACE;EACA;EACA;EACA;EACA,OFzJJ;;AE0JE;EACE;EACA;EACA;EACA;;AACA;EACE,OF/JH;EEgKG;EACA;EACA;EACA;;AACV;EACE;EACA,YFvKE;;AEwKF;EACE,OFrKD;;AEsKD;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA,OFjLC;EEkLD;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;;AACF;EACE,YFvLH;EEwLG,OFzLH;EE0LG;EACA;;AAER;EACE,YF9LG;EE+LH;EACA,OFpMI;EEqMJ;EACA;EACA;;AACA;EACE;EACA;EACA;;AACA;EACE,OF5MG;;AEkNP;EACE;;AACF;EACE;;AAKM;EACE;;AAIV;EACE;;AAGE;EACE;;AACA;EACE;;AAGF;EACE;;AAIR;EACE;;AAGA;EACE;;AACA;EACE;;AAEA;EACE","file":"base.css"} \ No newline at end of file diff --git a/content/themes/fipamo-default/assets/images/global/the-logo.svg b/content/themes/fipamo-default/assets/images/global/the-logo.svg deleted file mode 100644 index f8d21b5..0000000 --- a/content/themes/fipamo-default/assets/images/global/the-logo.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - diff --git a/content/themes/fipamo-default/assets/scripts/ThemeStart.js b/content/themes/fipamo-default/assets/scripts/ThemeStart.js deleted file mode 100644 index 6da9e18..0000000 --- a/content/themes/fipamo-default/assets/scripts/ThemeStart.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{class e{constructor(){this.currentSlide=0,this.slides=document.querySelectorAll("#media .slide"),this.start()}start(){this.slides.length>1&&(this.slideInterval=setInterval((()=>{this.slides[this.currentSlide].className="slide hide",this.currentSlide=(this.currentSlide+1)%this.slides.length,this.slides[this.currentSlide].className="slide show"}),3e3))}}document.addEventListener("DOMContentLoaded",(function(){new e}),!1)})(); -//# sourceMappingURL=ThemeStart.js.map diff --git a/content/themes/fipamo-default/assets/scripts/ThemeStart.js.map b/content/themes/fipamo-default/assets/scripts/ThemeStart.js.map deleted file mode 100644 index eebae8e..0000000 --- a/content/themes/fipamo-default/assets/scripts/ThemeStart.js.map +++ /dev/null @@ -1 +0,0 @@ -{"mappings":"4BAKIA,KAAKC,aAAe,EACpBD,KAAKE,OAASC,SAASC,iBAAiB,iBACxCJ,KAAKK,QAEPA,QACML,KAAKE,OAAOI,OAAS,IACvBN,KAAKO,cAAgBC,aAAW,KAC9BR,KAAKE,OAAOF,KAAKC,cAAcQ,UAAY,aAC3CT,KAAKC,cAAgBD,KAAKC,aAAe,GAAKD,KAAKE,OAAOI,OAC1DN,KAAKE,OAAOF,KAAKC,cAAcQ,UAAY,eAC1C,OCbTN,SAASO,iBACP,oBACA,WACa,IAAIC,KAEjB","sources":["src/themes/theme-fipamo-default/com/Base.js","src/themes/theme-fipamo-default/com/ThemeStart.js"],"sourcesContent":["export default class Base {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n this.currentSlide = 0;\n this.slides = document.querySelectorAll(\"#media .slide\");\n this.start();\n }\n start() {\n if (this.slides.length > 1) {\n this.slideInterval = setInterval(() => {\n this.slides[this.currentSlide].className = \"slide hide\";\n this.currentSlide = (this.currentSlide + 1) % this.slides.length;\n this.slides[this.currentSlide].className = \"slide show\";\n }, 3000);\n }\n }\n //--------------------------\n // methods\n //--------------------------\n\n //--------------------------\n // event handlers\n //--------------------------\n}\n","import Base from \"./Base.js\";\n\ndocument.addEventListener(\n \"DOMContentLoaded\",\n function () {\n var base = new Base();\n },\n false\n);\n"],"names":["this","currentSlide","slides","document","querySelectorAll","start","length","slideInterval","setInterval","className","addEventListener","$b8d4b81eabebe07b$export$2e2bcd8739ae039"],"version":3,"file":"ThemeStart.js.map"} \ No newline at end of file diff --git a/content/themes/fipamo-default/frame.twig b/content/themes/fipamo-default/frame.twig deleted file mode 100644 index d38ce9e..0000000 --- a/content/themes/fipamo-default/frame.twig +++ /dev/null @@ -1,112 +0,0 @@ - - -{% if debug is defined %} - {% set assetPath = '/src/themes/theme-'~theme~'/'~theme~'/assets/' %} -{% else %} - {% set assetPath = '/assets/' %} -{% endif %} - - - - - {% block title %} - {{ title }} - {% endblock %} - - - - - - - - - - - - -
-
- {% if media|length > 1 %} - {% for item in media %} - {% if item.type == "mp4"%} -
- -
- {% else %} -
- {% endif %} - {% endfor %} - {% else %} - {% if media[0] != '' %} - {% if media[0].type == "mp4"%} -
- -
- {% else %} -
- {% endif %} - {% else %} - {% endif %} - {% endif %} -
- -
-
- {% apply spaceless %} - {% block mainContent %}{% endblock %} - {% endapply %} - -
- - - - - diff --git a/content/themes/fipamo-default/index.twig b/content/themes/fipamo-default/index.twig deleted file mode 100644 index 11cba2f..0000000 --- a/content/themes/fipamo-default/index.twig +++ /dev/null @@ -1,51 +0,0 @@ -{% extends "frame.twig" %} - -{% block title %} - {{ title }} -{% endblock %} - - {% block mainContent %} -
-
-

{{title}}

-

{{ content | raw }}

- -
-
-
-
-
- RECENT
- {% for item in recent %} - {% if dynamicRender is defined %} - {% if dynamicRender == 'true' %} - {{item.title}}
- {% else %} - {{item.title}}
- {% endif %} - - {% else %} - {{item.title}}
- {% endif %} - {% endfor %} - -
- - -
-
- {% endblock %} \ No newline at end of file diff --git a/content/themes/fipamo-default/page-custom.twig b/content/themes/fipamo-default/page-custom.twig deleted file mode 100644 index 387ddf0..0000000 --- a/content/themes/fipamo-default/page-custom.twig +++ /dev/null @@ -1,60 +0,0 @@ -{% extends "frame.twig" %} - -{% block title %} - {{ title }} -{% endblock %} - - {% block mainContent %} -
-
- {{title}}
- This is a custom temlate -
-
-
-
-

{{content | raw}}

-
-
-
- Files
- {% for doc in files %} - {% if doc.type != "mp3" %} - {% set path = doc.file|split('/') %} - {{path[6]}} - - {% endif %} - {% endfor %} -
-
- Sounds
- {% for doc in files %} - {% if doc.type == "mp3" %} - - {% endif %} - {% endfor %} -
- -
-
- {{meta['who']}} dropped this {{ meta['when'] }}
- tags: - {% for tag in meta['tags'] %} - {% if dynamicRender is defined %} - {% if dynamicRender == 'true' %} - {{ tag.label }} - {% else %} - {{ tag.label }} - {% endif %} - {% else %} - {{ tag.label }} - {% endif %} - {% endfor %} - -
-
-
- {% endblock %} \ No newline at end of file diff --git a/content/themes/fipamo-default/page.twig b/content/themes/fipamo-default/page.twig deleted file mode 100644 index 896e694..0000000 --- a/content/themes/fipamo-default/page.twig +++ /dev/null @@ -1,62 +0,0 @@ -{% extends "frame.twig" %} - -{% block title %} - {{ title }} -{% endblock %} - -{% block mainContent %} -
-
- {{title}} -
-
-
-
-

{{content | raw}}

-
-
-
- Files
- {% for doc in files %} - {% if doc.type != "mp3" %} - {% set path = doc.file|split('/') %} - {{path[6]}} - - {% endif %} - {% endfor %} -
-
- Sounds
- {% for doc in files %} - {% if doc.type == "mp3" %} - - {% endif %} - {% endfor %} -
- -
-
- {{meta['who']}} - dropped this - {{ meta['when'] }}
- tags: - - {% for tag in meta['tags'] %} - {% if dynamicRender is defined %} - {% if dynamicRender == 'true' %} - {{ tag.label }} - {% else %} - {{ tag.label }} - {% endif %} - {% else %} - {{ tag.label }} - {% endif %} - {% endfor %} - -
-
-
-{% endblock %} diff --git a/content/themes/fipamo-default/tags.twig b/content/themes/fipamo-default/tags.twig deleted file mode 100644 index baa6694..0000000 --- a/content/themes/fipamo-default/tags.twig +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "frame.twig" %} - -{% block title %} - {{ title }} -{% endblock %} - - {% block mainContent %} -
-
- {{title}} -
-
-
-
- {% for tag in tag_list %} - {% if dynamicRender is defined %} - {% if dynamicRender == 'true' %} - {{tag.title}}
- {% else %} - {{tag.title}}
- {% endif %} - - {% else %} - {{tag.title}}
- {% endif %} - {% endfor %} - -
-
- {% endblock %} \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index bacd4e7..d03de29 100644 --- a/routes/web.php +++ b/routes/web.php @@ -3,6 +3,7 @@ use Illuminate\Support\Facades\Route; use App\Http\Controllers\Dash\IndexController; use App\Http\Controllers\Dash\AuthController; +use App\Http\Controllers\Theming\ThemeController; /* |-------------------------------------------------------------------------- @@ -32,3 +33,9 @@ Route::group(['prefix' => 'dashboard', 'middleware' => 'member.check'], function Route::get("/page/{mode}/{uuid}", [IndexController::class, 'page']); Route::get("/logout", [AuthController::class, 'exit']); }); + +//theming + +Route::group(['prefix' => 'theme', 'middleware' => 'member.check'], function () { + Route::get("/view/{view?}", [ThemeController::class, 'getView']); +});