Compare commits
3 commits
8135261352
...
3485d865e8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3485d865e8 | ||
![]() |
4f6623efe9 | ||
![]() |
c7f2f4aeae |
13 changed files with 2393 additions and 692 deletions
|
@ -27,9 +27,8 @@
|
|||
"formatter": {
|
||||
"quoteStyle": "double",
|
||||
"indentStyle": "tab",
|
||||
"lineEnding": "lf",
|
||||
"jsxQuoteStyle": "double",
|
||||
"semicolons": "always"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
29
index.html
29
index.html
|
@ -1,15 +1,18 @@
|
|||
<!doctype html>
|
||||
<html lang="en" data-bs-theme="dark" data-bs-core="default" id="html">
|
||||
<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>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.tsx" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<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>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.tsx" defer></script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -21,4 +21,4 @@
|
|||
"typescript": "~5.7.2",
|
||||
"vite": "^6.2.0"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,8 +5,8 @@ export default () => {
|
|||
<h6 class="display-4">Hello, {localStorage.getItem("name")}.</h6>
|
||||
<br />
|
||||
<br />
|
||||
<form role="search" action={localStorage.getItem("searchEngine") || ""} method="get">
|
||||
<input class="form-control me-2" autoFocus type="search" placeholder={`Search with ${localStorage.getItem("searchEngineName")}`} aria-label="Search with Google" name="q" />
|
||||
<form action={localStorage.getItem("searchEngine") || ""} method="get">
|
||||
<input class="form-control me-2" type="search" placeholder={`Search with ${localStorage.getItem("searchEngineName")}`} aria-label="Search with Google" name="q" />
|
||||
</form>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,7 +17,7 @@ export default () => {
|
|||
<div class="navbar-brand">
|
||||
{wttrDesc}
|
||||
</div>
|
||||
<div class="d-flex hstack gap-2" role="search">
|
||||
<div class="d-flex hstack gap-2">
|
||||
<button type="button" class="btn btn-outline-light btn-sm" onClick={history.back}><ChevronLeft size={20} /></button>
|
||||
<button type="button" class="btn btn-outline-light btn-sm" onClick={history.forward}><ChevronRight size={20} /></button>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const dataset = document.getElementById("html")!.dataset;
|
||||
const dataset = document.documentElement.dataset;
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
|
@ -7,16 +7,16 @@ export default () => {
|
|||
|
||||
<div class="offcanvas-header border-bottom border-secondary border-opacity-25">
|
||||
|
||||
<a class="sidebar-brand" href="#">
|
||||
<span class="sidebar-brand">
|
||||
.
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<button type="button" class="btn-close d-md-none" data-bs-dismiss="offcanvas" aria-label="Close" data-bs-target="#sidebar-example"></button>
|
||||
<button type="button" class="btn-close d-md-none" data-bs-dismiss="offcanvas" data-bs-target="#sidebar-example" />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="offcanvas-body">
|
||||
<label>Name</label>
|
||||
<h6>Name</h6>
|
||||
<form class="d-flex" id="name" onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
const form = document.forms.namedItem("name");
|
||||
|
@ -25,13 +25,13 @@ export default () => {
|
|||
}
|
||||
}}>
|
||||
|
||||
<input name="userName" class="form-control me-2" placeholder="Set Name" aria-label="Set Name" />
|
||||
<input name="userName" class="form-control me-2" placeholder="Set Name" />
|
||||
|
||||
<button class="btn btn-primary" type="submit">Save</button>
|
||||
|
||||
</form>
|
||||
<hr class="sidebar-divider" />
|
||||
<label>Search Engine</label>
|
||||
<h6>Search Engine</h6>
|
||||
<form id="searchEngine" onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
const form = document.forms.namedItem("searchEngine");
|
||||
|
@ -41,15 +41,15 @@ export default () => {
|
|||
}
|
||||
}}>
|
||||
|
||||
<input name="engine" class="form-control me-2" placeholder="e.g. https://google.com/search" aria-label="Set Search Engine" />
|
||||
<input name="engine" class="form-control me-2" placeholder="e.g. https://google.com/search" />
|
||||
<br />
|
||||
<input name="engineName" class="form-control me-2" placeholder="e.g. Google" aria-label="Set Search Engine Name" />
|
||||
<input name="engineName" class="form-control me-2" placeholder="e.g. Google" />
|
||||
<br />
|
||||
<button class="btn btn-primary" type="submit">Save</button>
|
||||
|
||||
</form>
|
||||
<hr class="sidebar-divider" />
|
||||
<label>Weather Location</label>
|
||||
<h6>Weather Location</h6>
|
||||
<form class="d-flex" id="weatherLocation" onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
const form = document.forms.namedItem("weatherLocation");
|
||||
|
@ -58,45 +58,45 @@ export default () => {
|
|||
}
|
||||
}}>
|
||||
|
||||
<input name="location" class="form-control me-2" placeholder="Leave blank for current location" aria-label="Set Search Engine" />
|
||||
<input name="location" class="form-control me-2" placeholder="Leave blank for current location" />
|
||||
|
||||
<button class="btn btn-primary" type="submit">Save</button>
|
||||
|
||||
</form>
|
||||
|
||||
<hr class="sidebar-divider" />
|
||||
<label>Color Scheme</label>
|
||||
<h6>Color Scheme</h6>
|
||||
<ul class="nav nav-pills nav-fill">
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-primary" onClick={() => { localStorage.setItem("colorScheme", "auto"); location.reload() }}>Auto</button>
|
||||
<button class="btn btn-primary" type={"button"} onClick={() => { localStorage.setItem("colorScheme", "auto"); location.reload() }}>Auto</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-primary" onClick={() => { localStorage.setItem("colorScheme", "light"); dataset.bsTheme = "light" }}>Light</button>
|
||||
<button class="btn btn-primary" type={"button"} onClick={() => { localStorage.setItem("colorScheme", "light"); dataset.bsTheme = "light" }}>Light</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-primary" onClick={() => { localStorage.setItem("colorScheme", "dark"); dataset.bsTheme = "dark" }}>Dark</button>
|
||||
<button class="btn btn-primary" type={"button"} onClick={() => { localStorage.setItem("colorScheme", "dark"); dataset.bsTheme = "dark" }}>Dark</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr class="sidebar-divider" />
|
||||
<label>Theme</label>
|
||||
<h6>Theme</h6>
|
||||
<ul class="nav nav-pills nav-fill">
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-primary" onClick={() => { localStorage.setItem("theme", "default"); dataset.bsCore = "default" }}>Default</button>
|
||||
<button class="btn btn-primary" type={"button"} onClick={() => { localStorage.setItem("theme", "default"); dataset.bsCore = "default" }}>Default</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-primary" onClick={() => { localStorage.setItem("theme", "modern"); dataset.bsCore = "modern" }}>Modern</button>
|
||||
<button class="btn btn-primary" type={"button"} onClick={() => { localStorage.setItem("theme", "modern"); dataset.bsCore = "modern" }}>Modern</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-primary" onClick={() => { localStorage.setItem("theme", "elegant"); dataset.bsCore = "elegant" }}>Elegant</button>
|
||||
<button class="btn btn-primary" type={"button"} onClick={() => { localStorage.setItem("theme", "elegant"); dataset.bsCore = "elegant" }}>Elegant</button>
|
||||
</li>
|
||||
</ul>
|
||||
<hr class="sidebar-divider" />
|
||||
|
||||
<button class="btn btn-secondary" 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" />
|
||||
<label>About</label>
|
||||
<h6>About</h6>
|
||||
<p>halfPage is a minimalistic startpage, built on only open-source software.</p>
|
||||
<a href="https://www.gethalfmoon.com/wttr">halfmoon</a>
|
||||
<a href="https://github.com/chubin/wttr.in">wttr.in</a>
|
||||
|
|
12
src/main.tsx
12
src/main.tsx
|
@ -5,7 +5,7 @@ import 'halfmoon/css/cores/halfmoon.modern.css';
|
|||
import 'halfmoon/css/cores/halfmoon.elegant.css';
|
||||
import App from './components/app.tsx'
|
||||
|
||||
const dataset = document.getElementById("html")!.dataset;
|
||||
const dataset = document.documentElement.dataset;
|
||||
|
||||
const colorScheme = localStorage.getItem("colorScheme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light") || "auto";
|
||||
if (colorScheme === "auto") {
|
||||
|
@ -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 => {
|
||||
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>`
|
||||
})
|
||||
.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')!)
|
||||
render(<App />, document.getElementById('app') as HTMLElement || document.body)
|
||||
|
|
|
@ -4,14 +4,20 @@
|
|||
"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/"
|
||||
]
|
||||
},
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
|
@ -19,13 +25,13 @@
|
|||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "preact",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -2,23 +2,23 @@
|
|||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2023"],
|
||||
"lib": [
|
||||
"ES2023"
|
||||
],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
"include": [
|
||||
"vite.config.ts"
|
||||
]
|
||||
}
|
|
@ -17,7 +17,7 @@ export default defineConfig({
|
|||
})
|
||||
]
|
||||
}
|
||||
} : {transformer: "lightningcss"}
|
||||
} : { transformer: "lightningcss" }
|
||||
},
|
||||
build: {
|
||||
cssMinify: "lightningcss",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue