-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bd29ef
commit 81c3a25
Showing
14 changed files
with
214 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
html { | ||
font-family: sans-serif; | ||
} | ||
|
||
h1, | ||
h2 { | ||
text-align: center; | ||
} | ||
|
||
article { | ||
width: 330px; | ||
min-height: 500px; | ||
margin: 0 auto; | ||
padding: 15px; | ||
background-image: repeating-linear-gradient( | ||
to bottom, | ||
transparent 1px, | ||
transparent 20px, | ||
rgb(0, 0, 150) 21px | ||
), | ||
linear-gradient(to bottom right, white, #ccc); | ||
border-radius: 20px; | ||
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.7); | ||
line-height: 2.5; | ||
} | ||
|
||
ul { | ||
list-style-type: none; | ||
padding-left: 0; | ||
width: 480px; | ||
margin: 0 auto; | ||
padding-bottom: 30px; | ||
} | ||
|
||
li { | ||
float: left; | ||
width: 23%; | ||
} | ||
|
||
ul li a { | ||
display: block; | ||
text-align: center; | ||
color: blue; | ||
text-decoration: underline; | ||
cursor: pointer; | ||
} | ||
|
||
ul li a:hover, | ||
ul li a:focus { | ||
text-decoration: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
|
||
<title>edit</title> | ||
|
||
<link rel="stylesheet" href="../css/edit.css" /> | ||
</head> | ||
|
||
<body> | ||
<button><a href="../index.html">return to homepage</a></button> | ||
<h1>Fetch text example</h1> | ||
<ul> | ||
<li><a data-page="page1">Page 1</a></li> | ||
<li><a data-page="page2">Page 2</a></li> | ||
<li><a data-page="page3">Page 3</a></li> | ||
</ul> | ||
<article></article> | ||
|
||
<script> | ||
const myArticle = document.querySelector("article"); | ||
const myLinks = document.querySelectorAll("ul a"); | ||
for (const link of myLinks) { | ||
link.onclick = (e) => { | ||
e.preventDefault(); | ||
const linkData = e.target.getAttribute("data-page"); | ||
getData(linkData); | ||
}; | ||
} | ||
|
||
function getData(pageId) { | ||
console.log(pageId); | ||
const myRequest = new Request(`${pageId}.txt`); | ||
|
||
fetch(myRequest) | ||
.then((response) => { | ||
if (!response.ok) { | ||
throw new Error(`HTTP error, status = ${response.status}`); | ||
} | ||
return response.text(); | ||
}) | ||
.then((text) => { | ||
myArticle.innerText = text; | ||
}) | ||
.catch((error) => { | ||
myArticle.innerText = `Error: ${error.message}`; | ||
}); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
<!DOCTYPE html><html lang="en"><head><meta name="viewport"content="width=device-width"><title>hi</title><link rel="stylesheet" href="./css/merge.css" /></link></head><body><center><fieldset><legend><ahref="./hi.html">hi</a></legend><form class="form-group"action="../action.php"method="post"><input type="text"class="form-control"id="secure-form-answer-Human"type="text"name="secure-form-answer"maxlength="40"autocomplete="true"autocorrect="off"autocapitalize="off"spellcheck="true"placeholder="what word defines this word"required><noscript><labelfor="secure-form-answer-Human">Human</label></noscript></form><br><a href="../index.html">return to homepage</a><br><br><a href="../delete.php?action=delete&filename=./en/hi.html">delete this page</a><br><br><article>hi definitions go here</article></fieldset></center></body></html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
<!DOCTYPE html><html lang="en"><head><meta name="viewport"content="width=device-width"><title>knowledge</title><link rel="stylesheet" href="./css/merge.css" /></link></head><body><center><fieldset><legend><ahref="./knowledge.html">knowledge</a></legend><form class="form-group"action="../action.php"method="post"><input type="text"class="form-control"id="secure-form-answer-Human"type="text"name="secure-form-answer"maxlength="40"autocomplete="true"autocorrect="off"autocapitalize="off"spellcheck="true"placeholder="what word defines this word"required><noscript><labelfor="secure-form-answer-Human">Human</label></noscript></form><br><a href="../index.html">return to homepage</a><br><br><a href="../delete.php?action=delete&filename=./en/knowledge.html">delete this page</a><br><br><article>knowledge definitions go here</article></fieldset></center></body></html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Page 1: A desparate journey | ||
|
||
This is the first exciting part of our story! Once upon a time, a man was creeping into a dark forest, to try to find the woodcutter's cottage. Somewhere, an owl hooted. A feeling of lingering dread spread all over his body, but he pressed on regardless. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Page 2: Light at the end of the tunnel | ||
|
||
Brambles tugged at his clothes, and the rain lashed down, making our hero bruised and cold. when hope was all but lost, he noticed a dim light shining through the trees — this must be the woodcutter's cottage. This very sight spurred him to continue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Page 3: The end unseen? | ||
|
||
A kilometer or so more, and the cottage was now in sight — our hero could see lights shining in the windows, and a figure shuffling around within! This was the moment he was waiting for surely! He tiptoed up to the door, and carefully tried the handle. Fnding it unlocked, he burst open the door and shouted "your time has come, scoundrel..!" He was slightly disappointed to come face to face with a slightly scared dog. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
<!DOCTYPE html><html lang="en"><head><meta name="viewport"content="width=device-width"><title>soul</title><link rel="stylesheet" href="./css/merge.css" /></link></head><body><center><fieldset><legend><ahref="./soul.html">soul</a></legend><form class="form-group"action="../action.php"method="post"><input type="text"class="form-control"id="secure-form-answer-Human"type="text"name="secure-form-answer"maxlength="40"autocomplete="true"autocorrect="off"autocapitalize="off"spellcheck="true"placeholder="what word defines this word"required><noscript><labelfor="secure-form-answer-Human">Human</label></noscript></form><br><a href="../index.html">return to homepage</a><br><br><a href="../delete.php?action=delete&filename=./en/soul.html">delete this page</a><br><br><article>soul definitions go here</article></fieldset></center></body></html> | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters