mirror of
https://github.com/awizemann/scarf.git
synced 2026-05-10 18:44:45 +00:00
catalog: rebuild at 2026-05-03T18:56:56Z
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>HackerNews Daily Digest — Scarf Templates</title>
|
||||
<meta name="description" content="A daily digest of HackerNews top stories. Pulls Hacker News' Firebase API, filters by minimum score and optional topics, prepends a markdown digest to digest.md, and keeps the dashboard's top stories list current. No API keys required.">
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<link rel="icon" type="image/png" href="../assets/icon.png">
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<a class="brand" href="..">
|
||||
<img src="../assets/icon.png" alt="" width="40" height="40">
|
||||
<span class="brand-name">Scarf Templates</span>
|
||||
</a>
|
||||
<nav class="site-nav">
|
||||
<a href="..">Catalog</a>
|
||||
<a href="https://github.com/awizemann/scarf">GitHub</a>
|
||||
<a href="https://github.com/awizemann/scarf/blob/main/templates/CONTRIBUTING.md">Contribute</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="detail">
|
||||
<section class="detail-header">
|
||||
<div>
|
||||
<h1>HackerNews Daily Digest <span class="version">v1.0.0</span></h1>
|
||||
<p class="desc">A daily digest of HackerNews top stories. Pulls Hacker News' Firebase API, filters by minimum score and optional topics, prepends a markdown digest to digest.md, and keeps the dashboard's top stories list current. No API keys required.</p>
|
||||
<p class="meta">
|
||||
<span class="author">by <a href="https://github.com/awizemann">Alan Wizemann</a></span>
|
||||
<span class="id">awizemann/hackernews-digest</span>
|
||||
<span class="category">news</span>
|
||||
</p>
|
||||
<p class="tags"><span class="tag">news</span><span class="tag">digest</span><span class="tag">hackernews</span><span class="tag">cron</span><span class="tag">starter</span><span class="tag">configurable</span></p>
|
||||
</div>
|
||||
<div class="install-actions">
|
||||
<a class="btn btn-primary" href="scarf://install?url=https://raw.githubusercontent.com/awizemann/scarf/main/templates/awizemann/hackernews-digest/hackernews-digest.scarftemplate">Install with Scarf</a>
|
||||
<a class="btn btn-secondary" href="https://raw.githubusercontent.com/awizemann/scarf/main/templates/awizemann/hackernews-digest/hackernews-digest.scarftemplate">Download .scarftemplate</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="detail-dashboard">
|
||||
<h2>Live dashboard preview</h2>
|
||||
<p class="detail-dashboard-note">
|
||||
Exactly what you'll see inside Scarf after install. Values shown here are
|
||||
placeholders; the agent updates them each time the cron job runs.
|
||||
</p>
|
||||
<div id="dashboard-preview"></div>
|
||||
</section>
|
||||
|
||||
<section class="detail-config">
|
||||
<div id="config-schema"></div>
|
||||
</section>
|
||||
|
||||
<section class="detail-readme">
|
||||
<h2>README</h2>
|
||||
<div id="readme-body"></div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<p>
|
||||
Scarf is open source:
|
||||
<a href="https://github.com/awizemann/scarf">github.com/awizemann/scarf</a>.
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<script src="../widgets.js"></script>
|
||||
<script>
|
||||
// Fetch + render dashboard + README + config schema at page load.
|
||||
// Dashboard + README live next to index.html in this template's
|
||||
// detail dir; the config schema comes from the sibling manifest.json
|
||||
// that the build-catalog renderer also copies in.
|
||||
(async function () {
|
||||
const dashboardEl = document.getElementById("dashboard-preview");
|
||||
const readmeEl = document.getElementById("readme-body");
|
||||
const configEl = document.getElementById("config-schema");
|
||||
try {
|
||||
const d = await fetch("dashboard.json").then(r => r.json());
|
||||
ScarfWidgets.renderDashboard(dashboardEl, d);
|
||||
} catch (e) {
|
||||
dashboardEl.textContent = "Could not load dashboard preview.";
|
||||
}
|
||||
try {
|
||||
const md = await fetch("README.md").then(r => r.text());
|
||||
readmeEl.innerHTML = ScarfWidgets.renderMarkdown(md);
|
||||
} catch (e) {
|
||||
readmeEl.textContent = "Could not load README.";
|
||||
}
|
||||
try {
|
||||
// manifest.json may not exist for schema-less templates — that's
|
||||
// fine, we just leave the config section empty.
|
||||
const res = await fetch("manifest.json");
|
||||
if (res.ok) {
|
||||
const manifest = await res.json();
|
||||
ScarfWidgets.renderConfigSchema(configEl, manifest.config);
|
||||
}
|
||||
} catch (e) {
|
||||
// Silent — config-schema display is optional.
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user