aboutsummaryrefslogtreecommitdiff
path: root/resources/views/components
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2024-06-11 18:02:01 +0100
committerGitHub <noreply@github.com>2024-06-11 18:02:01 +0100
commit0f52d80ca67a49258b235f5831163dd72fbd54cf (patch)
tree9c5cd36b6e0a233e09ac88a4409fb68c63e4781a /resources/views/components
parenta64bcc2c4639d5804b6dada23151bfcb8b198121 (diff)
Merge MVC rewrite into master (#21)
* Just commit it all * Require auth * crap * Update homepage * Block AI scrapers * Update cache update script * Add dummy file * Remove unnecessary lastfm config var * Use withQueryParameters for LastFM API * Fix embeds * Update example env * Smard
Diffstat (limited to 'resources/views/components')
-rw-r--r--resources/views/components/current-track.blade.php4
-rw-r--r--resources/views/components/layout.blade.php113
-rw-r--r--resources/views/components/minimal-error.blade.php28
-rw-r--r--resources/views/components/minimal.blade.php0
-rw-r--r--resources/views/components/navbar.blade.php18
-rw-r--r--resources/views/components/top-tracks.blade.php16
-rw-r--r--resources/views/components/track.blade.php6
7 files changed, 185 insertions, 0 deletions
diff --git a/resources/views/components/current-track.blade.php b/resources/views/components/current-track.blade.php
new file mode 100644
index 0000000..d42ad3b
--- /dev/null
+++ b/resources/views/components/current-track.blade.php
@@ -0,0 +1,4 @@
+<div class="info-table current-track">
+ <h2>Last/Current Track:</h2>
+ <a href="{{ $track["url"] }}">{{ $track["title"] }} • {{ $track["artist"] }}</a><br>
+</div>
diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.php
new file mode 100644
index 0000000..2f79318
--- /dev/null
+++ b/resources/views/components/layout.blade.php
@@ -0,0 +1,113 @@
+@php // Get colorscheme from cookie and apply immediately
+ $colorscheme = request()->cookie('colorscheme', 'catppuccin-macchiato');
+@endphp
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <!-- Global -->
+ <meta charset="utf-8">
+ <meta property="og:type" content="website">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="theme-color" content="#333333">
+ <link rel="stylesheet" href="{{ asset("/css/colorschemes/$colorscheme.css") }}" id="css-colorscheme"/>
+ <link rel="stylesheet" href="{{ asset('/css/master.css') }}"/>
+ <link rel="icon" type="image/png" href="{{ asset('/favicon-32x32.png') }}" sizes="32x32"/>
+ <link rel="icon" type="image/png" href="{{ asset('/favicon-16x16.png') }}" sizes="16x16"/>
+ <script src="{{ asset('/js/schemeSwap.js') }}"></script>
+ {!! (intval(date('n')) == 12) ? '<script src="/js/christmas/snow.js"></script>' : '' !!}
+
+ <!-- Page-specific -->
+ <title>{{ $title ?? 'Unknown' }} - diskfloppy.me</title>
+ <meta property="og:title" content="diskfloppy.me | {{ $title }}">
+ <meta property="og:image" content="/favicon-128x128.png">
+</head>
+<body onload="setSchemeSelector()">
+<div class="page">
+ <div id="header" class="header">
+ @if (auth()->check())
+ <div class="banner red-banner">
+ <div>
+ <a href="/admin/guestbook">Guestbook</a>&nbsp;|
+ <a href="/admin/bookmarks">Bookmarks</a> |
+ <a href="/admin/import">Import</a>
+ </div>
+ <div><strong>Logged in as:</strong> {{ auth()->user()->name }} (<a href="/logout">logout</a>)</div>
+ </div>
+ @endif
+ <x-navbar title="{{ $title }}"/>
+ <hr>
+ </div> <!-- header -->
+ <div id="content" class="content" role="main">
+ {{ $slot }}
+ </div> <!-- content -->
+ <div id="footer" class="footer">
+ <hr>
+ <div class="footer" role="contentinfo">
+ <a href="https://dimden.dev/" class="button">
+ <img src="https://dimden.dev/services/images/88x31.gif" width="88" height="31"
+ class="pixel" alt="dimden.dev">
+ </a>&nbsp;
+ <a href="https://www.linux.org/" class="button">
+ <img src="{{ URL::asset('images/buttons/linuxnow.gif') }}" width="88"
+ class="pixel" height="31" alt="Linux NOW!">
+ </a>&nbsp;
+ <a href="https://www.vim.org/" class="button">
+ <img src="{{ URL::asset('images/buttons/vim.gif') }}" width="88" height="31"
+ class="pixel" alt="vim">
+ </a>&nbsp;
+ <a href="https://wave.webaim.org/" class="button">
+ <img src="{{ URL::asset('images/buttons/evaluatedWAVE.png') }}" width="88" height="31"
+ class="pixel" alt="Evaluated to be accessible!">
+ </a>&nbsp;
+ <a href="https://jigsaw.w3.org/css-validator/check/referer" class="button">
+ <img src="{{ URL::asset('images/buttons/vcss-blue.gif') }}" width="88" height="31"
+ class="pixel" alt="Valid CSS!">
+ </a>&nbsp;
+ <a href="https://wiby.me/" class="button">
+ <img src="{{ URL::asset('images/buttons/wiby.gif') }}" width="88" height="31"
+ class="pixel" alt="Wiby - Search Engine for the Classic Web">
+ </a><br>
+ This site is best viewed at 1024x768 with 16-bit color or better<br>
+ &copy; floppydisk 2021-{{ date('Y') }}, v{{ config('app.version') }} <a
+ href="https://github.com/floppydisk05/diskfloppy.me">Source</a>,
+ Served by {{ gethostname() }}<br>
+ <label for="scheme-selector">Color Scheme:</label>
+ <select onchange="swapScheme(this.value)" id="scheme-selector">
+ <optgroup label="Misc">
+ <option value="c64">C64</option>
+ </optgroup>
+ <optgroup label="Light">
+ <option value="catppuccin-latte">Catppuccin Latte</option>
+ <option value="gruvbox">Gruvbox</option>
+ <option value="man-page">Man Page</option>
+ <option value="papercolor-light">Papercolor Light</option>
+ <option value="rose-pine-dawn">Rosé Pine Dawn</option>
+ <option value="solarized-light">Solarized Light</option>
+ <option value="terminal-basic">Terminal Basic</option>
+ </optgroup>
+ <optgroup label="Dark">
+ <option value="catppuccin-frappe">Catppuccin Frappé</option>
+ <option value="catppuccin-macchiato" selected="selected">Catppuccin Macchiato</option>
+ <option value="catppuccin-mocha">Catppuccin Mocha</option>
+ <option value="gruvbox-dark">Gruvbox Dark</option>
+ <option value="gruvbox-material">Gruvbox Material</option>
+ <option value="maia">Maia</option>
+ <option value="mono-amber">Mono Amber</option>
+ <option value="mono-cyan">Mono Cyan</option>
+ <option value="mono-green">Mono Green</option>
+ <option value="mono-red">Mono Red</option>
+ <option value="mono-white">Mono White</option>
+ <option value="mono-yellow">Mono Yellow</option>
+ <option value="papercolor-dark">Papercolor Dark</option>
+ <option value="rose-pine">Rosé Pine</option>
+ <option value="rose-pine-moon">Rose Pine Moon</option>
+ <option value="shel">Shel</option>
+ <option value="slate">Slate</option>
+ <option value="solarized-dark">Solarized Dark</option>
+ </optgroup>
+ </select><br>
+ </div>
+ </div> <!-- footer -->
+</div> <!-- page -->
+</body>
+</html>
diff --git a/resources/views/components/minimal-error.blade.php b/resources/views/components/minimal-error.blade.php
new file mode 100644
index 0000000..3be5511
--- /dev/null
+++ b/resources/views/components/minimal-error.blade.php
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <title>{{ $title ?? '' }}</title>
+ <link rel="stylesheet" href="{{ URL::asset ('css/minimal.css') }}"/>
+</head>
+
+<body>
+ <h1>Error {{ $code }} | <strong>{{ $message }}</strong></h1>
+ <hr align="left">
+ <p>Here, have a cat...</p>
+ <img src="https://http.cat/{{ $code }}" width="500"><br><br>
+ <p>If you believe this is a server error, contact the <a href="mailto:webmaster@diskfloppy.me">webmaster</a></p>
+ <br>
+ <h4>Diagnostic Info</h4>
+ <table><tr><td>
+ <code>
+ Server: &nbsp;{{ gethostname() }}<br>
+ Your IP: {{ Request::ip() }}<br>
+ Root: &nbsp;&nbsp;&nbsp;{!! url('') !!}<br>
+ Path: &nbsp;&nbsp;&nbsp;@if(Request::path() == "/")/@else/{{ Request::path() }}/@endif<br>
+ Epoch: &nbsp;&nbsp;{{ now()->timestamp }}<br>
+ Agent: &nbsp;&nbsp;Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0 </code>
+ </td></tr></table>
+ <hr align="left">
+ <p>&copy; floppydisk 2021-2024</p>
+</body>
+</html>
diff --git a/resources/views/components/minimal.blade.php b/resources/views/components/minimal.blade.php
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/resources/views/components/minimal.blade.php
diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php
new file mode 100644
index 0000000..80cd2b0
--- /dev/null
+++ b/resources/views/components/navbar.blade.php
@@ -0,0 +1,18 @@
+<nav>
+ <h1>diskfloppy.me | <strong>{{ $title }}</strong></h1>
+ <div class="nav-wrapper">
+ <div>
+ <a href="/" title="Home"><img class="pixel" src="/images/icons/nav/home2.png" alt="Home" width="32" height="32"></a>
+ <a href="//git.diskfloppy.me/" title="cgit"><img class="pixel" src="/images/icons/nav/repo.png" alt="cgit" width="32" height="32"></a>
+ <a href="/pub/" title="Public Files"><img class="pixel" src="/images/icons/nav/pubfiles.png" alt="Public Files" width="32" height="32"></a>
+ <a href="/computers/" title="Computers"><img class="pixel" src="/images/icons/nav/computers.png" alt="Computers" width="32" height="32"></a>
+ <a href="/bookmarks/" title="Bookmarks"><img class="pixel" src="/images/icons/nav/bookmarks.png" alt="Bookmarks" width="32" height="32"></a>
+ <a href="/guestbook/" title="Guestbook"><img class="pixel" src="/images/icons/nav/guestbook.png" alt="Guestbook" width="32" height="32"></a>
+ <a href="//weather.diskfloppy.me/" title="Weather"><img class="pixel" src="/images/icons/nav/weather.png" alt="Weather" width="32" height="32"></a>
+ <a href="/music/" title="Music"><img class="pixel" src="/images/icons/nav/music.png" alt="Music" width="32" height="32"></a>&nbsp;&nbsp;
+ </div>
+ <div>
+ <a href="/login/" title="Admin Login"><img class="pixel" src="/images/icons/nav/admin.png" alt="Admin Login" width="32" height="32"></a>&nbsp;&nbsp;
+ </div>
+ </div>
+</nav>
diff --git a/resources/views/components/top-tracks.blade.php b/resources/views/components/top-tracks.blade.php
new file mode 100644
index 0000000..a8c94f2
--- /dev/null
+++ b/resources/views/components/top-tracks.blade.php
@@ -0,0 +1,16 @@
+<table class="music-top10">
+ <caption>
+ <h2 style="margin-bottom: 5px">Top 10 Tracks (Last 30 days):</h2>
+ </caption>
+ <tr>
+ <th><b>#</b></th>
+ <th><b>Track</b></th>
+ <th><b>Artist</b></th>
+ <th><b>Plays</b></th>
+ </tr>
+ @php($count = 0)
+ @foreach ($tracks as $track)
+ @php($count++)
+ <x-track :track="$track" :count="$count"/>
+ @endforeach
+</table>
diff --git a/resources/views/components/track.blade.php b/resources/views/components/track.blade.php
new file mode 100644
index 0000000..b176e95
--- /dev/null
+++ b/resources/views/components/track.blade.php
@@ -0,0 +1,6 @@
+<tr>
+ <td>{{ $count }}</td>
+ <td><a href="{{ $track["url"] }}">{{ $track["title"] }}</a></td>
+ <td>{{ $track["artist"] }}</td>
+ <td>{{ $track["plays"] }}</td>
+</tr>