diff --git a/web/app/Http/Controllers/Blog/BlogController.php b/web/app/Http/Controllers/Blog/BlogController.php new file mode 100644 index 0000000..05636ed --- /dev/null +++ b/web/app/Http/Controllers/Blog/BlogController.php @@ -0,0 +1,15 @@ +middleware('web') ->namespace('App\Http\Controllers\Blog') + ->name('blog.') ->group(base_path('routes/blog.php')); // diff --git a/web/resources/js/pages/Blog.js b/web/resources/js/pages/Blog.js new file mode 100644 index 0000000..39d8da1 --- /dev/null +++ b/web/resources/js/pages/Blog.js @@ -0,0 +1,33 @@ +/* + Graphictoria 5 (https://gtoria.net) + Copyright © XlXi 2022 +*/ + +import $ from 'jquery'; +import * as Bootstrap from 'bootstrap'; +import React from 'react'; + +const navId = 'gt-blog-nav'; +const hideClass = 'graphictoria-blognav-hide'; + +function scrollChanged() { + const nav = document.getElementById(navId); + const scr = document.documentElement.scrollTop; + + if(scr < Math.max(120, 330 - nav.offsetHeight)) { + if(!nav.classList.contains(hideClass)) + nav.classList.add(hideClass); + } + else + { + if(nav.classList.contains(hideClass)) + nav.classList.remove(hideClass); + } +} + +$(document).ready(function() { + if (document.getElementById(navId)) { + window.addEventListener('scroll', scrollChanged); + scrollChanged(); + } +}); \ No newline at end of file diff --git a/web/resources/sass/Graphictoria.scss b/web/resources/sass/Graphictoria.scss index 5188d16..bba18a6 100644 --- a/web/resources/sass/Graphictoria.scss +++ b/web/resources/sass/Graphictoria.scss @@ -374,7 +374,7 @@ html { background-size: cover!important; background-repeat: no-repeat!important; background-position: center!important; - height: 330px; + min-height: 330px; background: #141414; } @@ -565,6 +565,16 @@ html { } } +.graphictoria-blognav { + transition: background 100ms, border-color 100ms; + transition-timing-function: ease-out; +} + +.graphictoria-blognav-hide { + background: #ffffff00!important; + border-color: #ffffff00!important; +} + .graphictoria-nav-margin { margin-top: 63px; } diff --git a/web/resources/views/blog/404.blade.php b/web/resources/views/blog/404.blade.php new file mode 100644 index 0000000..194a706 --- /dev/null +++ b/web/resources/views/blog/404.blade.php @@ -0,0 +1,9 @@ +@extends('layouts.blog') + +@section('content') +
+@endsection \ No newline at end of file diff --git a/web/resources/views/blog/home.blade.php b/web/resources/views/blog/home.blade.php new file mode 100644 index 0000000..ce5ac46 --- /dev/null +++ b/web/resources/views/blog/home.blade.php @@ -0,0 +1,22 @@ +@extends('layouts.blog') + +@section('content') +This is an example description for this blog post. This text is meant to give the reader a brief view of what the blog post is about. Server-sided truncation will be used to prevent this card form getting too lar...
+Author | October 5, 2022
+ + + @endfor +