diff --git a/eslint.config.js b/eslint.config.js index 7df665d..d25cf1e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -23,7 +23,14 @@ export default defineConfig( rules: { // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors - 'no-undef': 'off' + 'no-undef': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_' + } + ] } }, { diff --git a/src/lib/components/location/location-search.svelte b/src/lib/components/location/location-search.svelte index fbc1bb3..839fdb0 100644 --- a/src/lib/components/location/location-search.svelte +++ b/src/lib/components/location/location-search.svelte @@ -1,14 +1,13 @@ + + + + diff --git a/src/lib/components/ui/card/card-action.svelte b/src/lib/components/ui/card/card-action.svelte new file mode 100644 index 0000000..cc36c56 --- /dev/null +++ b/src/lib/components/ui/card/card-action.svelte @@ -0,0 +1,20 @@ + + +
+ {@render children?.()} +
diff --git a/src/lib/components/ui/card/card-footer.svelte b/src/lib/components/ui/card/card-footer.svelte new file mode 100644 index 0000000..2d4d0f2 --- /dev/null +++ b/src/lib/components/ui/card/card-footer.svelte @@ -0,0 +1,20 @@ + + +- Weather Forecast -
++ Professional weather forecasting with advanced models, detailed comparisons, and extended + predictions +
+ + ++ Powered by Open-Meteo API with multiple weather models and advanced visualization +
+{feature.desc}
++ {#if location.admin1}{location.admin1}, + {/if}{location.country} +
++ {location.latitude.toFixed(2)}°N, {location.longitude.toFixed(2)}°E + {#if location.elevation}• {location.elevation.toFixed(0)}m{/if} +
+{error.message}
- {/await} -| Time | - {#each weather.indexes as index, j (j)} -{weather.hourlyTime[index].getHours() < 10 ? '0' : ''}{weather.hourlyTime[ - index - ].getHours()} | - {/each} -
|---|---|
| Icons | - {#each weather.indexes as index, j (j)} - {@const now = - weather.hourlyTime[index].getDate() === today.getDate() && - weather.hourlyTime[index].getHours() === today.getHours()} -- {/each} - |
| Temp graph | - {#each weather.indexes as index, j (j)} - {@const temp = weather.entries[0].values[index]} - - {#if !isNaN(temp)} -{temp.toFixed(0)} | - {/if} - {/each} -
| {entry.title} | - - {#each weather.indexes as index, j (j)} - {#if !isNaN(entry.values[index])} -{entry.name === 'precipitation' || entry.name === 'temperature_2m' - ? entry.values[index].toFixed(1) - : entry.values[index]} | - {/if} - {/each} -
| Wind Dir. | - {#each weather.indexes as index, j (j)} - {#if !isNaN(weather.windDirections[index])} -- {/if} - {/each} - |
{error.message}
+ {/await} +| Time | + {#each weather.indexes as index, j (j)} +{weather.hourlyTime[index].getHours() < 10 ? '0' : ''}{weather.hourlyTime[ + index + ].getHours()} | + {/each} +
|---|---|
| Icons | + {#each weather.indexes as index, j (j)} + {@const now = + weather.hourlyTime[index].getDate() === today.getDate() && + weather.hourlyTime[index].getHours() === today.getHours()} ++ {/each} + |
| Temp graph | + {#each weather.indexes as index, j (j)} + {@const temp = weather.entries[0].values[index]} + + {#if !isNaN(temp)} +{temp.toFixed(0)} | + {/if} + {/each} +
| {entry.title} | + + {#each weather.indexes as index, j (j)} + {#if !isNaN(entry.values[index])} +{entry.name === 'precipitation' || entry.name === 'temperature_2m' + ? entry.values[index].toFixed(1) + : entry.values[index]} | + {/if} + {/each} +
| Wind Dir. | + {#each weather.indexes as index, j (j)} + {#if !isNaN(weather.windDirections[index])} ++ {/if} + {/each} + |