From 04fc009874db2d539ad881b649f7ebb512f05312 Mon Sep 17 00:00:00 2001 From: floppydiskette Date: Thu, 8 Aug 2024 22:22:38 +0100 Subject: Init rails app --- resources/views/components/current-track.blade.php | 4 - .../views/components/discord-status.blade.php | 3 - .../views/components/errors/api-error.blade.php | 4 - .../views/components/errors/db-error.blade.php | 4 - resources/views/components/git.blade.php | 48 ------------ resources/views/components/layout.blade.php | 88 ---------------------- resources/views/components/minimal-error.blade.php | 28 ------- resources/views/components/minimal.blade.php | 0 resources/views/components/navigation.blade.php | 30 -------- resources/views/components/never-said.blade.php | 3 - resources/views/components/settings.blade.php | 37 --------- resources/views/components/toh-quote.blade.php | 12 --- resources/views/components/top-tracks.blade.php | 18 ----- resources/views/components/track.blade.php | 6 -- resources/views/components/weather.blade.php | 11 --- 15 files changed, 296 deletions(-) delete mode 100644 resources/views/components/current-track.blade.php delete mode 100644 resources/views/components/discord-status.blade.php delete mode 100644 resources/views/components/errors/api-error.blade.php delete mode 100644 resources/views/components/errors/db-error.blade.php delete mode 100644 resources/views/components/git.blade.php delete mode 100644 resources/views/components/layout.blade.php delete mode 100644 resources/views/components/minimal-error.blade.php delete mode 100644 resources/views/components/minimal.blade.php delete mode 100644 resources/views/components/navigation.blade.php delete mode 100644 resources/views/components/never-said.blade.php delete mode 100644 resources/views/components/settings.blade.php delete mode 100644 resources/views/components/toh-quote.blade.php delete mode 100644 resources/views/components/top-tracks.blade.php delete mode 100644 resources/views/components/track.blade.php delete mode 100644 resources/views/components/weather.blade.php (limited to 'resources/views/components') diff --git a/resources/views/components/current-track.blade.php b/resources/views/components/current-track.blade.php deleted file mode 100644 index 0770240..0000000 --- a/resources/views/components/current-track.blade.php +++ /dev/null @@ -1,4 +0,0 @@ -
-

Last/Current Track:

- {{ $track["title"] }} • {{ $track["artist"] }}
-
diff --git a/resources/views/components/discord-status.blade.php b/resources/views/components/discord-status.blade.php deleted file mode 100644 index 00d2c7a..0000000 --- a/resources/views/components/discord-status.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -I'm -

{{ $status["text"] }}!

-

Time in Britain:

diff --git a/resources/views/components/errors/api-error.blade.php b/resources/views/components/errors/api-error.blade.php deleted file mode 100644 index 1d4609a..0000000 --- a/resources/views/components/errors/api-error.blade.php +++ /dev/null @@ -1,4 +0,0 @@ -
-

API Error: There was an error connecting to the API.

-

If this error persists, please notify me via e-mail.

-
diff --git a/resources/views/components/errors/db-error.blade.php b/resources/views/components/errors/db-error.blade.php deleted file mode 100644 index 45f6157..0000000 --- a/resources/views/components/errors/db-error.blade.php +++ /dev/null @@ -1,4 +0,0 @@ -
-

DB Error: There was an error connecting to the database.

-

If this error persists, please notify me via e-mail.

