~ knotless Search/
↑↓ move↵ open⇧↵ all results

johnandersen777.bsky.social/knotless

git that lives in your Atmosphere account

Forked from chadtmiller.com/knotless

0
0
21 lines · 697 B Raw History
<script lang="ts">
	/**
	 * The ways to see a text file, the one shown marked: made into HTML, for
	 * Markdown, when given `preview`; its code; and who last changed each
	 * line, when given `blame`.
	 */
	let {
		preview,
		code,
		blame,
		current
	}: { preview?: string; code: string; blame?: string; current: 'preview' | 'code' | 'blame' } =
		$props();
	const on = (view: string) => (view === current ? 'page' : undefined);
</script>

<nav class="filter" data-sveltekit-reset="false">
	{#if preview}<a href={preview} aria-current={on('preview')}>Preview</a>{/if}
	<a href={code} aria-current={on('code')}>Code</a>
	{#if blame}<a href={blame} aria-current={on('blame')}>Blame</a>{/if}
</nav>