-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d41f43
commit ca6cafd
Showing
8 changed files
with
99 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# These are supported funding model platforms | ||
|
||
github: | ||
- nic-hartley | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<h1>{{ page.title }}</h1> | ||
<p id="byline">{{ page.author }} – {{ page.date | date: "%B %e, %Y" }}</p> | ||
<hr> | ||
{{ content }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Happy 2022! | ||
tags: | ||
- foo | ||
- bar | ||
- test | ||
--- | ||
|
||
testing blog post for testing purposes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Unfortunate News | ||
tags: | ||
- baz | ||
- test | ||
--- | ||
|
||
testing blog post for testing purposes (part 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: Blog | ||
--- | ||
|
||
<h1>Blog index</h1> | ||
|
||
<div id="search"> | ||
<p>Filter posts by tag: | ||
{% for tag in site.tags %} | ||
<label><input type="checkbox" data-tag="{{ tag[0] }}"> {{ tag[0] }}</label> | ||
{% endfor %} | ||
</p> | ||
</div> | ||
|
||
<ul id="blogposts"> | ||
{% for post in site.posts %} | ||
<li data-tags="{% for tag in post.tags %}{{ tag }} {% endfor %}"> | ||
<a href="{{ post.url }}">{{ post.title }}</a> | ||
<ul class="tags"> | ||
{% for tag in post.tags %} | ||
<li>{{ tag }}</li> | ||
{% endfor %} | ||
</ul> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
|
||
<p id="noresults">No results.</p> | ||
|
||
<script> | ||
function updateSearch() { | ||
let tags = [...document.querySelectorAll("#search input[type=checkbox]")] | ||
.filter(e => e.checked) | ||
.map(e => e.dataset.tag); | ||
|
||
let any_shown = false; | ||
for (let item of document.querySelectorAll("#blogposts > li")) { | ||
console.log(item.dataset); | ||
let item_tags = item.dataset.tags.split(/\s+/g); | ||
let include = true; | ||
if (tags.length > 0 && !tags.every(t => item_tags.includes(t))) { | ||
include = false; | ||
} | ||
item.style.display = include ? "" : "none"; | ||
any_shown ||= include; | ||
} | ||
document.querySelector("#noresults").style.display = any_shown ? "none" : ""; | ||
} | ||
|
||
document.querySelectorAll("#search input[type=checkbox]").forEach(input => input.addEventListener('change', updateSearch)); | ||
|
||
updateSearch(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters