From 8650d88a794497543b1333f3e4ad5ea9bf753071 Mon Sep 17 00:00:00 2001 From: floppydiskette Date: Thu, 8 Aug 2024 15:21:30 +0100 Subject: [PATCH] Finish that shit --- app/Http/Controllers/HomeController.php | 5 +- app/View/Components/DiscordStatus.php | 66 +++ app/View/Components/Weather.php | 44 ++ config/quotes.php | 4 +- config/services.php | 6 +- public/css/master.css | 95 ++++ resources/views/calculators.blade.php | 58 +- .../views/components/current-track.blade.php | 2 +- .../views/components/discord-status.blade.php | 3 + resources/views/components/layout.blade.php | 2 +- .../views/components/online-status.blade.php | 3 - .../views/components/toh-quote.blade.php | 8 +- .../views/components/top-tracks.blade.php | 2 + resources/views/components/weather.blade.php | 18 +- resources/views/computers.blade.php | 499 +++++++++--------- resources/views/music.blade.php | 1 - 16 files changed, 519 insertions(+), 297 deletions(-) create mode 100644 app/View/Components/DiscordStatus.php create mode 100644 app/View/Components/Weather.php create mode 100644 resources/views/components/discord-status.blade.php delete mode 100644 resources/views/components/online-status.blade.php diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 7994c2c..e046d58 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -2,6 +2,9 @@ namespace App\Http\Controllers; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\Http; use Illuminate\View\View; use DateTime; @@ -24,7 +27,7 @@ function returnAge(): int { */ public function show(): View { return view('home', [ - 'age' => $this->returnAge() + 'age' => $this->returnAge(), ]); } } diff --git a/app/View/Components/DiscordStatus.php b/app/View/Components/DiscordStatus.php new file mode 100644 index 0000000..fac06ae --- /dev/null +++ b/app/View/Components/DiscordStatus.php @@ -0,0 +1,66 @@ +json(); + $presence = $data["data"]; + Cache::put('discord_presence', $presence, now()->addSeconds(60)); + return $presence; + } + + public function getOnlineStatus(): array { + $presence = $this->getDiscordPresence(); + return match ($presence["discord_status"]) { + "online", "dnd" => [ + "text" => "online", + "color" => "#02c83a" + ], + "idle" => [ + "text" => "away", + "color" => "#d77c20" + ], + default => [ + "text" => "offline", + "color" => "#ca3329" + ], + }; + } + + /** + * Get the view / contents that represent the component. + */ + public function render(): View|Closure|string + { + return view('components.discord-status', [ + 'status' => $this->getOnlineStatus(), + ]); + } +} diff --git a/app/View/Components/Weather.php b/app/View/Components/Weather.php new file mode 100644 index 0000000..69be9fd --- /dev/null +++ b/app/View/Components/Weather.php @@ -0,0 +1,44 @@ +json(); + $conditions = $data["data"]["conditions"]; + Cache::put('weather_data', $conditions, now()->addSeconds(60)); + return $conditions; + } + + /** + * Get the view / contents that represent the component. + */ + public function render(): View|Closure|string + { + return view('components.weather', [ + 'conditions' => $this->getWeatherData(), + ]); + } +} diff --git a/config/quotes.php b/config/quotes.php index c1261be..9bfd8ad 100644 --- a/config/quotes.php +++ b/config/quotes.php @@ -426,9 +426,7 @@ "lines" => [ [ "character" => "KING", - "line" => "(Rage squeals - -)" + "line" => "*Rage squeals*" ] ], "attribution" => "The Owl House, S1E10" diff --git a/config/services.php b/config/services.php index 21e97c7..aaad053 100644 --- a/config/services.php +++ b/config/services.php @@ -17,5 +17,9 @@ 'lastfm' => [ 'key' => env('LASTFM_KEY'), 'user' => env('LASTFM_USER'), - ] + ], + 'lanyard' => [ + 'user_id' => env('DISCORD_USER_ID'), + ], + 'weatherlink' => env('WEATHERLINK_IP') ]; diff --git a/public/css/master.css b/public/css/master.css index 4da69c1..fff505d 100644 --- a/public/css/master.css +++ b/public/css/master.css @@ -239,3 +239,98 @@ .quote { padding-left: 10px; border-left: solid 2px var(--foreground); } + +.music-top10 { + width: 100%; +} + +.music-top10 td, +.music-top10 th { + border: none; + border-left: 1px dotted var(--foreground); + padding: 2px 5px +} + +.music-top10 tr:nth-child(1) th { + border-bottom: 1px dotted var(--foreground); +} + +.music-top10 tr:nth-child(2) td { + padding-top: 5px; +} + +.music-top10 td:first-child, +.music-top10 th:first-child { + border: none; +} + +.music-top10 tr th:first-child { + text-align: right; +} + +.music-top10 td { + max-width: 200px; + white-space: nowrap; + text-overflow:ellipsis; + overflow: hidden; +} + +.music-top10 tr td:first-child { + text-align: right; +} + +.music-top10 tr td:nth-child(2), +.music-top10 tr td:nth-child(3) { +} + + +.current-track h2 { + margin: 0; +} + +table.computers { + table-layout: auto; + width: 75%; +} + +table.computers td ul { + margin: 0; + padding-left: 20px; +} + +table.computers .section-title { + text-decoration: underline; + font-style: italic; + font-weight: bold; +} + +table.computers p.description { + font-style: italic; + margin: 5px 0 2px 0; +} + +table.computers th { + background-color: var(--background-secondary); +} + +table.computers td:first-child { + white-space: nowrap; +} + +table.computers td, +table.computers th { + border: var(--foreground) solid 1px; + padding: 5px; +} + +.calculator-spec-table td { + border: var(--foreground) solid 1px; +} + +.calculator-spec-table td { + padding: 5px 10px 5px 5px; +} + +.calculator-spec-table tr td:first-child { + background-color: var(--background-secondary); +} diff --git a/resources/views/calculators.blade.php b/resources/views/calculators.blade.php index 7f3603b..e36ac43 100644 --- a/resources/views/calculators.blade.php +++ b/resources/views/calculators.blade.php @@ -1,18 +1,20 @@ Calculators -

