formatting

This commit is contained in:
wont-stream 2025-04-10 19:17:35 -04:00
parent c7f2f4aeae
commit 4f6623efe9
11 changed files with 2368 additions and 661 deletions

2547
bun.lock

File diff suppressed because it is too large Load diff

View file

@ -1,15 +1,18 @@
<!doctype html>
<html lang="en" data-bs-theme="dark" data-bs-core="default" id="html">
<head>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" id="favicon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark">
<meta name="description" content="A New Tab Page." />
<title>New Tab</title>
</head>
<body>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx" defer></script>
</body>
</body>
</html>

View file

@ -1,282 +1,282 @@
{
"0":{
"day":{
"description":"Sunny",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/01d@2x.png"
"0": {
"day": {
"description": "Sunny",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/01d@2x.png"
},
"night":{
"description":"Clear",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/01n@2x.png"
"night": {
"description": "Clear",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/01n@2x.png"
}
},
"1":{
"day":{
"description":"Mainly Sunny",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/01d@2x.png"
"1": {
"day": {
"description": "Mainly Sunny",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/01d@2x.png"
},
"night":{
"description":"Mainly Clear",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/01n@2x.png"
"night": {
"description": "Mainly Clear",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/01n@2x.png"
}
},
"2":{
"day":{
"description":"Partly Cloudy",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/02d@2x.png"
"2": {
"day": {
"description": "Partly Cloudy",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/02d@2x.png"
},
"night":{
"description":"Partly Cloudy",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/02n@2x.png"
"night": {
"description": "Partly Cloudy",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/02n@2x.png"
}
},
"3":{
"day":{
"description":"Cloudy",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/03d@2x.png"
"3": {
"day": {
"description": "Cloudy",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/03d@2x.png"
},
"night":{
"description":"Cloudy",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/03n@2x.png"
"night": {
"description": "Cloudy",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/03n@2x.png"
}
},
"45":{
"day":{
"description":"Foggy",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/50d@2x.png"
"45": {
"day": {
"description": "Foggy",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/50d@2x.png"
},
"night":{
"description":"Foggy",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/50n@2x.png"
"night": {
"description": "Foggy",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/50n@2x.png"
}
},
"48":{
"day":{
"description":"Rime Fog",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/50d@2x.png"
"48": {
"day": {
"description": "Rime Fog",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/50d@2x.png"
},
"night":{
"description":"Rime Fog",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/50n@2x.png"
"night": {
"description": "Rime Fog",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/50n@2x.png"
}
},
"51":{
"day":{
"description":"Light Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
"51": {
"day": {
"description": "Light Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
},
"night":{
"description":"Light Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
"night": {
"description": "Light Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
}
},
"53":{
"day":{
"description":"Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
"53": {
"day": {
"description": "Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
},
"night":{
"description":"Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
"night": {
"description": "Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
}
},
"55":{
"day":{
"description":"Heavy Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
"55": {
"day": {
"description": "Heavy Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
},
"night":{
"description":"Heavy Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
"night": {
"description": "Heavy Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
}
},
"56":{
"day":{
"description":"Light Freezing Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
"56": {
"day": {
"description": "Light Freezing Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
},
"night":{
"description":"Light Freezing Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
"night": {
"description": "Light Freezing Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
}
},
"57":{
"day":{
"description":"Freezing Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
"57": {
"day": {
"description": "Freezing Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
},
"night":{
"description":"Freezing Drizzle",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
"night": {
"description": "Freezing Drizzle",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
}
},
"61":{
"day":{
"description":"Light Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
"61": {
"day": {
"description": "Light Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
},
"night":{
"description":"Light Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
"night": {
"description": "Light Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
}
},
"63":{
"day":{
"description":"Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
"63": {
"day": {
"description": "Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
},
"night":{
"description":"Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
"night": {
"description": "Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
}
},
"65":{
"day":{
"description":"Heavy Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
"65": {
"day": {
"description": "Heavy Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
},
"night":{
"description":"Heavy Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
"night": {
"description": "Heavy Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
}
},
"66":{
"day":{
"description":"Light Freezing Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
"66": {
"day": {
"description": "Light Freezing Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
},
"night":{
"description":"Light Freezing Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
"night": {
"description": "Light Freezing Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
}
},
"67":{
"day":{
"description":"Freezing Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
"67": {
"day": {
"description": "Freezing Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10d@2x.png"
},
"night":{
"description":"Freezing Rain",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
"night": {
"description": "Freezing Rain",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/10n@2x.png"
}
},
"71":{
"day":{
"description":"Light Snow",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
"71": {
"day": {
"description": "Light Snow",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
},
"night":{
"description":"Light Snow",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
"night": {
"description": "Light Snow",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
}
},
"73":{
"day":{
"description":"Snow",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
"73": {
"day": {
"description": "Snow",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
},
"night":{
"description":"Snow",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
"night": {
"description": "Snow",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
}
},
"75":{
"day":{
"description":"Heavy Snow",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
"75": {
"day": {
"description": "Heavy Snow",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
},
"night":{
"description":"Heavy Snow",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
"night": {
"description": "Heavy Snow",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
}
},
"77":{
"day":{
"description":"Snow Grains",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
"77": {
"day": {
"description": "Snow Grains",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
},
"night":{
"description":"Snow Grains",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
"night": {
"description": "Snow Grains",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
}
},
"80":{
"day":{
"description":"Light Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
"80": {
"day": {
"description": "Light Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
},
"night":{
"description":"Light Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
"night": {
"description": "Light Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
}
},
"81":{
"day":{
"description":"Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
"81": {
"day": {
"description": "Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
},
"night":{
"description":"Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
"night": {
"description": "Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
}
},
"82":{
"day":{
"description":"Heavy Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
"82": {
"day": {
"description": "Heavy Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09d@2x.png"
},
"night":{
"description":"Heavy Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
"night": {
"description": "Heavy Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/09n@2x.png"
}
},
"85":{
"day":{
"description":"Light Snow Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
"85": {
"day": {
"description": "Light Snow Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
},
"night":{
"description":"Light Snow Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
"night": {
"description": "Light Snow Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
}
},
"86":{
"day":{
"description":"Snow Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
"86": {
"day": {
"description": "Snow Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13d@2x.png"
},
"night":{
"description":"Snow Showers",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
"night": {
"description": "Snow Showers",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/13n@2x.png"
}
},
"95":{
"day":{
"description":"Thunderstorm",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11d@2x.png"
"95": {
"day": {
"description": "Thunderstorm",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11d@2x.png"
},
"night":{
"description":"Thunderstorm",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11n@2x.png"
"night": {
"description": "Thunderstorm",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11n@2x.png"
}
},
"96":{
"day":{
"description":"Light Thunderstorms With Hail",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11d@2x.png"
"96": {
"day": {
"description": "Light Thunderstorms With Hail",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11d@2x.png"
},
"night":{
"description":"Light Thunderstorms With Hail",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11n@2x.png"
"night": {
"description": "Light Thunderstorms With Hail",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11n@2x.png"
}
},
"99":{
"day":{
"description":"Thunderstorm With Hail",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11d@2x.png"
"99": {
"day": {
"description": "Thunderstorm With Hail",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11d@2x.png"
},
"night":{
"description":"Thunderstorm With Hail",
"image":"https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11n@2x.png"
"night": {
"description": "Thunderstorm With Hail",
"image": "https://wsrv.nl/?l=9w=24&url=https://openweathermap.org/img/wn/11n@2x.png"
}
}
}

View file

@ -93,7 +93,7 @@ export default () => {
</ul>
<hr class="sidebar-divider" />
<button class="btn btn-secondary" type={"button"} onClick={() => {localStorage.setItem("sidebar", "false"); location.reload()}}>Save & Close</button>
<button class="btn btn-secondary" type={"button"} onClick={() => { localStorage.setItem("sidebar", "false"); location.reload() }}>Save & Close</button>
<hr class="sidebar-divider" />
<h6>About</h6>

View file

@ -19,9 +19,9 @@ dataset.bsCore = localStorage.getItem("theme") || "default";
const favicon = document.getElementById("favicon") as HTMLLinkElement;
fetch(`https://wttr.in/${localStorage.getItem("location") || ""}?format=%c`)
.then(res => res.text())
.then(emoji => {
.then(res => res.text())
.then(emoji => {
favicon.href = `data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>${emoji.trim()}</text></svg>`
})
})
render(<App />, document.getElementById('app')!)

View file

@ -4,11 +4,19 @@
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": [
"ES2020",
"DOM",
"DOM.Iterable"
],
"skipLibCheck": true,
"paths": {
"react": ["./node_modules/preact/compat/"],
"react-dom": ["./node_modules/preact/compat/"]
"react": [
"./node_modules/preact/compat/"
],
"react-dom": [
"./node_modules/preact/compat/"
]
},
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
@ -17,12 +25,13 @@
"noEmit": true,
"jsx": "react-jsx",
"jsxImportSource": "preact",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src"]
"include": [
"src"
]
}

View file

@ -1,7 +1,11 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
]
}

View file

@ -2,21 +2,23 @@
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"lib": [
"ES2023"
],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
"include": [
"vite.config.ts"
]
}

View file

@ -17,7 +17,7 @@ export default defineConfig({
})
]
}
} : {transformer: "lightningcss"}
} : { transformer: "lightningcss" }
},
build: {
cssMinify: "lightningcss",