Skip to content

Commit 7f7f76f

Browse files
committed
add version and update terms and privacy model
1 parent 5b918f0 commit 7f7f76f

4 files changed

Lines changed: 142 additions & 105 deletions

File tree

packages/web/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
<head>
44
<meta charset="UTF-8" />
55
<title>Nate Papes / Contents</title>
6+
<meta name="description" content="Nate Papes / Contents" />
7+
<meta name="type" content="website" />
8+
<meta name="author" content="Nate Papes" />
69
<meta
7-
name="description"
8-
content="Drawn to complex problems. Bad at giving up on them."
10+
name="technology"
11+
content="Experimental Metadata-Enriched RSS Linker Node (MERLN) project."
912
/>
1013
<meta
1114
name="viewport"
@@ -30,7 +33,7 @@
3033
<meta property="og:title" content="Nate Papes / Contents" />
3134
<meta
3235
property="og:description"
33-
content="Metadata-Enriched RSS Linker Node (MERLN)"
36+
content="Metadata-Enriched RSS Linker Node (MERLN) experiment."
3437
/>
3538
<meta property="og:url" content="https://natepapes.com" />
3639
<meta property="og:type" content="website" />

packages/web/src/index.css

Lines changed: 58 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,16 @@ header {
210210

211211
@media (max-width: 45rem) {
212212
div.right {
213-
.github,
214-
.search-container {
213+
/* Hide optional GitHub icon but keep search visible on mobile */
214+
.github {
215215
display: none;
216216
}
217+
218+
/* Allow search to take full width on smaller screens */
219+
.search-container {
220+
flex: 1 1 100%;
221+
min-width: 0;
222+
}
217223
}
218224
}
219225
}
@@ -367,6 +373,13 @@ tbody {
367373
color: var(--color-brand) !important;
368374
}
369375

376+
/* Content description under title */
377+
.content-description {
378+
font-size: 0.9em;
379+
color: var(--color-text-secondary);
380+
margin-top: 0.25rem;
381+
}
382+
370383
.modalities {
371384
display: flex;
372385
gap: 0.25rem;
@@ -418,14 +431,14 @@ body {
418431
}
419432

420433
/* Fixed footer */
421-
#site-footer {
434+
.site-footer {
422435
position: fixed;
423436
bottom: 0;
424437
left: 0;
425438
width: 100%;
426439
height: 2.5rem;
427440
display: flex;
428-
justify-content: flex-end;
441+
justify-content: space-between;
429442
align-items: center;
430443
padding: 0 0.75rem;
431444
gap: 0.75rem;
@@ -436,13 +449,39 @@ body {
436449
font-size: 0.75rem;
437450
}
438451

439-
#site-footer a {
452+
.site-footer a,
453+
span {
440454
color: var(--color-text-secondary);
441455
}
442456

443-
#site-footer a:hover {
457+
.site-footer a:hover {
458+
color: var(--color-brand);
459+
}
460+
461+
/* Ensure footer version uses same color as footer links */
462+
.site-footer .footer-item {
463+
color: var(--color-text-secondary);
464+
}
465+
466+
/* Align items horizontally inside footer left */
467+
.site-footer .footer-left {
468+
display: flex;
469+
align-items: center;
470+
gap: 0.75rem;
471+
}
472+
473+
/* GitHub icon in footer */
474+
.site-footer a.github {
475+
flex: 0 0 auto;
476+
height: 24px;
477+
color: var(--color-text-secondary);
478+
}
479+
.site-footer a.github:hover {
444480
color: var(--color-brand);
445481
}
482+
.site-footer a.github svg {
483+
opacity: var(--icon-opacity);
484+
}
446485

447486
/* Modal styles */
448487
.modal {
@@ -485,23 +524,17 @@ body {
485524
cursor: pointer;
486525
}
487526

488-
.modal-content.terms {
489-
ul {
490-
list-style: disc;
491-
padding-left: 1.5rem;
492-
margin-bottom: 1rem;
493-
li {
494-
font-family: var(--font-mono);
495-
list-style: none;
496-
margin-bottom: 0.5rem;
497-
strong {
498-
color: var(--color-text);
499-
display: block;
500-
}
501-
a {
502-
color: var(--color-brand);
503-
text-decoration: underline;
504-
}
505-
}
506-
}
527+
/* Improved styling for Terms and Privacy modal */
528+
.modal-content.terms section {
529+
margin-bottom: 1.25rem;
530+
}
531+
532+
.modal-content.terms section p {
533+
margin-left: 1rem; /* Indent section content */
534+
}
535+
536+
.modal-content.terms a {
537+
color: var(--color-brand);
538+
text-decoration: underline dotted;
539+
text-underline-offset: 0.1875rem;
507540
}

packages/web/src/render.tsx

Lines changed: 73 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,13 @@ export const Rendered = renderToString(
1919
<p>Contents</p>
2020
</div>
2121
<div class="right">
22-
<a
23-
class="github"
24-
target="_blank"
25-
rel="noopener noreferrer"
26-
href="https://github.com/papes1ns/spin.dev"
27-
>
28-
<svg
29-
xmlns="http://www.w3.org/2000/svg"
30-
width="24"
31-
height="24"
32-
viewBox="0 0 24 24"
33-
>
34-
<path
35-
fill="currentColor"
36-
d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
37-
></path>
38-
</svg>
39-
</a>
4022
<div class="search-container">
41-
<input type="text" id="search" placeholder="Filter contents" />
23+
<input
24+
type="text"
25+
id="search"
26+
placeholder="Filter contents"
27+
autofocus
28+
/>
4229
<span class="search-shortcut">⌘K</span>
4330
</div>
4431
</div>
@@ -82,8 +69,9 @@ export const Rendered = renderToString(
8269
<td>
8370
<strong>{content.title}</strong>
8471
{content.description && (
85-
<div style="font-size: 0.9em; color: #666; margin-top: 4px;">
86-
{content.description.slice(0, 45)}...
72+
<div class="content-description">
73+
{content.description.slice(0, 45)}
74+
{content.description.length > 45 ? "..." : ""}
8775
</div>
8876
)}
8977
</td>
@@ -98,20 +86,13 @@ export const Rendered = renderToString(
9886
)}
9987
</td>
10088
<td>
101-
{(() => {
102-
try {
103-
return new URL(content.url).hostname.replace(
104-
"www.",
105-
""
106-
);
107-
} catch {
108-
return "-";
109-
}
110-
})()}
89+
{new URL(content.url).hostname.replace("www.", "")}
11190
</td>
11291
<td>
11392
{content.estimated_time_minutes !== undefined
114-
? `${content.estimated_time_minutes} min`
93+
? `${content.estimated_time_minutes} min${
94+
content.estimated_time_minutes > 1 ? "s" : ""
95+
}`
11596
: "-"}
11697
</td>
11798
<td>
@@ -130,73 +111,89 @@ export const Rendered = renderToString(
130111
</tbody>
131112
</table>
132113

133-
<footer id="site-footer">
134-
<div>
135-
<a href="#" id="open-terms">
136-
Terms &amp; Privacy
114+
<footer class="site-footer">
115+
<div class="footer-left">
116+
<div class="footer-item">
117+
<a
118+
class="github"
119+
target="_blank"
120+
rel="noopener noreferrer"
121+
href="https://github.com/papes1ns/spin.dev"
122+
>
123+
<svg
124+
xmlns="http://www.w3.org/2000/svg"
125+
width="24"
126+
height="24"
127+
viewBox="0 0 24 24"
128+
>
129+
<path
130+
fill="currentColor"
131+
d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
132+
></path>
133+
</svg>
134+
</a>
135+
</div>
136+
<div class="footer-item">
137+
Version:{" "}
138+
{await Bun.file(
139+
path.join(import.meta.dir, "..", "..", "..", "VERSION")
140+
).text()}
141+
</div>
142+
</div>
143+
<div class="footer-right">
144+
<a href="#" id="open-terms" role="modal">
145+
Terms and Privacy
137146
</a>
138147
</div>
139148
</footer>
140149

141150
<div id="terms-modal" class="modal">
142151
<div class="modal-content terms">
143-
<h2>Terms &amp; Privacy</h2>
144-
<ul>
145-
<li>
146-
<strong>Privacy</strong>
147-
This is a static site hosted on Cloudflare. Cloudflare sets cookies
148-
to keep the service protected. By using the site you are opting in
149-
to Cloudflare's privacy policy. You can read more about their
150-
<a href="https://www.cloudflare.com/privacypolicy/" target="_blank">
151-
privacy policy
152-
</a>
153-
. PII is not collected, ever.
154-
</li>
155-
<li>
156-
<strong>API</strong>
152+
<h2>Terms and Privacy</h2>
153+
<section>
154+
<h3>Terms</h3>
155+
<p>
157156
If you wish for content to be removed or want to consume the{" "}
158157
<a href="/api.json" target="_blank">
159-
API
158+
/api.json
160159
</a>
161160
, please contact me at{" "}
162161
<a href="mailto:hello@natepapes.com" target="_blank">
163162
hello@natepapes.com
164163
</a>
165164
, otherwise follow the rules in the{" "}
166165
<a href="/robots.txt" target="_blank">
167-
robots.txt
166+
/robots.txt
168167
</a>{" "}
169-
file please.
170-
</li>
171-
<li>
172-
<strong>Open Source</strong>
173-
This site is open source. You can find the source code on{" "}
174-
<a href="https://github.com/papes1ns/spin.dev" target="_blank">
175-
github.com/papes1ns/spin.dev
176-
</a>
177-
.
178-
</li>
179-
<li>
180-
<strong>MERLN</strong>
181-
This site embodies an experimental open source software project I
182-
coined as a, MERLN, expanded means{" "}
183-
<em>Metadata Enriched RSS Linker Node</em>. Built for education on
184-
fair use and ethical practices in the ethos based in open science.
185-
</li>
186-
<li>
187-
<strong>Acknowledgements</strong>
168+
file.
169+
</p>
170+
</section>
171+
<section>
172+
<h3>Privacy</h3>
173+
<p>PII is not collected.</p>
174+
<p>Cloudflare sets cookies to keep the service protected.</p>
175+
</section>
176+
<section>
177+
<h3>Acknowledgements</h3>
178+
<p>
188179
This project was forked from the{" "}
189180
<a href="https://models.dev" target="_blank">
190-
model.dev
181+
models.dev
191182
</a>{" "}
192183
project built by the{" "}
193184
<a href="https://sst.dev" target="_blank">
194185
SST team
195186
</a>
196-
. They are raising the bar in open source IaC and AI cli tools for
197-
developers.
198-
</li>
199-
</ul>
187+
.
188+
</p>
189+
</section>
190+
<section>
191+
<h3>Metadata-Enriched RSS Linker Node (MERLN)</h3>
192+
<p>
193+
This MERLN is built for education on fair use and ethical practices
194+
based on an open science ethos.
195+
</p>
196+
</section>
200197
<button id="close-terms">Close</button>
201198
</div>
202199
</div>

script/rss.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import { Content, Provider } from "@spin.dev/core";
18+
import { $ } from "bun";
1819
import fs from "fs/promises";
1920
import path from "path";
2021
// (Bun currently ships a TOML parser but no serializer, so we keep a tiny helper)
@@ -461,4 +462,7 @@ for (const [providerId, cfg] of Object.entries(configs)) {
461462
// Persist updated cache once all providers processed
462463
await saveCache();
463464

464-
console.log("✅ providers folder refreshed (polite mode enabled)");
465+
// save version
466+
const version =
467+
await $`echo "$(date '+%Y.%m.%d').$(git rev-parse --short HEAD)" > ../VERSION`.text();
468+
console.log("✅ providers folder refreshed, version: ${version}");

0 commit comments

Comments
 (0)