CASIO fx-CG50

+
+

CASIO fx-CG50

TBD

-

Pictures

+
+

Pictures

Casio fx-CG50 Front view Casio fx-CG50 Rear view (battery cover removed) Casio fx-CG50 Front view (top half) Casio fx-CG50 Front view (bottom half) - -
- -

CASIO fx-120 (1977-78)

+
+
+

CASIO fx-120 (1977-78)

TBD

-

Specifications

+
+

Specifications

@@ -43,42 +45,40 @@
Size12-digit VFD (NEC LD8197A)
-

Pictures

-

Click images to view full size

+
+

Pictures

Casio fx-120 Front view Casio fx-120 Front view (top half) Casio fx-120 Front view (bottom half) Casio fx-120 Rear view (battery and expansion covers removed - -
- -

CASIO fx-82 (1982-85)

+
+
+

CASIO fx-82 (1982-85)

TBD

-

Pictures

-

Click images to view full size

+
+

Pictures

Casio fx-82 Front view Casio fx-82 Rear view (battery cover removed) Casio fx-82 Front view (top half) Casio fx-82 Front view (bottom half) - -
- -

Texas Instruments TI-30 (1976-90)

+
+
+

Texas Instruments TI-30 (1976-90)

TBD

-

Pictures

-

Click images to view full size

+
+

Pictures

Texas Instruments TI-30 Front view (with manual) Texas Instruments TI-30 Rear view (battery cover removed) Texas Instruments TI-30 Front view (top half) Texas Instruments TI-30 Front view (bottom half) - -
- -

Texet 880 Executive (1977-78)

+
+
+

Texet 880 Executive (1977-78)

The calculator measures 74.2mm x 135mm x 22.2mm. It weighs 86g without the battery installed, which is a 9v PP3-type battery. Rather than the usual press-stud type holder, the housing has two metal slide clips. There is also what I assume to be a sponge at one end which is supposed to aid in holding the battery in, however it appears to have gone completely hard and I will most likely replace it in the future. There's small adaptor hole at the top, of which the input isn't specified (though it's generally agreed that it's 4.5v centre-positive).

The case is black & silvery colored with a thin brushed metallic front panel. The eight-digit bubble display has an absolutely terrible viewing angle, which means you either have to be holding it under your coat or against your face to read it!

- The keypad is particularly strange in the way that it has 3 cancel buttons,
[CE]
,
[C]
and
[CA]
, while the
[CS]
button is a Clear Sign button, not another cancel! The keys themselves are particularly stiff, and you really have to push them to get them to register. Many 880s suffered something referred to as the "pseudo fixed decimal bug" where, if you typed in
1 + 1.00 = 
, it would display
2.00
instead of the expected
2
-

Specifications

+ The keypad is particularly strange in the way that it has 3 cancel buttons, [CE], [C] and [CA], while the [CS] button is a Clear Sign button, not another cancel! The keys themselves are particularly stiff, and you really have to push them to get them to register. Many 880s suffered something referred to as the "pseudo fixed decimal bug" where, if you typed in 1 + 1.00 = , it would display 2.00 instead of the expected 2 +
+

Specifications

@@ -105,10 +105,10 @@
Size8-digit LED
-

Pictures

-

Click images to view full size

+

Pictures

Texet 880 Executive Front view Texet 880 Executive Rear view (battery cover removed) Texet 880 Executive Front view (top half) Texet 880 Executive Front view (bottom half) +
diff --git a/resources/views/components/current-track.blade.php b/resources/views/components/current-track.blade.php index d42ad3b..0770240 100644 --- a/resources/views/components/current-track.blade.php +++ b/resources/views/components/current-track.blade.php @@ -1,4 +1,4 @@ -
+ diff --git a/resources/views/components/discord-status.blade.php b/resources/views/components/discord-status.blade.php new file mode 100644 index 0000000..00d2c7a --- /dev/null +++ b/resources/views/components/discord-status.blade.php @@ -0,0 +1,3 @@ +I'm +

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

+

Time in Britain:

diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.php index 294c153..1d1b22d 100644 --- a/resources/views/components/layout.blade.php +++ b/resources/views/components/layout.blade.php @@ -45,7 +45,7 @@
diff --git a/resources/views/components/online-status.blade.php b/resources/views/components/online-status.blade.php deleted file mode 100644 index 5c63deb..0000000 --- a/resources/views/components/online-status.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -I'm -

Online!

-

Time in Britain:

diff --git a/resources/views/components/toh-quote.blade.php b/resources/views/components/toh-quote.blade.php index 898b001..d9dfab1 100644 --- a/resources/views/components/toh-quote.blade.php +++ b/resources/views/components/toh-quote.blade.php @@ -1,6 +1,12 @@

@foreach($quote["lines"] as $line) - {{ $line["character"] }}: "{{ $line["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 index a8c94f2..0b563b4 100644 --- a/resources/views/components/top-tracks.blade.php +++ b/resources/views/components/top-tracks.blade.php @@ -1,3 +1,4 @@ +

Top 10 Tracks (Last 30 days):

@@ -14,3 +15,4 @@ @endforeach
+
diff --git a/resources/views/components/weather.blade.php b/resources/views/components/weather.blade.php index 09d9a37..b4dfcaa 100644 --- a/resources/views/components/weather.blade.php +++ b/resources/views/components/weather.blade.php @@ -1,7 +1,11 @@ -

Weather:

-

- 69C
- 0mm/hr
- 69%
- 420inHg -

+

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

diff --git a/resources/views/computers.blade.php b/resources/views/computers.blade.php index e188ba3..4d3457e 100644 --- a/resources/views/computers.blade.php +++ b/resources/views/computers.blade.php @@ -1,252 +1,253 @@ Computers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MODELCPUGPUSTORAGERAMOS
Random Whitebox
(???)
486DX2280MB HDD16MBMS-DOS 6.22 & Windows for Workgroups 3.11
MacBook Pro 14"
(2023)
M3 Pro500GB SSD18GBmacOS Sonoma
MacBook Pro 13"
(2018)
Intel i5-8592U (2.3GHz)Intel Iris Plus 655250GB SSD8GBmacOS Mojave
Lenovo ThinkPad T430
(2012)
Intel Core i7 (idk what it is)16GBWindows 7 Pro / NixOS
IBM ThinkPad X41T
(2005)
Intel Pentium M (1.6GHz)Mobile Intel Express Chipset (128MB)40GB HDD1.5GBWindows XP Tablet PC Edition
Dell OptiPlex GX1
(1999)
Intel Pentium II (Deschutes, 400MHz)ATI 3D Rage Pro (4MB)40GB HDD639MBWindows 2000
IBM ThinkPad T40
(2003)
Intel Pentium M (1.3GHz)ATI Mobility Radeon 7500 (32MB)N/AN/AN/A
HP Compaq Elite 8100
(2010)
Intel Core i7 (something or other)16GBWindows Vista Ultimate (64-bit)
Mac mini
(2014)
Intel Core i5-4278U (2.6GHz)Intel Iris Graphics1TB HDD8GBProxmox VE 8.2
Fujitsu Milan
(1996)
Intel Pentium1215MB HDD32MBWindows 98 SE
Compaq Armada M300
(1999)
Intel Pentium III
SuperMicro X9SCMIntel Pentium G850 (2.9GHz)Matrox MGA G6200eW2TB HDD / 80GB HDD16GBProxmox VE 8.2
Main PCIntel Core i7-6700K (4GHz)NVidia GTX 1060 (3GB)(multiple)64GBWindows 10 Pro / NixOS
Toshiba Qosmio F20
(2005)
N/AN/A
MacBook Pro 13"
(2009)
N/AN/A
Packard-Bell EasyNote MIT-LYN01
(???)
Windows XP Home
Sony VAIO PCG-3B1M
(???)
Windows Vista
Dell OptiPlex 745 USFF
(2006)
Intel Pentium Dual CoreIntel Integrated(multiple)4GB(multiple)
Dell Inspiron 1525
(2008)
N/AN/A
Random Whitebox 2AMD Phenom II X6-1055T8GBN/A
Dell Latitude D531
(2007)
Windows XP Professional
IBM ThinkPad R40
(2003)
Windows 2000
Dell Latitude CPi
(2001)
Windows 2000
Dell Latitude CPx
(1999)
Windows 98 SE
Dell Latitude 4898T
(???)
N/AN/A
Time 8375
(???)
N/AN/A
Toshiba Satellite 200CDS
(1996)
HP Compaq NC6000
(2004)
N/AN/A
IBM Personal Computer 330
(1997)
Intel PentiumN/AN/A
Shuttle XPC SN21G5
(2006)
AMD Athlon 64 X2N/AN/A
+

TBD

+{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{-- --}} +{{--
MODELCPUGPUSTORAGERAMOS
Random Whitebox
(???)
486DX2280MB HDD16MBMS-DOS 6.22 & Windows for Workgroups 3.11
MacBook Pro 14"
(2023)
M3 Pro500GB SSD18GBmacOS Sonoma
MacBook Pro 13"
(2018)
Intel i5-8592U (2.3GHz)Intel Iris Plus 655250GB SSD8GBmacOS Mojave
Lenovo ThinkPad T430
(2012)
Intel Core i7 (idk what it is)16GBWindows 7 Pro / NixOS
IBM ThinkPad X41T
(2005)
Intel Pentium M (1.6GHz)Mobile Intel Express Chipset (128MB)40GB HDD1.5GBWindows XP Tablet PC Edition
Dell OptiPlex GX1
(1999)
Intel Pentium II (Deschutes, 400MHz)ATI 3D Rage Pro (4MB)40GB HDD639MBWindows 2000
IBM ThinkPad T40
(2003)
Intel Pentium M (1.3GHz)ATI Mobility Radeon 7500 (32MB)N/AN/AN/A
HP Compaq Elite 8100
(2010)
Intel Core i7 (something or other)16GBWindows Vista Ultimate (64-bit)
Mac mini
(2014)
Intel Core i5-4278U (2.6GHz)Intel Iris Graphics1TB HDD8GBProxmox VE 8.2
Fujitsu Milan
(1996)
Intel Pentium1215MB HDD32MBWindows 98 SE
Compaq Armada M300
(1999)
Intel Pentium III
SuperMicro X9SCMIntel Pentium G850 (2.9GHz)Matrox MGA G6200eW2TB HDD / 80GB HDD16GBProxmox VE 8.2
Main PCIntel Core i7-6700K (4GHz)NVidia GTX 1060 (3GB)(multiple)64GBWindows 10 Pro / NixOS
Toshiba Qosmio F20
(2005)
N/AN/A
MacBook Pro 13"
(2009)
N/AN/A
Packard-Bell EasyNote MIT-LYN01
(???)
Windows XP Home
Sony VAIO PCG-3B1M
(???)
Windows Vista
Dell OptiPlex 745 USFF
(2006)
Intel Pentium Dual CoreIntel Integrated(multiple)4GB(multiple)
Dell Inspiron 1525
(2008)
N/AN/A
Random Whitebox 2AMD Phenom II X6-1055T8GBN/A
Dell Latitude D531
(2007)
Windows XP Professional
IBM ThinkPad R40
(2003)
Windows 2000
Dell Latitude CPi
(2001)
Windows 2000
Dell Latitude CPx
(1999)
Windows 98 SE
Dell Latitude 4898T
(???)
N/AN/A
Time 8375
(???)
N/AN/A
Toshiba Satellite 200CDS
(1996)
HP Compaq NC6000
(2004)
N/AN/A
IBM Personal Computer 330
(1997)
Intel PentiumN/AN/A
Shuttle XPC SN21G5
(2006)
AMD Athlon 64 X2N/AN/A
--}}
diff --git a/resources/views/music.blade.php b/resources/views/music.blade.php index 0fd5d84..92e5a90 100644 --- a/resources/views/music.blade.php +++ b/resources/views/music.blade.php @@ -1,6 +1,5 @@ Music -