forked from Soundofdarkness/RuneBook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
72 lines (63 loc) · 2.12 KB
/
index.html
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
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
/>
<link
rel="stylesheet"
type="text/css"
href="./node_modules/semantic-ui-css/semantic.min.css"
/>
<link rel="stylesheet" type="text/css" href="style.css" />
<style type="text/css">
img {
user-select: none;
}
</style>
</head>
<body>
<runebook></runebook>
<script>
window.$ = window.jQuery = require("jquery");
var riot = require("riot");
// add new tag: markup
riot.tag("markup", "", function (opts) {
this.on("update", function () {
let markup = opts.data;
if (!markup) return;
let renderer = new marked.Renderer();
renderer.link = (href, title, text) =>
`<a target="_blank" href="${href}" title="${title}">${text}</a>`;
marked.use({ renderer });
this.root.innerHTML = marked.parse(markup);
});
});
</script>
<script src="./node_modules/semantic-ui-css/semantic.min.js"></script>
<script src="./node_modules/riot-i18n/riot-i18n.js"></script>
<script src="./node_modules/marked/marked.min.js"></script>
<script type="text/javascript">
var freezer = require("./src/state");
var _ = require("lodash");
const locales = require("./src/locales");
i18n.dictionary(locales);
require("./src/app");
require("./tags/runebook.tag");
require("./tags/select-champion.tag");
require("./tags/chapters-segment.tag");
require("./tags/page-list.tag");
require("./tags/item-set.tag");
require("./tags/current-page.tag");
require("./tags/connection-status.tag");
require("./tags/update-button.tag");
require("./tags/settings-panel.tag");
require("./tags/changelog-modal.tag");
let selectedTheme = freezer.get().configfile.darktheme ? "dark" : "light";
document.documentElement.setAttribute("data-theme", selectedTheme);
riot.mount("runebook", freezer.get());
</script>
</body>
</html>