-
diff --git a/resources/views/components/git.blade.php b/resources/views/components/git.blade.php deleted file mode 100644 index e66a6eb..0000000 --- a/resources/views/components/git.blade.php +++ /dev/null @@ -1,48 +0,0 @@ -@php -$api_root = app('config')->get('app')['api_root']; - -$commits = json_decode(file_get_contents($api_root.'/gitdata')); -$count = 0; - -function formatRelativeTime(DateTime $dateTime) { - $currentTimestamp = time(); - $dateTimeTimestamp = $dateTime->getTimestamp(); - $difference = $currentTimestamp - $dateTimeTimestamp; - - if ($difference < 60) { - return "just now"; - } elseif ($difference < 3600) { - $minutes = floor($difference / 60); - $suffix = ($minutes > 1) ? "s" : ""; - return $minutes . " minute" . $suffix . " ago"; - } elseif ($difference < 86400) { - $hours = floor($difference / 3600); - $suffix = ($hours > 1) ? "s" : ""; - return $hours . " hour" . $suffix . " ago"; - } elseif ($difference < 604800) { - $days = floor($difference / 86400); - $suffix = ($days > 1) ? "s" : ""; - return $days . " day" . $suffix . " ago"; - } else { - return $dateTime->format('Y-m-d H:i:s'); // Fallback to a specific format if desired - } -} -@endphp -

Recent Site Updates

- -@foreach ($commits as $commit) - - @if ($count >= 5) -
- @break - @endif - @php - $date = DateTime::createFromFormat("Y-m-d\TH:i:s\Z", $commit->author->date) - @endphp - - • - {{ formatRelativeTime($date) }} - {{ $commit->message }} - -@php $count++ @endphp -@endforeach diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.php deleted file mode 100644 index 7e36de5..0000000 --- a/resources/views/components/layout.blade.php +++ /dev/null @@ -1,88 +0,0 @@ -@php // Get colorscheme from cookie and apply immediately - $colorscheme = request()->cookie('colorscheme', 'catppuccin-macchiato'); -@endphp - - - - - - - - - - - - - - - {!! (intval(date('n')) == 12) ? '' : '' !!} - - - {{ $title ?? 'Unknown' }} - {{ str_replace("www.", "", Request::getHost()) }} - - - - -
-
-
-

{{ str_replace("www.", "", Request::getHost()) }}

-
- -
-
- {{ $slot }} -
- -
- -
-
- - diff --git a/resources/views/components/minimal-error.blade.php b/resources/views/components/minimal-error.blade.php deleted file mode 100644 index 3be5511..0000000 --- a/resources/views/components/minimal-error.blade.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - {{ $title ?? '' }} - - - - -

Error {{ $code }} | {{ $message }}

-
-

Here, have a cat...

-

-

If you believe this is a server error, contact the webmaster

-
-

Diagnostic Info

-
- - Server:  {{ gethostname() }}
- Your IP: {{ Request::ip() }}
- Root:    {!! url('') !!}
- Path:    @if(Request::path() == "/")/@else/{{ Request::path() }}/@endif
- Epoch:   {{ now()->timestamp }}
- Agent:   Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0
-
-
-

© floppydisk 2021-2024

- - diff --git a/resources/views/components/minimal.blade.php b/resources/views/components/minimal.blade.php deleted file mode 100644 index e69de29..0000000 diff --git a/resources/views/components/navigation.blade.php b/resources/views/components/navigation.blade.php deleted file mode 100644 index 6c99e8c..0000000 --- a/resources/views/components/navigation.blade.php +++ /dev/null @@ -1,30 +0,0 @@ -

Navigation:

- diff --git a/resources/views/components/never-said.blade.php b/resources/views/components/never-said.blade.php deleted file mode 100644 index 9cb47b7..0000000 --- a/resources/views/components/never-said.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -

- {{ $quote["name"] }}: "{{ $quote["quote"] }}"
-

diff --git a/resources/views/components/settings.blade.php b/resources/views/components/settings.blade.php deleted file mode 100644 index 8851f6c..0000000 --- a/resources/views/components/settings.blade.php +++ /dev/null @@ -1,37 +0,0 @@ -

Site Settings:

- -
- diff --git a/resources/views/components/toh-quote.blade.php b/resources/views/components/toh-quote.blade.php deleted file mode 100644 index d9dfab1..0000000 --- a/resources/views/components/toh-quote.blade.php +++ /dev/null @@ -1,12 +0,0 @@ -

- @foreach($quote["lines"] as $line) - {{ $line["character"] }}: - {{-- Literally only one thing will trigger this lmao --}} - @if($line["line"] == "*Rage squeals*") - {{ $line["line"] }} - @else - "{{ $line["line"] }}" - @endif
- @endforeach - ({{ $quote["attribution"] }}) -

diff --git a/resources/views/components/top-tracks.blade.php b/resources/views/components/top-tracks.blade.php deleted file mode 100644 index 0b563b4..0000000 --- a/resources/views/components/top-tracks.blade.php +++ /dev/null @@ -1,18 +0,0 @@ -
- - - - - - - - - @php($count = 0) - @foreach ($tracks as $track) - @php($count++) - - @endforeach -
-

Top 10 Tracks (Last 30 days):

-
#TrackArtistPlays
-
diff --git a/resources/views/components/track.blade.php b/resources/views/components/track.blade.php deleted file mode 100644 index b176e95..0000000 --- a/resources/views/components/track.blade.php +++ /dev/null @@ -1,6 +0,0 @@ - - {{ $count }} - {{ $track["title"] }} - {{ $track["artist"] }} - {{ $track["plays"] }} - diff --git a/resources/views/components/weather.blade.php b/resources/views/components/weather.blade.php deleted file mode 100644 index b4dfcaa..0000000 --- a/resources/views/components/weather.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -

Weather Conditions:

-
-

Temperature: {{ round(($conditions[0]["temp"] - 32) * (5/9), 1) }} degC

-

Rain: {{ ($conditions[0]["rain_rate_last"] * 0.2) }}mm/hr ({{ $conditions[0]["rainfall_daily"] }}mm today)

-@if ($conditions[0]["wind_speed_last"] != 0) -

Wind: {{ round($conditions[0]["wind_speed_last"], 1) }}mph ({{ $conditions[0]["wind_dir_last"] }} deg)

-@else -

Wind: 0mph

-@endif -

Humidity: {{ round($conditions[0]["hum"], 1) }}%

-

Pressure: {{ round($conditions[2]["bar_sea_level"], 1) }} inHg

-- cgit v1.2.3-54-g00ecf