Back to City Breaker
SOURCE / PINNED RELEASE

Made of little things.

City Breaker

Release
94d2b8664b10…
Author-recorded commit
df23103cbcc1…
License
LICENSE
Author’s source reference
nostr://npub1sj2vketepqw9v6fmge5fdzuj7atj9sv6qv2jss05n2z6rl64lcfqumdsnt/wss%3A%2F%2Fgit.napplet.soy%2F/n-cf8b858653e

Archive hash verified: eeeed725668c1ece…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

src/main.ts
import './napplet-settings.js';
import { STORAGE_DOMAIN, THEME_DOMAIN } from '@napplet/sdk';
import { runtimeHasDomain } from './domain-availability.js';
import { App } from './ui/app';
import { installTooltips } from './ui/tooltip';
import './styles.css';

// City Breaker keeps its own DEFCON palette: the host theme is not applied.
// See docs/city-breaker-brief.md for the visual direction and theme policy.
const FOLLOW_HOST_THEME = false;
document.documentElement.dataset.hostTheme = FOLLOW_HOST_THEME && runtimeHasDomain(THEME_DOMAIN) ? 'on' : 'off';
document.documentElement.dataset.storage = runtimeHasDomain(STORAGE_DOMAIN) ? 'yes' : 'no';

const root = document.querySelector<HTMLElement>('#app');
if (!root) throw new Error('Missing #app');
installTooltips();
new App(root);

// Below the playable minimum, show a notice instead of a crushed command post.
const notice = document.querySelector<HTMLElement>('#tooSmall');
function checkSize(): void {
  const small = window.innerWidth < 300 || window.innerHeight < 260;
  if (notice) notice.hidden = !small;
  root!.toggleAttribute('inert', small);
}
window.addEventListener('resize', checkSize);
checkSize();