repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
ContourField.astroAstro28 lines1.3 KiBraw download
<canvas class="contour-field" data-contour aria-hidden="true"></canvas>

<script>
  // The ground the home hero, every section banner and every document
  // header stand on: daemon-sec's contour field (src/scripts/dmn/contour-field.ts), flowing
  // lines in the six accents. It reads this site's mode-flipping tokens off
  // the canvas (inside a `.plate` band, the band's night values), and keeps
  // its lines out of the hero's `[data-index-zone]` box and anything marked
  // `data-contour-clear`, so type sits on clean ground.
  import { mountContourField } from '../scripts/dmn/contour-field';

  const cleanups = new Set<() => void>();
  function init(): void {
    document.querySelectorAll<HTMLCanvasElement>('[data-contour]:not([data-bound])').forEach((canvas) => {
      canvas.dataset.bound = '1';
      cleanups.add(mountContourField(canvas, { onFail: () => canvas.remove() }));
    });
  }

  // The field belongs to its page; hand its WebGL context back before Astro swaps it.
  document.addEventListener('astro:before-swap', () => {
    cleanups.forEach((cleanup) => cleanup());
    cleanups.clear();
  });
  document.addEventListener('astro:page-load', init);
  if (document.readyState !== 'loading') init();
  else document.addEventListener('DOMContentLoaded', init, { once: true });
</script>