summaryrefslogtreecommitdiff
path: root/_.erb.html
blob: be8bbf53a04ddc0e42408da986beae06ee897a76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!doctype html>
<title>On Point</title>
<meta charset=utf8>
<link rel=manifest href=manifest.json>

<style>
section:nth-of-type(2) {
  width: 19em;
  display: flex;
  justify-content: space-between;
}

input[type=number] { width: 5em }

<%= style %>
</style>

<body>

<template>
<section>
<%= card[:html] %>
<%= reviewer[:html] %>
</section>

<hr>

<section>
<%= deck[:html] %>
</section>

<section>
<%= settings[:html] %>
</section>

<section>
<%= ie[:html] %>
</section>
</template>

<script>
<%= utils[:script] %>
<%= storage[:script] %>

// Hacks!
let $loaded_p = (async () => {
  $deck = await แนก.get("deck") || []
  $settings = {...$default_settings, ...(await แนก.get("settings"))}
})().then(() => {
  let e = document.querySelector("template")
  e.outerHTML = e.innerHTML
})

<%= card[:script] %>
<%= reviewer[:script] %>
<%= settings[:script] %>
<%= deck[:script] %>
<%= ie[:script] %>
</script>