diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-12-22 19:09:34 +0100 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-12-22 19:09:34 +0100 |
commit | b6d1df48244db14d693c286445ca1384341ae0c1 (patch) | |
tree | 8ce0bdea077e5f132087f53437dab7bc34794233 /data | |
parent | 64ea63f2efadddf9bf185f7ce24bf3c56538b287 (diff) | |
download | shack-b6d1df48244db14d693c286445ca1384341ae0c1.tar.gz shack-b6d1df48244db14d693c286445ca1384341ae0c1.zip |
Add webserver and simple webpage
Diffstat (limited to 'data')
-rw-r--r-- | data/index.html | 31 | ||||
-rw-r--r-- | data/script.js | 15 | ||||
-rw-r--r-- | data/style.css | 40 |
3 files changed, 86 insertions, 0 deletions
diff --git a/data/index.html b/data/index.html new file mode 100644 index 0000000..f3b7068 --- /dev/null +++ b/data/index.html | |||
@@ -0,0 +1,31 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html lang="pl"> | ||
3 | <head> | ||
4 | <meta charset="UTF-8"> | ||
5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
6 | <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
7 | <title>Schack v.0.0.1</title> | ||
8 | <link rel="stylesheet" href="./style.css"> | ||
9 | <link rel="icon" href="./favicon.ico" type="image/x-icon"> | ||
10 | </head> | ||
11 | <body> | ||
12 | <main> | ||
13 | <h1>Schack</h1> | ||
14 | |||
15 | <section id="container"> | ||
16 | <div id="controll-buttons"> | ||
17 | <input id="button-previous-s" type="button" value="<< Previous Section" /> | ||
18 | <input id="button-previous" type="button" value="< Previous" /> | ||
19 | |||
20 | <input id="button-next" type="button" value="Next >" /> | ||
21 | <input id="button-next-s" type="button" value="Next Section >>" /> | ||
22 | </div> | ||
23 | </section> | ||
24 | |||
25 | <footer> | ||
26 | Github: <a href="https://github.com/jdlugosz963/schack" target="_blank">jdlugosz963/schack</a> | ||
27 | </footer> | ||
28 | </main> | ||
29 | <script src="script.js"></script> | ||
30 | </body> | ||
31 | </html> | ||
diff --git a/data/script.js b/data/script.js new file mode 100644 index 0000000..0f3101f --- /dev/null +++ b/data/script.js | |||
@@ -0,0 +1,15 @@ | |||
1 | document.getElementById("button-previous-s").onclick = function() { | ||
2 | fetch("/previouss"); | ||
3 | } | ||
4 | |||
5 | document.getElementById("button-previous").onclick = function() { | ||
6 | fetch("/previous"); | ||
7 | } | ||
8 | |||
9 | document.getElementById("button-next").onclick = function() { | ||
10 | fetch("/next"); | ||
11 | } | ||
12 | |||
13 | document.getElementById("button-next-s").onclick = function() { | ||
14 | fetch("/nexts"); | ||
15 | } | ||
diff --git a/data/style.css b/data/style.css new file mode 100644 index 0000000..52dfca6 --- /dev/null +++ b/data/style.css | |||
@@ -0,0 +1,40 @@ | |||
1 | :root { | ||
2 | --black: #333333; | ||
3 | --white: #eeeeee; | ||
4 | } | ||
5 | |||
6 | body { | ||
7 | background-color: var(--black); | ||
8 | color: var(--white); | ||
9 | |||
10 | font-family: monospace; | ||
11 | letter-spacing: 0.2em; | ||
12 | } | ||
13 | |||
14 | main { | ||
15 | padding: 2em; | ||
16 | } | ||
17 | |||
18 | a { | ||
19 | color: var(--white); | ||
20 | } | ||
21 | |||
22 | h1 { | ||
23 | font-size: 42px; | ||
24 | |||
25 | margin: 0; | ||
26 | } | ||
27 | |||
28 | #container { | ||
29 | padding-top: 2em; | ||
30 | padding-bottom: 2em; | ||
31 | } | ||
32 | |||
33 | input { | ||
34 | padding: 0.5em; | ||
35 | |||
36 | background-color: var(--white); | ||
37 | color: var(--black); | ||
38 | |||
39 | border: none; | ||
40 | } | ||