From 0cd22cf82b5b056842df834f641e346dac8e4267 Mon Sep 17 00:00:00 2001 From: Frankie B Date: Mon, 22 Jan 2024 01:18:12 +0000 Subject: Remove unused HLJS code and unnecessary components --- resources/views/components/weather.blade.php | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 resources/views/components/weather.blade.php (limited to 'resources/views/components/weather.blade.php') diff --git a/resources/views/components/weather.blade.php b/resources/views/components/weather.blade.php deleted file mode 100644 index 29f925d..0000000 --- a/resources/views/components/weather.blade.php +++ /dev/null @@ -1,22 +0,0 @@ -@php -$api_root = app('config')->get('app')['api_root']; - -function degreesToCompassDirection($degrees) { - $cardinalDirections = [ - 'N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', - 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N' - ]; - return $cardinalDirections[round($degrees*16/360)]; -} - -$data = json_decode(file_get_contents($api_root.'/weather')); -$updated = gmdate('H:i Y-m-d', $data->updated); -$data = $data->current; -@endphp - -

Local Weather (Last Update: {{ $updated }})

- Wind Speed:     {{ $data->wind->speed }} mph
- Wind Direction: {{ $data->wind->direction->degrees }}°, {{ $data->wind->direction->cardinal }}
- Temperature:    {{ $data->temperature }}°C
- Rain Rate:      {{ $data->rain_rate }} mm/hr
- Humidity:       {{ $data->humidity }}%
-- cgit v1.2.3-54-g00ecf