Skip to content

Commit 821c5b4

Browse files
committed
Using reusable button with no further config needed on all posts
1 parent 89e01da commit 821c5b4

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

_includes/post.njk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
layout: default.njk
3+
templateClass: tmpl-post
4+
---
5+
6+
{{ content | safe }}
7+
8+
<h3>Ready to mark {{title}} as completed?</h3>
9+
10+
<button onClick="toggleCompletedTopic('{{page.url}}')" data-topic="{{page.url}}" class="completed-button">Mark as completed</button>

control-flow/index.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
---
2-
layout: default.njk
2+
layout: post.njk
33
title: Control Flow
44
---
55

6-
<button onClick="toggleCompletedTopic('{{page.url}}')" data-topic="{{page.url}}" class="completed-button">Mark as completed</button>
7-
86
I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhäuser Gate. All those moments will be lost in time, like control flow.
9-
10-
<button onClick="toggleCompletedTopic('{{page.url}}')" data-topic="{{page.url}}" class="completed-button">Mark as completed</button>

events/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: default.njk
2+
layout: post.njk
33
title: Events
44
url: events
55
---

0 commit comments

Comments
 (0)