A simple, semantic start page built with HTML, CSS, and a mouse-sized bit of JavaScript.
- Updated dateTime function to display date and time in Chinese format. - Introduced setSearchEngine function to switch between Google and Baidu as search engines. - Added event listener for search engine switching on click. - Persisted selected search engine in localStorage for user preference. - Changed weatherBalloon city ID to Beijing, China. |
||
|---|---|---|
| css | ||
| js | ||
| .gitattributes | ||
| .gitignore | ||
| favicon-16x16.png | ||
| favicon-32x32.png | ||
| favicon.ico | ||
| index.html | ||
| README.md | ||
_trai´chu, n. A simple, semantic start page built with HTML, CSS, and a mouse-sized bit of JavaScript.
_traichu's markup is valid and aims to adhere to HTML semantics. Traditional Japanese, WCAG 2.0 compliant colors make up the color palette. The monospace font is ol' Fira Code loaded via Google Fonts. Icons are inline SVGs, DuckDuckGo's API delivers the favicons, and OpenWeather's API provides the weather forecast and icons. Vanilla JavaScript and CSS handle all interactivity.
DuckDuckGo is the default search engine because privacy is important 'round here.
⚠️ You will need to generate your own OpenWeather API key!
- Register for an OpenWeather account (OpenWeather will generate a default API key)
- Sign in and navigate to Username > API keys and copy the key
- Paste the key into
line 10ofmain.js
How to update your city
- Find your city using OpenWeather's search
- Copy the city ID from the end of the URL
https://openweathermap.org/city/1850147🠆1850147
- Paste the city ID into
line 26ofmain.js

