├── src ├── img │ ├── bg.jpg │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ └── android-chrome-512x512.png ├── pug │ ├── template.pug │ └── index.pug ├── sass │ ├── _pulse.scss │ ├── _skeletonLoad.scss │ ├── _searchBox.scss │ └── style.scss └── js │ └── app.js ├── public ├── ios │ ├── 16.png │ ├── 20.png │ ├── 29.png │ ├── 32.png │ ├── 40.png │ ├── 50.png │ ├── 57.png │ ├── 58.png │ ├── 60.png │ ├── 64.png │ ├── 72.png │ ├── 76.png │ ├── 80.png │ ├── 87.png │ ├── 100.png │ ├── 1024.png │ ├── 114.png │ ├── 120.png │ ├── 128.png │ ├── 144.png │ ├── 152.png │ ├── 167.png │ ├── 180.png │ ├── 192.png │ ├── 256.png │ └── 512.png ├── weather-icon.png ├── windows11 │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-125.png │ ├── LargeTile.scale-150.png │ ├── LargeTile.scale-200.png │ ├── LargeTile.scale-400.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-125.png │ ├── SmallTile.scale-150.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-125.png │ ├── StoreLogo.scale-150.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-125.png │ ├── SplashScreen.scale-150.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-125.png │ ├── Square44x44Logo.scale-150.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Wide310x150Logo.scale-100.png │ ├── Wide310x150Logo.scale-125.png │ ├── Wide310x150Logo.scale-150.png │ ├── Wide310x150Logo.scale-200.png │ ├── Wide310x150Logo.scale-400.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-20.png │ ├── Square44x44Logo.targetsize-24.png │ ├── Square44x44Logo.targetsize-30.png │ ├── Square44x44Logo.targetsize-32.png │ ├── Square44x44Logo.targetsize-36.png │ ├── Square44x44Logo.targetsize-40.png │ ├── Square44x44Logo.targetsize-44.png │ ├── Square44x44Logo.targetsize-48.png │ ├── Square44x44Logo.targetsize-60.png │ ├── Square44x44Logo.targetsize-64.png │ ├── Square44x44Logo.targetsize-72.png │ ├── Square44x44Logo.targetsize-80.png │ ├── Square44x44Logo.targetsize-96.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-20.png │ ├── Square44x44Logo.altform-unplated_targetsize-24.png │ ├── Square44x44Logo.altform-unplated_targetsize-30.png │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ ├── Square44x44Logo.altform-unplated_targetsize-36.png │ ├── Square44x44Logo.altform-unplated_targetsize-40.png │ ├── Square44x44Logo.altform-unplated_targetsize-44.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── Square44x44Logo.altform-unplated_targetsize-60.png │ ├── Square44x44Logo.altform-unplated_targetsize-64.png │ ├── Square44x44Logo.altform-unplated_targetsize-72.png │ ├── Square44x44Logo.altform-unplated_targetsize-80.png │ ├── Square44x44Logo.altform-unplated_targetsize-96.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-20.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-30.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-36.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-40.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-44.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-60.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-64.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-72.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-80.png │ ├── Square44x44Logo.altform-lightunplated_targetsize-96.png │ └── Square44x44Logo.altform-lightunplated_targetsize-256.png └── android │ ├── android-launchericon-48-48.png │ ├── android-launchericon-72-72.png │ ├── android-launchericon-96-96.png │ ├── android-launchericon-144-144.png │ ├── android-launchericon-192-192.png │ └── android-launchericon-512-512.png ├── .env.development ├── .env ├── .gitignore ├── package.json ├── netlify.toml ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ └── weather_deploy.yml ├── licence.txt ├── index.html ├── README.md ├── CODE_OF_CONDUCT.md └── vite.config.js /src/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/src/img/bg.jpg -------------------------------------------------------------------------------- /public/ios/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/16.png -------------------------------------------------------------------------------- /public/ios/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/20.png -------------------------------------------------------------------------------- /public/ios/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/29.png -------------------------------------------------------------------------------- /public/ios/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/32.png -------------------------------------------------------------------------------- /public/ios/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/40.png -------------------------------------------------------------------------------- /public/ios/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/50.png -------------------------------------------------------------------------------- /public/ios/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/57.png -------------------------------------------------------------------------------- /public/ios/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/58.png -------------------------------------------------------------------------------- /public/ios/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/60.png -------------------------------------------------------------------------------- /public/ios/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/64.png -------------------------------------------------------------------------------- /public/ios/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/72.png -------------------------------------------------------------------------------- /public/ios/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/76.png -------------------------------------------------------------------------------- /public/ios/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/80.png -------------------------------------------------------------------------------- /public/ios/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/87.png -------------------------------------------------------------------------------- /public/ios/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/100.png -------------------------------------------------------------------------------- /public/ios/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/1024.png -------------------------------------------------------------------------------- /public/ios/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/114.png -------------------------------------------------------------------------------- /public/ios/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/120.png -------------------------------------------------------------------------------- /public/ios/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/128.png -------------------------------------------------------------------------------- /public/ios/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/144.png -------------------------------------------------------------------------------- /public/ios/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/152.png -------------------------------------------------------------------------------- /public/ios/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/167.png -------------------------------------------------------------------------------- /public/ios/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/180.png -------------------------------------------------------------------------------- /public/ios/192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/192.png -------------------------------------------------------------------------------- /public/ios/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/256.png -------------------------------------------------------------------------------- /public/ios/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/ios/512.png -------------------------------------------------------------------------------- /src/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/src/img/favicon.ico -------------------------------------------------------------------------------- /public/weather-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/weather-icon.png -------------------------------------------------------------------------------- /src/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/src/img/favicon-16x16.png -------------------------------------------------------------------------------- /src/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/src/img/favicon-32x32.png -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | VITE_API_BASE_URL= 'https://api.example.com' 2 | VITE_API_KEY = 'bb3f843336220fe5f3eab23198735e53' -------------------------------------------------------------------------------- /src/img/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/src/img/apple-touch-icon.png -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | VITE_API_BASE_URL= https://api.openweathermap.org/data/2.5/weather 2 | VITE_API_KEY = bb3f843336220fe5f3eab23198735e53 -------------------------------------------------------------------------------- /src/img/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/src/img/android-chrome-192x192.png -------------------------------------------------------------------------------- /src/img/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/src/img/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/LargeTile.scale-100.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/LargeTile.scale-125.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/LargeTile.scale-150.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/LargeTile.scale-200.png -------------------------------------------------------------------------------- /public/windows11/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/LargeTile.scale-400.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SmallTile.scale-100.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SmallTile.scale-125.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SmallTile.scale-150.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SmallTile.scale-200.png -------------------------------------------------------------------------------- /public/windows11/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SmallTile.scale-400.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /public/windows11/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /public/android/android-launchericon-48-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/android/android-launchericon-48-48.png -------------------------------------------------------------------------------- /public/android/android-launchericon-72-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/android/android-launchericon-72-72.png -------------------------------------------------------------------------------- /public/android/android-launchericon-96-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/android/android-launchericon-96-96.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /public/windows11/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /public/android/android-launchericon-144-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/android/android-launchericon-144-144.png -------------------------------------------------------------------------------- /public/android/android-launchericon-192-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/android/android-launchericon-192-192.png -------------------------------------------------------------------------------- /public/android/android-launchericon-512-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/android/android-launchericon-512-512.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /public/windows11/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /public/windows11/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-20.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-30.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-36.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-40.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-44.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-60.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-64.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-72.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-80.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-96.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-20.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-24.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-30.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-36.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-40.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-44.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-60.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-64.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-72.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-80.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-96.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png -------------------------------------------------------------------------------- /public/windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Silent-Watcher/weather/HEAD/public/windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /src/pug/template.pug: -------------------------------------------------------------------------------- 1 | template#main_template 2 | p#name not found 3 | p#date not found 4 | h1#temperature .. 5 | h3#state ¯\(°_o)/¯ 6 | p.mt-3 7 | span#low_temp .. 8 | | / 9 | span#high_temp .. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # Local Netlify folder 27 | .netlify 28 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weather", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview" 10 | }, 11 | "devDependencies": { 12 | "vite": "^4.2.0" 13 | }, 14 | "dependencies": { 15 | "moment": "^2.29.4", 16 | "sass": "^1.60.0", 17 | "vite-plugin-pug": "^0.3.2", 18 | "vite-plugin-pwa": "^0.14.7" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/sass/_pulse.scss: -------------------------------------------------------------------------------- 1 | .pulse { 2 | &::before { 3 | content: ''; 4 | display: block; 5 | position: absolute; 6 | width: 100%; 7 | height: 100%; 8 | top: 0; 9 | left: 0; 10 | background-color: #f4433623; 11 | border-radius: inherit; 12 | transition: opacity .3s, transform .3s; 13 | animation: pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite; 14 | z-index: -1; 15 | } 16 | 17 | overflow: visible; 18 | position: relative; 19 | } 20 | 21 | @keyframes pulse-animation { 22 | 0% { 23 | opacity: 1; 24 | transform: scale(1); 25 | } 26 | 50% { 27 | opacity: 0; 28 | transform: scale(1.5); 29 | } 30 | 100% { 31 | opacity: 0; 32 | transform: scale(1.5); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/sass/_skeletonLoad.scss: -------------------------------------------------------------------------------- 1 | .skeleton { 2 | opacity: 0.7; 3 | animation: skeleton-loading 1s linear infinite alternate; 4 | } 5 | @keyframes skeleton-loading { 6 | 0% { 7 | background-color: hsl(200, 20%, 70%); 8 | } 9 | 100% { 10 | background-color: hsl(200, 20%, 95%); 11 | } 12 | } 13 | .skeleton-text { 14 | width: 50%; 15 | height: 1rem; 16 | margin: 0 auto; 17 | margin-bottom: .75rem; 18 | border-radius: 0.125rem; 19 | 20 | &:first-child { 21 | width: 80%; 22 | margin: 1rem auto; 23 | } 24 | &:nth-last-child(2){ 25 | margin-bottom: 0; 26 | width: 10%; 27 | display: inline-block; 28 | } 29 | &:last-child { 30 | margin-bottom: 0; 31 | width: 10%; 32 | display: inline-block; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | # example netlify.toml 2 | [build] 3 | command = "yarn build" 4 | functions = "netlify/functions" 5 | publish = "dist" 6 | 7 | ## Uncomment to use this redirect for Single Page Applications like create-react-app. 8 | ## Not needed for static site generators. 9 | #[[redirects]] 10 | # from = "/*" 11 | # to = "/index.html" 12 | # status = 200 13 | 14 | ## (optional) Settings for Netlify Dev 15 | ## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection 16 | #[dev] 17 | # command = "yarn start" # Command to start your dev server 18 | # port = 3000 # Port that the dev server will be listening on 19 | # publish = "dist" # Folder with the static content for _redirect file 20 | 21 | ## more info on configuring this file: https://docs.netlify.com/configure-builds/file-based-configuration/ 22 | -------------------------------------------------------------------------------- /src/sass/_searchBox.scss: -------------------------------------------------------------------------------- 1 | .search-box { 2 | background: #F44336; 3 | width: 60px; 4 | cursor: pointer; 5 | height: inherit; 6 | border-radius: 40px; 7 | transition: .3s; 8 | padding: 10px; 9 | &:hover { 10 | background: #2f3640; 11 | width: inherit; 12 | > .search-text { 13 | width: 100%; 14 | padding: 0 20px; 15 | } 16 | > .search-btn { 17 | background: #ffffff; 18 | color: #000000; 19 | } 20 | } 21 | .search-btn { 22 | color: #ffffff; 23 | width: 40px; 24 | height: 40px; 25 | background: #F44336; 26 | transition: 0.4s; 27 | cursor: pointer; 28 | &:hover{ 29 | color: #F44336; 30 | } 31 | > i { 32 | font-size: 20px; 33 | } 34 | } 35 | .search-text { 36 | background: none; 37 | outline: none; 38 | transition: 0.4s; 39 | line-height: 60px; 40 | width: 0px; 41 | &::placeholder { 42 | color: #ccc; 43 | padding-left: 5px; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /licence.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 ali t.nazari 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /src/sass/style.scss: -------------------------------------------------------------------------------- 1 | @charset 'utf-8'; 2 | @import url('https://fonts.googleapis.com/css2?family=Lilita+One&display=swap'); 3 | // components 4 | @import "searchBox"; 5 | @import "pulse"; 6 | @import "skeletonLoad"; 7 | // body.swal2-height-auto 8 | 9 | body { 10 | 11 | background: #232323; 12 | background-image: url('../img/bg.jpg'); 13 | background-repeat: no-repeat; 14 | background-size: cover; 15 | backdrop-filter: grayscale(28%) blur(2px); 16 | &.swal2-height-auto{ 17 | height: 100vh!important; 18 | } 19 | } 20 | 21 | nav{ 22 | height: 60px; 23 | } 24 | 25 | main{ 26 | font-family: 'Lilita One', cursive; 27 | border-radius: 13px; 28 | background-color: #2f3640e1; 29 | #name{ 30 | font-size: 4rem; 31 | } 32 | #location{ 33 | font-size: 35px; 34 | } 35 | #date{ 36 | font-size: 18px; 37 | } 38 | #temperature{ 39 | font-size: 5rem; 40 | } 41 | #state{ 42 | font-size: 2.4rem; 43 | } 44 | &:last-child{ 45 | font-size: 25px; 46 | } 47 | } 48 | 49 | .swal2-container{ 50 | height: 100vh!important; 51 | } 52 | 53 | #openWeatherLink{ 54 | color: #F44336; 55 | transition: .3s; 56 | &:hover{ 57 | color: #b92d23; 58 | } 59 | } 60 | 61 | 62 | ::selection{ 63 | background-color: #b92d23; 64 | color: #f5f5f5; 65 | } -------------------------------------------------------------------------------- /src/pug/index.pug: -------------------------------------------------------------------------------- 1 | .container-fluid 2 | .container 3 | .row.pt-5.align-items-center 4 | nav.col-10 5 | .search-box.d-inline-flex.justify-content-center.align-items-center 6 | input#search_input.search-text.border-0.text-white.fs-6.fw-normal(type='text' placeholder='city or country...') 7 | button#search_btn.search-btn.rounded-circle.d-flex.justify-content-center.align-items-center.text-decoration-none.border-0 8 | i.fas.fa-search 9 | section.col-2.d-flex.justify-content-center.align-items-center 10 | a.pulse.rounded-circle(href='https://github.com/Silent-Watcher/weather') 11 | lottie-player(src='https://assets1.lottiefiles.com/private_files/lf30_1ldonjtk.json' background='transparent' speed='.9' style='width: 90px; height: 90px' loop='' autoplay='') 12 | .container.mt-3 13 | p.text-center 14 | | Weather data provided by 15 | a#openWeatherLink.fw-bold.text-decoration-none(href='https://openweathermap.org/' target="_blank") OpenWeather 16 | .container 17 | .row 18 | main.col-8.offset-2.mt-3.text-center.text-white.p-5 19 | p.skeleton.skeleton-text 20 | p.skeleton.skeleton-text 21 | p.skeleton.skeleton-text 22 | p.skeleton.skeleton-text 23 | p.skeleton.skeleton-text 24 | p.skeleton.skeleton-text 25 | .container 26 | footer 27 | p.text-center.text-warning.mt-4 made with 🧡 and ☕ -------------------------------------------------------------------------------- /.github/workflows/weather_deploy.yml: -------------------------------------------------------------------------------- 1 | # Simple workflow for deploying static content to GitHub Pages 2 | name: Deploy static content to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: ['main'] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow one concurrent deployment 19 | concurrency: 20 | group: 'pages' 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | # Single deploy job since we're just deploying 25 | deploy: 26 | environment: 27 | name: github-pages 28 | url: ${{ steps.deployment.outputs.page_url }} 29 | runs-on: ubuntu-latest 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v3 33 | - name: Set up Node 34 | uses: actions/setup-node@v3 35 | with: 36 | node-version: 18 37 | cache: 'npm' 38 | - name: Install dependencies 39 | run: npm install 40 | - name: Build 41 | run: npm run build 42 | - name: Setup Pages 43 | uses: actions/configure-pages@v3 44 | - name: Upload artifact 45 | uses: actions/upload-pages-artifact@v1 46 | with: 47 | # Upload dist repository 48 | path: './dist' 49 | - name: Deploy to GitHub Pages 50 | id: deployment 51 | uses: actions/deploy-pages@v1 52 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | weather App 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 26 | 27 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Weather app 3 | 4 | using the user's input and geographical location to collect weather information 5 | 6 |

