add wordle
This commit is contained in:
parent
1aa8e512b9
commit
a29ef917c1
|
@ -0,0 +1,5 @@
|
|||
const fs = require('fs').promises;
|
||||
|
||||
module.exports = async (data) => {
|
||||
return JSON.parse((await fs.readFile("/home/jakew/.wordle.json")).toString());
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: wordle
|
||||
layout: main
|
||||
eleventyNavigation:
|
||||
key: Wordle
|
||||
---
|
||||
|
||||
<h1>Wordle</h1>
|
||||
|
||||
<p>Run <code>~jakew/wordle</code> on south london to play!</p>
|
||||
|
||||
{% for game in wordle.games | reverse %}
|
||||
<div>
|
||||
<h4>Day #{{ game.day }} ({{ game.score }}/6)</h4>
|
||||
|
||||
<p>
|
||||
{% for line in game.lines %}
|
||||
{% for i in range(0, 5) %}
|
||||
{%- if i in line.correct -%}
|
||||
🟩
|
||||
{%- elif i in line.present -%}
|
||||
🟨
|
||||
{%- else -%}
|
||||
⬛
|
||||
{%- endif -%}
|
||||
{% endfor %}
|
||||
<br/>
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
Loading…
Reference in New Issue