in da beginning
This commit is contained in:
8
README.md
Normal file
8
README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Tavyza
|
||||
Tavyza is a project that i (Theros) made to neatly organize my projects.
|
||||
|
||||
This website has (will have) resources for several conlangs that i have created, along with other projects (some unrelated to conlanging) that i have worked on.
|
||||
|
||||
Suggestions & bugs go into the Issues tab.
|
||||
|
||||
matrix room: https://matrix.to/#/!eBaRnGXmbYigyPukHq:matrix.org?via=matrix.org
|
||||
0
about.html
Normal file
0
about.html
Normal file
16
conlangs/index.html
Normal file
16
conlangs/index.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Template | Tavyza</title>
|
||||
<link rel="stylesheet" href="resources/css/main.css">
|
||||
</head>
|
||||
<body class="page">
|
||||
<iframe src="/navbar.html" seamless title="navbar" class="navbar" id="naviframe" onload="onFrameLoad(this)"></iframe>
|
||||
<div key="tp1">
|
||||
no language !
|
||||
</div>
|
||||
<script src="/resources/lang/lang.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
23
index.html
Normal file
23
index.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Home | Tavyza</title>
|
||||
<link rel="stylesheet" href="/resources/css/main.css">
|
||||
</head>
|
||||
<body class="page">
|
||||
<iframe src="/navbar.html" seamless title="navbar" class="navbar" id="naviframe" onload="onFrameLoad(this)"></iframe>
|
||||
<div class="content">
|
||||
<div class="main">
|
||||
<p key="dx1">
|
||||
no language !
|
||||
</p>
|
||||
<p key="dx2">
|
||||
no language !
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/resources/lang/lang.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
21
navbar.html
Normal file
21
navbar.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/resources/css/main.css">
|
||||
<title>navbar</title>
|
||||
</head>
|
||||
<body class="navcontent">
|
||||
<ul>
|
||||
<li><a href="/" key="index" target="_top">no language !</a></li>
|
||||
<li><a href="/conlangs" key="conlangs" target="_top">no language !</a></li>
|
||||
<li><a href="/coding/" key="coding" target="_top">no language !</a></li>
|
||||
<li><a href="/poetry-stories/" key="poetry-stories" target="_top">no language !</a></li>
|
||||
<li><a href="/about" key="about" target="_top">no language !</a></li>
|
||||
<li class="lang"><select name="language" id="language"><option value="eng">English</option><option value="isl">Icelandic</option></select></li>
|
||||
</ul>
|
||||
<script src="/resources/lang/getlang.js"></script>
|
||||
<script src="/resources/lang/lang.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
79
resources/css/main.css
Normal file
79
resources/css/main.css
Normal file
@@ -0,0 +1,79 @@
|
||||
* {
|
||||
font-family: "Noto Sans";
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: black;
|
||||
position: relative;
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin:auto;
|
||||
height: 50px;
|
||||
width: 90%;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
.navcontent {
|
||||
color: orange;
|
||||
align-self: center;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.page {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.content {
|
||||
color: white;
|
||||
position: relative;
|
||||
left: 5%;
|
||||
top: 10px;
|
||||
right: 5%;
|
||||
}
|
||||
/*.main {
|
||||
|
||||
}*/
|
||||
.navcontent ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.navcontent ul li {
|
||||
float: left;
|
||||
}
|
||||
.navcontent ul li a {
|
||||
display: block;
|
||||
color: orange;
|
||||
text-align: center;
|
||||
padding: 10px 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navcontent ul li a:before {
|
||||
display: block;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
translate: 0 15px;
|
||||
filter: blur(16px);
|
||||
background: orangered;
|
||||
}
|
||||
.navcontent ul li a:hover {
|
||||
color: rgb(255, 225, 168);
|
||||
background-color: orange;
|
||||
}
|
||||
a:link {
|
||||
color: aqua;
|
||||
}
|
||||
a:visited {
|
||||
color: rgb(255, 32, 32);
|
||||
}
|
||||
.lang {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right:0px;
|
||||
appearance: base-select;
|
||||
}
|
||||
12
resources/lang/getlang.js
Normal file
12
resources/lang/getlang.js
Normal file
@@ -0,0 +1,12 @@
|
||||
// get the language
|
||||
|
||||
function getlang() {
|
||||
// i can type
|
||||
lang = localStorage.getItem("lang");
|
||||
|
||||
document.getElementById("language").value = lang;
|
||||
console.log("the language is set to " + lang)
|
||||
}
|
||||
|
||||
document.getElementById("language").addEventListener('change', function(e){localStorage.setItem("lang", e.eventTarget.value);})
|
||||
getlang()
|
||||
47
resources/lang/lang.js
Normal file
47
resources/lang/lang.js
Normal file
@@ -0,0 +1,47 @@
|
||||
// languaging ???
|
||||
|
||||
async function localize(params) {
|
||||
let lang = document.getElementById("language");
|
||||
|
||||
if (lang == null) {
|
||||
console.log("lang doesn't exist waaahhh");
|
||||
let temp1 = document.getElementById('naviframe');
|
||||
let temp2 = temp1.contentDocument || temp1.contentWindow.document;
|
||||
console.log(temp2)
|
||||
lang = temp2.getElementById('language')
|
||||
console.log(lang)
|
||||
}
|
||||
lang = lang.value;
|
||||
//localStorage.setItem("lang", lang);
|
||||
thing = document.querySelectorAll("*");
|
||||
file = await fetch("/resources/lang/lang.json");
|
||||
console.log("EXISTANCE !!!")
|
||||
if (file.ok) {
|
||||
contents = await file.json();
|
||||
// contents.<lang>.<key>
|
||||
thing.forEach(element => {
|
||||
key = element.getAttribute("key");
|
||||
if (key != null) {
|
||||
console.log(contents[lang][key]);
|
||||
element.innerHTML = contents[lang][key];
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("oopsie !!!")
|
||||
}
|
||||
}
|
||||
|
||||
if (lang_element != null) {
|
||||
localize()
|
||||
lang_element.addEventListener('change', localize)
|
||||
}
|
||||
|
||||
function onFrameLoad(frame) {
|
||||
let frame_doc = frame.contentDocument || frame.contentWindow.document;
|
||||
let frame_lang_element = frame_doc.getElementById('language');
|
||||
|
||||
frame_lang_element .addEventListener('change', localize);
|
||||
localize()
|
||||
}
|
||||
|
||||
|
||||
64
resources/lang/lang.json
Normal file
64
resources/lang/lang.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"eng":{
|
||||
"lang-info":{
|
||||
"numbers":{
|
||||
"numberbase":10,
|
||||
"digits": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "5",
|
||||
"6": "6",
|
||||
"7": "7",
|
||||
"8": "8",
|
||||
"9": "9"
|
||||
},
|
||||
"frac": ".",
|
||||
"neg-pref": "-",
|
||||
"neg-sufx": ""
|
||||
}
|
||||
},
|
||||
|
||||
"index":"Home",
|
||||
"conlangs":"Conlanging",
|
||||
"coding":"Coding",
|
||||
"poetry-stories":"Poetry & Stories",
|
||||
"about":"About Tavyza",
|
||||
"dx1":"Hello. This website is under construction. Feel free to give suggestions in <a href=\"//git.tavyza.org/Theros/tavyza-website\">the git repository</a>. Please expect issues with formatting, translation errors, the like.",
|
||||
"dx2":"This website was proudly built without AI assistance.",
|
||||
"tp1":"This is a template page."
|
||||
|
||||
},
|
||||
"isl":{
|
||||
"lang-info":{
|
||||
"numbers":{
|
||||
"numberbase":10,
|
||||
"digits": {
|
||||
"0": "0",
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "5",
|
||||
"6": "6",
|
||||
"7": "7",
|
||||
"8": "8",
|
||||
"9": "9"
|
||||
},
|
||||
"frac": ".",
|
||||
"neg-pref": "-",
|
||||
"neg-sufx": ""
|
||||
}
|
||||
},
|
||||
|
||||
"index":"Heim",
|
||||
"conlangs":"Conlanging",
|
||||
"coding":"Coding",
|
||||
"poetry-stories":"Poetry & Stories",
|
||||
"about":"About Tavyza",
|
||||
"dx1":"Halló. This website is under construction. Feel free to give suggestions in <a href=\"//git.tavyza.org/Theros/tavyza-website\">the git repository</a>. Please expect issues with formatting, translation errors, the like.",
|
||||
"dx2":"This website was proudly built without AI assistance."
|
||||
}
|
||||
}
|
||||
16
template.html
Normal file
16
template.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Template | Tavyza</title>
|
||||
<link rel="stylesheet" href="resources/css/main.css">
|
||||
</head>
|
||||
<body class="page">
|
||||
<iframe src="/navbar.html" seamless title="navbar" class="navbar" id="naviframe" onload="onFrameLoad(this)"></iframe>
|
||||
<div key="tp1">
|
||||
no language !
|
||||
</div>
|
||||
<script src="/resources/lang/lang.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user