[section].astroAstro49 lines2.1 KiBtoo large to serve raw — clone the repo
---
import ContourField from '../../../components/ContourField.astro';
import Base from '../../../layouts/Base.astro';
import RecordRow from '../../../components/RecordRow.astro';
import { hackTricksBySection, hackTricksHref } from '../../../lib/hacktricks';
import { url } from '../../../lib/url';
export async function getStaticPaths() {
return (await hackTricksBySection()).map((section) => ({
params: { section: section.slug },
props: { section },
}));
}
const { section } = Astro.props;
const accents = ['gold', 'love', 'foam', 'pine', 'iris', 'rose'];
---
<Base title={`${section.title} — HackTricks — DÆMON//SEC`} description={`${section.count} attributed HackTricks pages for ${section.title}.`}>
<div class="wrap" style="padding-bottom:3rem;">
<nav class="breadcrumb" style="margin-top:1.6rem;">
<a href={url('')}>~</a><span class="sep">/</span>
<a href={url('hacktricks')} style="color:var(--gold)">hacktricks</a><span class="sep">/</span>
<span class="muted">{section.slug}</span>
</nav>
<header class="sheet-head signal-hero">
<ContourField />
{/* Each line of the head hugs its words and is a clearing in the
field, so the contour lines show beside the type, not under it. */}
<p class="eyebrow" data-contour-clear style="color:var(--gold);width:fit-content">// HackTricks · CC BY-NC 4.0</p>
<h1 class="sheet-title" data-contour-clear style="width:fit-content">{section.title}</h1>
<p class="muted" data-contour-clear style="width:fit-content">{section.count} pages · adapted from upstream with source attribution on every page.</p>
</header>
<div class="index">
{section.items.map((entry, index) => (
<RecordRow
href={url(hackTricksHref(entry))}
n={String(index + 1).padStart(3, '0')}
title={entry.data.title}
kind={section.title}
kindIcon="doc"
accent={accents[index % accents.length]}
meta={entry.data.sourcePath.split('/').slice(-2, -1)[0] ?? 'HackTricks'}
/>
))}
</div>
</div>
</Base>