Compare commits
5 commits
v2024.08.2
...
master
Author | SHA1 | Date | |
---|---|---|---|
d8915dcca4 | |||
61f01750ff | |||
a715ae58af | |||
97d8f4447d | |||
01be7aafc6 |
9 changed files with 87 additions and 65 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -18,3 +18,6 @@ yarn-error.log
|
||||||
/.idea
|
/.idea
|
||||||
/.vscode
|
/.vscode
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
|
/log
|
||||||
|
/storage
|
||||||
|
/tmp
|
||||||
|
|
|
@ -31,13 +31,15 @@ public function getDiscordPresence(): mixed {
|
||||||
|
|
||||||
$response = Http::get('https://api.lanyard.rest/v1/users/' . Config::get('services.lanyard.user_id'));
|
$response = Http::get('https://api.lanyard.rest/v1/users/' . Config::get('services.lanyard.user_id'));
|
||||||
$data = $response->json();
|
$data = $response->json();
|
||||||
|
if (!isset($data["data"])) return null;
|
||||||
$presence = $data["data"];
|
$presence = $data["data"];
|
||||||
Cache::put('discord_presence', $presence, now()->addSeconds(60));
|
Cache::put('discord_presence', $presence, now()->addSeconds(60));
|
||||||
return $presence;
|
return $presence;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOnlineStatus(): array {
|
public function getOnlineStatus(): ?array {
|
||||||
$presence = $this->getDiscordPresence();
|
$presence = $this->getDiscordPresence();
|
||||||
|
if ($presence == null) return null;
|
||||||
return match ($presence["discord_status"]) {
|
return match ($presence["discord_status"]) {
|
||||||
"online", "dnd" => [
|
"online", "dnd" => [
|
||||||
"text" => "online",
|
"text" => "online",
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\View\Components;
|
namespace App\View\Components;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
|
use Exception;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\Config;
|
use Illuminate\Support\Facades\Config;
|
||||||
|
@ -25,11 +26,16 @@ public function getWeatherData(): mixed {
|
||||||
return Cache::get('weather_data');
|
return Cache::get('weather_data');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$response = Http::get('http://' . Config::get('services.weatherlink') . '/v1/current_conditions');
|
$response = Http::get('http://' . Config::get('services.weatherlink') . '/v1/current_conditions');
|
||||||
$data = $response->json();
|
$data = $response->json();
|
||||||
$conditions = $data["data"]["conditions"];
|
$conditions = $data["data"]["conditions"];
|
||||||
Cache::put('weather_data', $conditions, now()->addSeconds(60));
|
Cache::put('weather_data', $conditions, now()->addSeconds(60));
|
||||||
return $conditions;
|
return $conditions;
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'name' => env('APP_NAME', 'diskfloppy.me'),
|
'name' => env('APP_NAME', 'diskfloppy.me'),
|
||||||
'version' => '2024.08.22',
|
'version' => '2024.08.30',
|
||||||
'env' => env('APP_ENV', 'production'),
|
'env' => env('APP_ENV', 'production'),
|
||||||
'debug' => (bool) env('APP_DEBUG', false),
|
'debug' => (bool) env('APP_DEBUG', false),
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
|
@ -1,46 +1,39 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--suppress ALL -->
|
<!-- created with www.mysitemapgenerator.com -->
|
||||||
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
<url>
|
<url>
|
||||||
<loc>https://www.diskfloppy.me</loc>
|
<loc>https://www.diskfloppy.me/</loc>
|
||||||
<lastmod>2023-10-10</lastmod>
|
<lastmod>2024-09-01T17:44:54+01:00</lastmod>
|
||||||
<changefreq>always</changefreq>
|
<priority>1.0</priority>
|
||||||
<priority>0.5</priority>
|
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>https://www.diskfloppy.me/pub</loc>
|
<loc>https://www.diskfloppy.me/pub/</loc>
|
||||||
<lastmod>2023-10-10</lastmod>
|
<lastmod>2024-09-01T17:44:54+01:00</lastmod>
|
||||||
<changefreq>always</changefreq>
|
<priority>0.8</priority>
|
||||||
<priority>0.5</priority>
|
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>https://www.diskfloppy.me/computers</loc>
|
<loc>https://www.diskfloppy.me/computers</loc>
|
||||||
<lastmod>2023-10-10</lastmod>
|
<lastmod>2024-09-01T17:44:56+01:00</lastmod>
|
||||||
<changefreq>always</changefreq>
|
<priority>1.0</priority>
|
||||||
<priority>0.5</priority>
|
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>https://www.diskfloppy.me/guestbook</loc>
|
<loc>https://www.diskfloppy.me/calculators</loc>
|
||||||
<lastmod>2023-10-10</lastmod>
|
<lastmod>2024-09-01T17:44:56+01:00</lastmod>
|
||||||
<changefreq>always</changefreq>
|
<priority>1.0</priority>
|
||||||
<priority>0.5</priority>
|
|
||||||
</url>
|
|
||||||
<url>
|
|
||||||
<loc>https://www.diskfloppy.me/weather</loc>
|
|
||||||
<lastmod>2023-10-10</lastmod>
|
|
||||||
<changefreq>always</changefreq>
|
|
||||||
<priority>0.5</priority>
|
|
||||||
</url>
|
|
||||||
<url>
|
|
||||||
<loc>https://www.diskfloppy.me/music</loc>
|
|
||||||
<lastmod>2023-10-10</lastmod>
|
|
||||||
<changefreq>always</changefreq>
|
|
||||||
<priority>0.5</priority>
|
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>https://www.diskfloppy.me/bookmarks</loc>
|
<loc>https://www.diskfloppy.me/bookmarks</loc>
|
||||||
<lastmod>2023-10-10</lastmod>
|
<lastmod>2024-09-01T17:44:57+01:00</lastmod>
|
||||||
<changefreq>always</changefreq>
|
<priority>1.0</priority>
|
||||||
<priority>0.5</priority>
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://www.diskfloppy.me/guestbook</loc>
|
||||||
|
<lastmod>2024-09-01T17:44:57+01:00</lastmod>
|
||||||
|
<priority>1.0</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://www.diskfloppy.me/music</loc>
|
||||||
|
<lastmod>2024-09-01T17:44:58+01:00</lastmod>
|
||||||
|
<priority>1.0</priority>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
|
@ -3,9 +3,19 @@
|
||||||
@foreach($categories as $category)
|
@foreach($categories as $category)
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>{{ $category->name }}</h2>
|
<h2>{{ $category->name }}</h2>
|
||||||
|
@if($category->id == 1)
|
||||||
|
<p><em>(These are shuffled every load)</em></p>
|
||||||
|
@php
|
||||||
|
$sites = $category->sites->shuffle();
|
||||||
|
@endphp
|
||||||
|
@else
|
||||||
|
@php
|
||||||
|
$sites = $category->sites;
|
||||||
|
@endphp
|
||||||
|
@endif
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
@foreach($category->sites as $site)
|
@foreach($sites as $site)
|
||||||
<li><a href="{{ $site->url }}">{{ $site->name }}</a> - {{ $site->description }}</li>
|
<li><a href="{{ $site->url }}">{{ $site->name }}</a> - {{ $site->description }}</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
@if($status == null)
|
||||||
|
<p>Status Unavailable</p>
|
||||||
|
@else
|
||||||
<span>I'm</span>
|
<span>I'm</span>
|
||||||
<h2 class="online-status" style="color: {{ $status["color"] }};text-shadow: var(--firefox-shadow) {{ $status["color"] }}4f !important">{{ $status["text"] }}!</h2>
|
<h2 class="online-status" style="color: {{ $status["color"] }};text-shadow: var(--firefox-shadow) {{ $status["color"] }}4f !important">{{ $status["text"] }}!</h2>
|
||||||
|
@endif
|
||||||
<p><strong>Time in Britain:</strong> <span id="clock"></span></p>
|
<p><strong>Time in Britain:</strong> <span id="clock"></span></p>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<p><strong>Weather Conditions:</strong></p>
|
<p><strong>Weather Conditions:</strong></p>
|
||||||
<hr style="margin: 4px 0">
|
<hr style="margin: 4px 0">
|
||||||
|
@if($conditions == null)
|
||||||
|
<p>Data Unavailable</p>
|
||||||
|
@else
|
||||||
<p><strong>Temperature:</strong> {{ round(($conditions[0]["temp"] - 32) * (5/9), 1) }} degC</p>
|
<p><strong>Temperature:</strong> {{ round(($conditions[0]["temp"] - 32) * (5/9), 1) }} degC</p>
|
||||||
<p><strong>Rain:</strong> {{ ($conditions[0]["rain_rate_last"] * 0.2) }}mm/hr ({{ $conditions[0]["rainfall_daily"] }}mm today)</p>
|
<p><strong>Rain:</strong> {{ ($conditions[0]["rain_rate_last"] * 0.2) }}mm/hr ({{ $conditions[0]["rainfall_daily"] }}mm today)</p>
|
||||||
@if ($conditions[0]["wind_speed_last"] != 0)
|
@if ($conditions[0]["wind_speed_last"] != 0)
|
||||||
|
@ -9,3 +12,4 @@
|
||||||
@endif
|
@endif
|
||||||
<p><strong>Humidity:</strong> {{ round($conditions[0]["hum"], 1) }}%</p>
|
<p><strong>Humidity:</strong> {{ round($conditions[0]["hum"], 1) }}%</p>
|
||||||
<p><strong>Pressure:</strong> {{ round($conditions[2]["bar_sea_level"], 1) }} inHg</p>
|
<p><strong>Pressure:</strong> {{ round($conditions[2]["bar_sea_level"], 1) }} inHg</p>
|
||||||
|
@endif
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<li>Loves ETC desks, prefers Generics to LEDs for some reason</li>
|
<li>Loves ETC desks, prefers Generics to LEDs for some reason</li>
|
||||||
<li>Has a crippling Soundcraft addiction</li>
|
<li>Has a crippling Soundcraft addiction</li>
|
||||||
<li>Spends way too much time on his computer</li>
|
<li>Spends way too much time on his computer</li>
|
||||||
<li>Favorite games: <a href="https://steamcommunity.com/id/floppydisk05/recommended/420530/">OneShot</a>, Minecraft, Stardew Valley, N++ and Starbound</li>
|
<li>Favorite games: <a href="https://steamcommunity.com/id/fwoppydwisk/recommended/420530/">OneShot</a>, Minecraft, Stardew Valley, N++ and Starbound</li>
|
||||||
<li><a href="http://wxqa.com/">CWOP</a> member</li>
|
<li><a href="http://wxqa.com/">CWOP</a> member</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<li><strong>Tech Theatre</strong> - Lighting, Stage Management, etc. (<a href="https://www.controlbooth.com/members/floppydisk.28673/">ControlBooth</a>)</li>
|
<li><strong>Tech Theatre</strong> - Lighting, Stage Management, etc. (<a href="https://www.controlbooth.com/members/floppydisk.28673/">ControlBooth</a>)</li>
|
||||||
<li><strong>Programming</strong> - HTML, CSS, JavaScript, C#, Java, PHP, Ruby, Python (<a href="https://github.com/floppydisk05">GitHub</a>)</li>
|
<li><strong>Programming</strong> - HTML, CSS, JavaScript, C#, Java, PHP, Ruby, Python (<a href="https://github.com/floppydisk05">GitHub</a>)</li>
|
||||||
<li><strong>Photography</strong> - <a href="https://www.flickr.com/photos/floppydisk/">Flickr</a></li>
|
<li><strong>Photography</strong> - <a href="https://www.flickr.com/photos/floppydisk/">Flickr</a></li>
|
||||||
<li><strong>Gaming</strong> - <a href="https://steamcommunity.com/id/floppydisk05/">Steam Profile</a></li>
|
<li><strong>Gaming</strong> - <a href="https://steamcommunity.com/id/fwoppydwisk/">Steam Profile</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
|
|
Loading…
Reference in a new issue