commit a94e750b611113d5eebf21191e34395214409f69 Author: Geoff Doty Date: Sat Jul 12 21:09:09 2025 -0400 wip diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a14702c --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..68b04d0 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# Weather + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run index.js +``` + +### TODO + +- Lots, like + - background image from city camera + - API Integration + - meta junk diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..40579c8 --- /dev/null +++ b/bun.lock @@ -0,0 +1,27 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "weather", + "devDependencies": { + "@types/bun": "latest", + }, + "peerDependencies": { + "typescript": "^5", + }, + }, + }, + "packages": { + "@types/bun": ["@types/bun@1.2.5", "", { "dependencies": { "bun-types": "1.2.5" } }, "sha512-w2OZTzrZTVtbnJew1pdFmgV99H0/L+Pvw+z1P67HaR18MHOzYnTYOi6qzErhK8HyT+DB782ADVPPE92Xu2/Opg=="], + + "@types/node": ["@types/node@22.13.10", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw=="], + + "@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="], + + "bun-types": ["bun-types@1.2.5", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-3oO6LVGGRRKI4kHINx5PIdIgnLRb7l/SprhzqXapmoYkFl5m4j6EvALvbDVuuBFaamB46Ap6HCUxIXNLCGy+tg=="], + + "typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], + + "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="], + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c92580a --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "name": "weather-app", + "module": "src/index.js", + "type": "module", + "private": true, + "devDependencies": { + "@types/bun": "latest" + } +} \ No newline at end of file diff --git a/src/Weather-28719_640.png b/src/Weather-28719_640.png new file mode 100644 index 0000000..1ed1429 Binary files /dev/null and b/src/Weather-28719_640.png differ diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..ae29b44 --- /dev/null +++ b/src/index.html @@ -0,0 +1,75 @@ + + + + + + Weather Forecast + + + + + + + + +
+
+

Weather Forecast

+
+
RICEVILLE
+
+ + 72°F +
+
+
+ Today, + March 13th + THURSDAY +
+
+ + +
+ + + + + +
+
+ Five Day Forecast +
+
+ +
+ + \ No newline at end of file diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..0abbb42 --- /dev/null +++ b/src/index.js @@ -0,0 +1,41 @@ +customElements.define("daily-temp", class DailyTempeture extends HTMLElement { + constructor() { + super(); + + // this.attachShadow({mode:"open"}); + } + + connectedCallback() { + + const state = { + day: this.day(new Date().getDay()), + high: 72, + low: 64 + } + + + this.innerHTML = this.render(state); + } + + day(idx) { + const days = ["SUN","MON","TUE","WED","THU","FRI","SAT"]; + + return days[idx]; + } + + render(state = {}) { + return ` +
+ ${state.day} +
+ +
+
+
+ ${state.high}° / ${state.low}° +
+
+
+ `; + } +}); \ No newline at end of file