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
RecordRow.astroAstro66 lines2.4 KiBraw download
---
import Icon from './Icon.astro';
import ReportMark from './ReportMark.astro';
import type { SheetFacets } from '../lib/sheets';

interface Props {
  href: string;
  /** Zero-padded index, supplied by the list so a row never has to know
   *  where it sits. */
  n: string;
  title: string;
  reportGuide?: boolean;
  /** The kind mark — the domain tag for a sheet, the topic for a payload. */
  kind: string;
  kindIcon?: string;
  accent?: string;
  /** Trailing slot: date / page count. Dropped below md. */
  meta?: string;
  /** Disclosure detail, revealed on hover/focus. */
  excerpt?: string;
  tagline?: string;
  /** Client-side filter bucket (index page). */
  bucket?: string;
  /** Facets for the sheet filter panel. A row without them is not filterable
   *  and the panel ignores it. */
  facets?: SheetFacets;
}
const { href, n, title, kind, kindIcon = 'doc', accent = 'foam', meta, excerpt, tagline, bucket, reportGuide, facets } = Astro.props;
// `|` cannot occur in a tag or a tool name, so it is a safe separator where
// a space or a comma is not (`John the Ripper`, `responder, ntlmrelayx`).
const filterAttrs = facets
  ? {
      'data-sf-row': '',
      'data-text': facets.text,
      'data-tags': facets.tags.join('|'),
      'data-tools': facets.tools.join('|'),
      'data-diff': facets.diff,
      'data-sec': facets.sec,
    }
  : {};

/**
 * One record in an index — the site's core object, ported from the main
 * site's RecordRow. One line, not a card: the title is NOT a display heading,
 * so a list of fifty stays scannable.
 *
 * Rule #6 of the redesign handoff: the hover is a PAPER wash (`--overlay`),
 * not the solid ink wipe — the title must stay ≥4.5:1 on hover — so nothing
 * here re-colours the text on hover. See `.rec` in daemon.css.
 */
---
<a class="rec" href={href} style={`--acc: var(--${accent});`} data-bucket={bucket} {...filterAttrs}>
  <span class="rec__grid">
    <span class="rec__n">{n}</span>
    <span class="rec__kind"><Icon name={kindIcon} /> {kind}</span>
    <span class="rec__title">{title} <ReportMark marked={reportGuide} /></span>
    <span class="rec__date">{meta}</span>
    <span class="rec__arrow"><Icon name="chevron" /></span>
    {(excerpt || tagline) && (
      <span class="rec__reveal"><span>
        {excerpt && <span class="rec__excerpt">{excerpt}</span>}
        {tagline && <span class="rec__tagline">{tagline}</span>}
      </span></span>
    )}
  </span>
</a>