Awesome Made With Love

7 | 8 | ## Overview 9 | 10 | ![App Screenshot](https://iili.io/HNcddGa.png) 11 | 12 | ## Demo 13 | ### netlify 14 | https://weatherdevwithapi.netlify.app/ 15 | ### GitHub pages 16 | https://silent-watcher.github.io/weather/ 17 | 18 | ## Prerequisites 19 | In order to run this project, you will need to have the following installed on your computer: 20 | - nodejs 21 | - yarn | npm 22 | ## Run Locally 23 | 24 | Clone the project 25 | 26 | ```bash 27 | git clone https://github.com/Silent-Watcher/weather 28 | ``` 29 | 30 | Go to the project directory 31 | 32 | ```bash 33 | cd weather 34 | ``` 35 | 36 | Install dependencies 37 | 38 | ```bash 39 | npm install 40 | yarn 41 | ``` 42 | 43 | Start the server 44 | 45 | ```bash 46 | npm run dev 47 | yarn dev 48 | ``` 49 | 50 | ## Acknowledgements 51 | 52 | - [The build tool and development server.](https://vitejs.dev/) 53 | - [ The weather data API used in the project.](https://openweathermap.org/api) 54 | - [The package manager used in the project.](https://yarnpkg.com/) 55 | 56 | 57 | ## Feedback 58 | 59 | If you have any feedback, please reach out to me at alitabatabaee20@gmail.com 60 | 61 | 62 | ## License 63 | 64 | [MIT](https://choosealicense.com/licenses/mit/) 65 | 66 | This project is licensed under the MIT License. See the LICENSE file for details. 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/js/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | import moment from 'moment'; 3 | 4 | const $ = document; 5 | const searchInput = $.querySelector('#search_input'); 6 | const searchBtn = $.querySelector('#search_btn'); 7 | const template = $.querySelector('#main_template'); 8 | const defaultCityName = 'Tehran'; 9 | 10 | const apiUrl = import.meta.env.VITE_API_BASE_URL; 11 | const apiKey = import.meta.env.VITE_API_KEY; 12 | 13 | searchBtn.addEventListener('click', async function (event) { 14 | event.preventDefault(); 15 | if (searchInput.value.trim() === '') { 16 | Swal.fire({ 17 | title: 'Error!', 18 | text: 'empty value cannot be send', 19 | icon: 'error', 20 | confirmButtonText: 'ok', 21 | didDestroy: () => { 22 | searchInput.value = ''; 23 | }, 24 | }); 25 | } else { 26 | sendApiRequest(searchInput.value).then((data) => { 27 | addApiResponseData(data); 28 | }); 29 | } 30 | }); 31 | 32 | async function sendApiRequest(value, usePosition = false) { 33 | searchInput.innerHTML = ''; 34 | let queryTemplate = usePosition 35 | ? `lat=${value[0]}&lon=${value[1]}&appid=${apiKey}` 36 | : `q=${value}&appid=${apiKey}`; 37 | // 38 | return await fetch(`${apiUrl}?${queryTemplate}`) 39 | .then((res) => { 40 | if (res.status === 200) return res.json(); 41 | }) 42 | .then((data) => { 43 | $.querySelector('main').innerHTML = ''; 44 | addTemplate(); 45 | return data; 46 | }); 47 | } 48 | 49 | function addTemplate() { 50 | let card = template.content.cloneNode(true); 51 | $.querySelector('main').append(card); 52 | } 53 | 54 | function addApiResponseData(data) { 55 | $.querySelector('#name').innerHTML = data.name || 'not found'; 56 | $.querySelector('#temperature').innerHTML = `${convertKelvinToCelsius( 57 | data.main.temp 58 | )}℃`; 59 | $.querySelector('#date').innerHTML = moment().format('dddd MMMM Do YYYY'); 60 | $.querySelector('#state').innerHTML = data.weather.at(0).main; 61 | $.querySelector('#low_temp').innerHTML = `${convertKelvinToCelsius( 62 | data.main.temp_min 63 | )}℃`; 64 | $.querySelector('#high_temp').innerHTML = `${convertKelvinToCelsius( 65 | data.main.temp_max 66 | )}℃`; 67 | } 68 | 69 | function convertKelvinToCelsius(temp) { 70 | return (temp - 273).toFixed(2); 71 | } 72 | 73 | window.addEventListener('load', function () { 74 | navigator.geolocation.getCurrentPosition( 75 | locationSuccessCallback, 76 | locationErrorCallback 77 | ); 78 | }); 79 | 80 | function locationSuccessCallback(position) { 81 | sendApiRequest( 82 | [position.coords.latitude, position.coords.longitude], 83 | true 84 | ).then((data) => { 85 | addApiResponseData(data); 86 | }); 87 | } 88 | function locationErrorCallback(error) { 89 | Swal.fire({ 90 | title: 'Error!', 91 | text: 'your location not found !', 92 | icon: 'error', 93 | confirmButtonText: 'ok', 94 | didDestroy: () => { 95 | sendApiRequest(defaultCityName, false).then((data) => { 96 | addApiResponseData(data); 97 | }); 98 | }, 99 | }); 100 | } 101 | // cursor 102 | new kursor({ 103 | type: 1, 104 | color: '#F44336', 105 | removeDefaultCursor: true, 106 | }); 107 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | . 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import pugPlugin from 'vite-plugin-pug'; 3 | import { VitePWA } from 'vite-plugin-pwa'; 4 | 5 | const options = { pretty: true }; // FIXME: pug pretty is deprecated! 6 | const locals = { name: 'My Pug' }; 7 | 8 | export default defineConfig({ 9 | base: "/weather", 10 | plugins: [ 11 | pugPlugin(options, locals), 12 | VitePWA({ 13 | manifest: { 14 | "icons": [ 15 | { 16 | src: './weather-icon.png', 17 | sizes: '512x512', 18 | type: 'image/png', 19 | purpose: 'any maskable', 20 | }, 21 | { 22 | "src": "windows11/SmallTile.scale-100.png", 23 | "sizes": "71x71" 24 | }, 25 | { 26 | "src": "windows11/SmallTile.scale-125.png", 27 | "sizes": "89x89" 28 | }, 29 | { 30 | "src": "windows11/SmallTile.scale-150.png", 31 | "sizes": "107x107" 32 | }, 33 | { 34 | "src": "windows11/SmallTile.scale-200.png", 35 | "sizes": "142x142" 36 | }, 37 | { 38 | "src": "windows11/SmallTile.scale-400.png", 39 | "sizes": "284x284" 40 | }, 41 | { 42 | "src": "windows11/Square150x150Logo.scale-100.png", 43 | "sizes": "150x150" 44 | }, 45 | { 46 | "src": "windows11/Square150x150Logo.scale-125.png", 47 | "sizes": "188x188" 48 | }, 49 | { 50 | "src": "windows11/Square150x150Logo.scale-150.png", 51 | "sizes": "225x225" 52 | }, 53 | { 54 | "src": "windows11/Square150x150Logo.scale-200.png", 55 | "sizes": "300x300" 56 | }, 57 | { 58 | "src": "windows11/Square150x150Logo.scale-400.png", 59 | "sizes": "600x600" 60 | }, 61 | { 62 | "src": "windows11/Wide310x150Logo.scale-100.png", 63 | "sizes": "310x150" 64 | }, 65 | { 66 | "src": "windows11/Wide310x150Logo.scale-125.png", 67 | "sizes": "388x188" 68 | }, 69 | { 70 | "src": "windows11/Wide310x150Logo.scale-150.png", 71 | "sizes": "465x225" 72 | }, 73 | { 74 | "src": "windows11/Wide310x150Logo.scale-200.png", 75 | "sizes": "620x300" 76 | }, 77 | { 78 | "src": "windows11/Wide310x150Logo.scale-400.png", 79 | "sizes": "1240x600" 80 | }, 81 | { 82 | "src": "windows11/LargeTile.scale-100.png", 83 | "sizes": "310x310" 84 | }, 85 | { 86 | "src": "windows11/LargeTile.scale-125.png", 87 | "sizes": "388x388" 88 | }, 89 | { 90 | "src": "windows11/LargeTile.scale-150.png", 91 | "sizes": "465x465" 92 | }, 93 | { 94 | "src": "windows11/LargeTile.scale-200.png", 95 | "sizes": "620x620" 96 | }, 97 | { 98 | "src": "windows11/LargeTile.scale-400.png", 99 | "sizes": "1240x1240" 100 | }, 101 | { 102 | "src": "windows11/Square44x44Logo.scale-100.png", 103 | "sizes": "44x44" 104 | }, 105 | { 106 | "src": "windows11/Square44x44Logo.scale-125.png", 107 | "sizes": "55x55" 108 | }, 109 | { 110 | "src": "windows11/Square44x44Logo.scale-150.png", 111 | "sizes": "66x66" 112 | }, 113 | { 114 | "src": "windows11/Square44x44Logo.scale-200.png", 115 | "sizes": "88x88" 116 | }, 117 | { 118 | "src": "windows11/Square44x44Logo.scale-400.png", 119 | "sizes": "176x176" 120 | }, 121 | { 122 | "src": "windows11/StoreLogo.scale-100.png", 123 | "sizes": "50x50" 124 | }, 125 | { 126 | "src": "windows11/StoreLogo.scale-125.png", 127 | "sizes": "63x63" 128 | }, 129 | { 130 | "src": "windows11/StoreLogo.scale-150.png", 131 | "sizes": "75x75" 132 | }, 133 | { 134 | "src": "windows11/StoreLogo.scale-200.png", 135 | "sizes": "100x100" 136 | }, 137 | { 138 | "src": "windows11/StoreLogo.scale-400.png", 139 | "sizes": "200x200" 140 | }, 141 | { 142 | "src": "windows11/SplashScreen.scale-100.png", 143 | "sizes": "620x300" 144 | }, 145 | { 146 | "src": "windows11/SplashScreen.scale-125.png", 147 | "sizes": "775x375" 148 | }, 149 | { 150 | "src": "windows11/SplashScreen.scale-150.png", 151 | "sizes": "930x450" 152 | }, 153 | { 154 | "src": "windows11/SplashScreen.scale-200.png", 155 | "sizes": "1240x600" 156 | }, 157 | { 158 | "src": "windows11/SplashScreen.scale-400.png", 159 | "sizes": "2480x1200" 160 | }, 161 | { 162 | "src": "windows11/Square44x44Logo.targetsize-16.png", 163 | "sizes": "16x16" 164 | }, 165 | { 166 | "src": "windows11/Square44x44Logo.targetsize-20.png", 167 | "sizes": "20x20" 168 | }, 169 | { 170 | "src": "windows11/Square44x44Logo.targetsize-24.png", 171 | "sizes": "24x24" 172 | }, 173 | { 174 | "src": "windows11/Square44x44Logo.targetsize-30.png", 175 | "sizes": "30x30" 176 | }, 177 | { 178 | "src": "windows11/Square44x44Logo.targetsize-32.png", 179 | "sizes": "32x32" 180 | }, 181 | { 182 | "src": "windows11/Square44x44Logo.targetsize-36.png", 183 | "sizes": "36x36" 184 | }, 185 | { 186 | "src": "windows11/Square44x44Logo.targetsize-40.png", 187 | "sizes": "40x40" 188 | }, 189 | { 190 | "src": "windows11/Square44x44Logo.targetsize-44.png", 191 | "sizes": "44x44" 192 | }, 193 | { 194 | "src": "windows11/Square44x44Logo.targetsize-48.png", 195 | "sizes": "48x48" 196 | }, 197 | { 198 | "src": "windows11/Square44x44Logo.targetsize-60.png", 199 | "sizes": "60x60" 200 | }, 201 | { 202 | "src": "windows11/Square44x44Logo.targetsize-64.png", 203 | "sizes": "64x64" 204 | }, 205 | { 206 | "src": "windows11/Square44x44Logo.targetsize-72.png", 207 | "sizes": "72x72" 208 | }, 209 | { 210 | "src": "windows11/Square44x44Logo.targetsize-80.png", 211 | "sizes": "80x80" 212 | }, 213 | { 214 | "src": "windows11/Square44x44Logo.targetsize-96.png", 215 | "sizes": "96x96" 216 | }, 217 | { 218 | "src": "windows11/Square44x44Logo.targetsize-256.png", 219 | "sizes": "256x256" 220 | }, 221 | { 222 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-16.png", 223 | "sizes": "16x16" 224 | }, 225 | { 226 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-20.png", 227 | "sizes": "20x20" 228 | }, 229 | { 230 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-24.png", 231 | "sizes": "24x24" 232 | }, 233 | { 234 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-30.png", 235 | "sizes": "30x30" 236 | }, 237 | { 238 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-32.png", 239 | "sizes": "32x32" 240 | }, 241 | { 242 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-36.png", 243 | "sizes": "36x36" 244 | }, 245 | { 246 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-40.png", 247 | "sizes": "40x40" 248 | }, 249 | { 250 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-44.png", 251 | "sizes": "44x44" 252 | }, 253 | { 254 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-48.png", 255 | "sizes": "48x48" 256 | }, 257 | { 258 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-60.png", 259 | "sizes": "60x60" 260 | }, 261 | { 262 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-64.png", 263 | "sizes": "64x64" 264 | }, 265 | { 266 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-72.png", 267 | "sizes": "72x72" 268 | }, 269 | { 270 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-80.png", 271 | "sizes": "80x80" 272 | }, 273 | { 274 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-96.png", 275 | "sizes": "96x96" 276 | }, 277 | { 278 | "src": "windows11/Square44x44Logo.altform-unplated_targetsize-256.png", 279 | "sizes": "256x256" 280 | }, 281 | { 282 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png", 283 | "sizes": "16x16" 284 | }, 285 | { 286 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png", 287 | "sizes": "20x20" 288 | }, 289 | { 290 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png", 291 | "sizes": "24x24" 292 | }, 293 | { 294 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png", 295 | "sizes": "30x30" 296 | }, 297 | { 298 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png", 299 | "sizes": "32x32" 300 | }, 301 | { 302 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png", 303 | "sizes": "36x36" 304 | }, 305 | { 306 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png", 307 | "sizes": "40x40" 308 | }, 309 | { 310 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png", 311 | "sizes": "44x44" 312 | }, 313 | { 314 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png", 315 | "sizes": "48x48" 316 | }, 317 | { 318 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png", 319 | "sizes": "60x60" 320 | }, 321 | { 322 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png", 323 | "sizes": "64x64" 324 | }, 325 | { 326 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png", 327 | "sizes": "72x72" 328 | }, 329 | { 330 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png", 331 | "sizes": "80x80" 332 | }, 333 | { 334 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png", 335 | "sizes": "96x96" 336 | }, 337 | { 338 | "src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png", 339 | "sizes": "256x256" 340 | }, 341 | { 342 | "src": "android/android-launchericon-512-512.png", 343 | "sizes": "512x512" 344 | }, 345 | { 346 | "src": "android/android-launchericon-192-192.png", 347 | "sizes": "192x192" 348 | }, 349 | { 350 | "src": "android/android-launchericon-144-144.png", 351 | "sizes": "144x144" 352 | }, 353 | { 354 | "src": "android/android-launchericon-96-96.png", 355 | "sizes": "96x96" 356 | }, 357 | { 358 | "src": "android/android-launchericon-72-72.png", 359 | "sizes": "72x72" 360 | }, 361 | { 362 | "src": "android/android-launchericon-48-48.png", 363 | "sizes": "48x48" 364 | }, 365 | { 366 | "src": "ios/16.png", 367 | "sizes": "16x16" 368 | }, 369 | { 370 | "src": "ios/20.png", 371 | "sizes": "20x20" 372 | }, 373 | { 374 | "src": "ios/29.png", 375 | "sizes": "29x29" 376 | }, 377 | { 378 | "src": "ios/32.png", 379 | "sizes": "32x32" 380 | }, 381 | { 382 | "src": "ios/40.png", 383 | "sizes": "40x40" 384 | }, 385 | { 386 | "src": "ios/50.png", 387 | "sizes": "50x50" 388 | }, 389 | { 390 | "src": "ios/57.png", 391 | "sizes": "57x57" 392 | }, 393 | { 394 | "src": "ios/58.png", 395 | "sizes": "58x58" 396 | }, 397 | { 398 | "src": "ios/60.png", 399 | "sizes": "60x60" 400 | }, 401 | { 402 | "src": "ios/64.png", 403 | "sizes": "64x64" 404 | }, 405 | { 406 | "src": "ios/72.png", 407 | "sizes": "72x72" 408 | }, 409 | { 410 | "src": "ios/76.png", 411 | "sizes": "76x76" 412 | }, 413 | { 414 | "src": "ios/80.png", 415 | "sizes": "80x80" 416 | }, 417 | { 418 | "src": "ios/87.png", 419 | "sizes": "87x87" 420 | }, 421 | { 422 | "src": "ios/100.png", 423 | "sizes": "100x100" 424 | }, 425 | { 426 | "src": "ios/114.png", 427 | "sizes": "114x114" 428 | }, 429 | { 430 | "src": "ios/120.png", 431 | "sizes": "120x120" 432 | }, 433 | { 434 | "src": "ios/128.png", 435 | "sizes": "128x128" 436 | }, 437 | { 438 | "src": "ios/144.png", 439 | "sizes": "144x144" 440 | }, 441 | { 442 | "src": "ios/152.png", 443 | "sizes": "152x152" 444 | }, 445 | { 446 | "src": "ios/167.png", 447 | "sizes": "167x167" 448 | }, 449 | { 450 | "src": "ios/180.png", 451 | "sizes": "180x180" 452 | }, 453 | { 454 | "src": "ios/192.png", 455 | "sizes": "192x192" 456 | }, 457 | { 458 | "src": "ios/256.png", 459 | "sizes": "256x256" 460 | }, 461 | { 462 | "src": "ios/512.png", 463 | "sizes": "512x512" 464 | }, 465 | { 466 | "src": "ios/1024.png", 467 | "sizes": "1024x1024" 468 | } 469 | ] 470 | }, 471 | workbox: { 472 | runtimeCaching: [ 473 | { 474 | urlPattern: ({ url }) => { 475 | return url.pathname.startsWith('/data'); 476 | }, 477 | handler: 'CacheFirst', 478 | options: { 479 | cacheName: 'api-cache', 480 | cacheableResponse: { 481 | statuses: [0, 200], 482 | }, 483 | }, 484 | }, 485 | ], 486 | }, 487 | }), 488 | ], 489 | }); 490 | --------------------------------------------------------------------------------