Skylines is a site that generates random city names and skylines. The building windows randomly change between grayscale colors, and the sun/moon toggles day and night modes.
City names were taken from Wikipedia's List of national capitals article, released under the Creative Commons Attribution-ShareAlike License 3.0.
Names are generated using the namerator module. Skylines are generated by creating SVG elements for a random number of buildings (with random dimensions and placement for each). Local storage is used to apply a previously chosen day/night mode.
The site's script, index.js
, is bundled from the TypeScript source in the ts
directory using this command:
deno bundle ts/index.ts index.js
The deno.json
file is implicitly required, as it specifies dom-related
libraries to use when bundling.