Skip to content

Commit

Permalink
updated styleing
Browse files Browse the repository at this point in the history
  • Loading branch information
bjerrecs committed Feb 27, 2024
1 parent f55036d commit 3a21cd4
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion public/icons/Barometer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/icons/Binoculars.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 2 additions & 7 deletions public/icons/Clouds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/icons/Runway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/icons/Temp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/icons/Wether.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 24 additions & 19 deletions src/components/Metar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,39 @@ const response = await fetch("https://metar.vatsim.net/"+icao)
const metar = await response.text()
const metarObject = metarParser(metar);
---
<div class="flex flex-col items-center">
<p class="text-white text-2xl font-semibold">{airport}</p>
<div class="flex">
<div class="w-32 h-32 p-4 m-2 rounded flex justify-center items-center flex-col shadow backdrop-blur-sm bg-white/30">
<div class="flex flex-col items-center bg-gray-100 p-6 rounded-xl">
<p class="text-black text-2xl font-semibold uppercase">{airport}</p>
<div class="grid grid-cols-3 xl:grid-cols-6 gap-2">
<div class="w-32 h-32 lg:p-4 lg:m-2 rounded-lg flex justify-center items-center flex-col shadow-md bg-white">
<img src="/icons/Wether.svg" class="w-16 p-2" />
<p class="font-bold text-white">Winds</p>
<p class="text-white">{metarObject.wind.degrees}° / {metarObject.wind.speed_kts}kt</p>
<p class="font-bold text-black">Winds</p>
<p class="text-black">{metarObject.wind.degrees}° / {metarObject.wind.speed_kts}kt</p>
</div>
<div class="w-32 h-32 p-4 m-2 rounded flex justify-center items-center flex-col shadow backdrop-blur-sm bg-white/30">
<div class="w-32 h-32 lg:p-4 lg:m-2 rounded-lg flex justify-center items-center flex-col shadow-md bg-white">
<img src="/icons/Binoculars.svg" class="w-16 p-2" />
<p class="text-white font-bold">Visibility</p>
<p class="text-white">{metarObject.visibility.meters_float}</p>
<p class="text-black font-bold">Visibility</p>
<p class="text-black">{metarObject.visibility.meters_float}</p>
</div>
<div class="w-32 h-32 p-4 m-2 rounded flex justify-center items-center flex-col shadow backdrop-blur-sm bg-white/30">
<div class="w-32 h-32 lg:p-4 lg:m-2 rounded-lg flex justify-center items-center flex-col shadow-md bg-white">
<img src="/icons/Clouds.svg" class="w-16 p-2" />
<p class="text-white font-bold">Clouds</p>
<p class="text-white">{metarObject.clouds[0].code}</p>
<p class="text-black font-bold">Clouds</p>
<p class="text-black">{metarObject.clouds[0].code}</p>
</div>
<div class="w-32 h-32 p-4 m-2 rounded flex justify-center items-center flex-col shadow backdrop-blur-sm bg-white/30">
<div class="w-32 h-32 lg:p-4 lg:m-2 rounded-lg flex justify-center items-center flex-col shadow-md bg-white">
<img src="/icons/Temp.svg" class="w-16 p-2" />
<p class="text-white font-bold">Temperature</p>
<p class="text-white">{metarObject.temperature.celsius}°C / {metarObject.dewpoint.celsius}°C</p>
<p class="text-black font-bold">Temperature</p>
<p class="text-black">{metarObject.temperature.celsius}°C / {metarObject.dewpoint.celsius}°C</p>
</div>
<div class="w-32 h-32 p-4 m-2 rounded flex justify-center items-center flex-col shadow backdrop-blur-sm bg-white/30">
<div class="w-32 h-32 lg:p-4 lg:m-2 rounded-lg flex justify-center items-center flex-col shadow-md bg-white">
<img src="/icons/Barometer.svg" class="w-16 p-2" />
<p class="text-white font-bold">Barometer</p>
<p class="text-white">{metarObject.barometer.mb}</p>
<p class="text-black font-bold">Barometer</p>
<p class="text-black">{metarObject.barometer.mb}</p>
</div>
<div class="w-32 h-32 lg:p-4 lg:m-2 rounded-lg flex justify-center items-center flex-col shadow-md bg-white">
<img src="/icons/Runway.svg" class="w-16 p-2" />
<p class="text-black font-bold">Runway</p>
<p class="text-black">TBA</p>
</div>
</div>
<p class="text-white">Last updated {metarObject.observed}</p>
<p class="text-black">Last updated {metarObject.observed}</p>
</div>

0 comments on commit 3a21cd4

Please sign in to comment.