treehouse/template/_new.hbs

73 lines
2.3 KiB
Handlebars
Raw Permalink Normal View History

2024-02-21 23:17:19 +01:00
<!DOCTYPE html>
<html lang="en-US" prefix="og: https://ogp.me/ns#">
<head>
{{> components/_head.hbs }}
</head>
<body>
{{#> components/_nav.hbs }}
{{!-- For /index, include a "new" link that goes to the curated news feed page. --}}
{{#if (eq page.tree_path "index")}}
2024-03-03 21:39:54 +01:00
<a href="{{ config.site }}/treehouse/new" data-cast="new">new</a>
2024-02-21 23:17:19 +01:00
{{/if}}
{{/ components/_nav.hbs }}
{{> components/_noscript.hbs }}
<section>
<p>welcome!</p>
<p>since you clicked here, you must be curious as to what's been going on since your last visit to the house. so
here's a recap just for you - enjoy!</p>
</section>
{{> components/_tree.hbs }}
<section>
<p>note that this page does not include any updates that were made to the website itself - for that, you can
2024-03-03 21:39:54 +01:00
visit <a href="{{ config.site }}/treehouse/changelog">the changelog</a>.
2024-02-21 23:17:19 +01:00
</p>
</section>
2024-03-03 21:23:37 +01:00
<section class="settings" data-cast="js">
2024-02-21 23:17:19 +01:00
<details>
<summary>
settings
</summary>
<section>
<p>if you find the newsfeed annoying, you can customize some aspects of it.</p>
<p>
2024-03-03 21:23:37 +01:00
<input type="checkbox" data-cast="setting-checkbox" id="showNewPostIndicator">
2024-02-21 23:17:19 +01:00
<label for="showNewPostIndicator">show the <span class="badge red">1</span> badge on the homepage
for
new posts you haven't read yet</label>
</p>
<p>
<button id="mark-all-as-unread"
title="Mostly useful for debugging purposes, but it's there if you really wanna do it.">
mark all as unread</button>
</p>
</section>
</details>
</section>
{{!-- For all pages except the one linked from the footer, include the footer icon. --}}
{{#if (ne page.tree_path "treehouse")}}
{{> components/_footer.hbs }}
{{/if}}
<script type="module" defer>
import { initNewsPage, markAllAsUnread } from "{{ config.site }}/static/js/news.js";
initNewsPage();
document.getElementById("mark-all-as-unread").addEventListener("click", () => {
markAllAsUnread();
alert("congration! you done it");
});
</script>
</body>
2024-03-03 21:23:37 +01:00
</html>