Added Website info tab and page,
addedd navbar separators
This commit is contained in:
parent
a20f35bf93
commit
d498e75f77
@ -31,10 +31,13 @@ navContent = [
|
|||||||
["P", "Contact", "contact/"],
|
["P", "Contact", "contact/"],
|
||||||
["P", "Projects", "projects/"],
|
["P", "Projects", "projects/"],
|
||||||
["P", "Posts", "posts/"],
|
["P", "Posts", "posts/"],
|
||||||
["L", "Git", "https://git.weingardt.dev/explore/repos"]
|
["SEP"],
|
||||||
|
["L", "Personal Git", "https://git.weingardt.dev/explore/repos"],
|
||||||
|
["SEP"],
|
||||||
|
["P", "Website Info", "info/"]
|
||||||
];
|
];
|
||||||
|
|
||||||
// Alt,b Href, Src
|
// Alt, Href, Src
|
||||||
funButtons = [
|
funButtons = [
|
||||||
["CC BY-SA 4.0", "https://creativecommons.org/licenses/by-sa/4.0/", "global/cc-by-sa.png"],
|
["CC BY-SA 4.0", "https://creativecommons.org/licenses/by-sa/4.0/", "global/cc-by-sa.png"],
|
||||||
["Right to repair", "", "global/right2repair.gif"],
|
["Right to repair", "", "global/right2repair.gif"],
|
||||||
@ -224,24 +227,31 @@ if (document.getElementById("navbar") != null){
|
|||||||
var nav = document.getElementById("navbar");
|
var nav = document.getElementById("navbar");
|
||||||
|
|
||||||
for (let i = 0; i < navContent.length; i++) {
|
for (let i = 0; i < navContent.length; i++) {
|
||||||
href = navContent[Number(i)][2];
|
if (navContent[Number(i)][0] === "SEP"){
|
||||||
sel = navContent[Number(i)][1].toLowerCase().includes(selectedNav.toLowerCase());
|
tmpAdd = document.createElement("hr");
|
||||||
|
tmpAdd.classList.add("navSep");
|
||||||
|
document.getElementById("navbar").appendChild(tmpAdd);
|
||||||
|
|
||||||
if (navContent[Number(i)][0] === "P"){
|
} else {
|
||||||
href = dirDepth + href;
|
href = navContent[Number(i)][2];
|
||||||
|
sel = navContent[Number(i)][1].toLowerCase().includes(selectedNav.toLowerCase());
|
||||||
|
|
||||||
|
if (navContent[Number(i)][0] === "P"){
|
||||||
|
href = dirDepth + href;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpAdd = document.createElement("a");
|
||||||
|
tmpAdd.textContent = navContent[Number(i)][1];
|
||||||
|
tmpAdd.setAttribute("href", href);
|
||||||
|
tmpAdd.classList.add("nav");
|
||||||
|
|
||||||
|
if (sel) {
|
||||||
|
tmpAdd.classList.add("selected-nav");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById("navbar").appendChild(tmpAdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpAdd = document.createElement("a");
|
|
||||||
tmpAdd.textContent = navContent[Number(i)][1];
|
|
||||||
tmpAdd.setAttribute("href", href);
|
|
||||||
tmpAdd.classList.add("nav");
|
|
||||||
|
|
||||||
if (sel) {
|
|
||||||
tmpAdd.classList.add("selected-nav");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
document.getElementById("navbar").appendChild(tmpAdd);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
42
info/index.html
Normal file
42
info/index.html
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
||||||
|
<link rel="stylesheet" href="../src/style.css">
|
||||||
|
|
||||||
|
<title>Website Info</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<nav id="navbar"></nav>
|
||||||
|
<main>
|
||||||
|
<div class="content">
|
||||||
|
<h2 class="titlebar">Website Info</h2>
|
||||||
|
This wonderfull website was made my <i>me</i>.<br><br>
|
||||||
|
It sadly requires javascript to run, because at this point in time, I don't know how to use a CMS like Hugo.<br>
|
||||||
|
But for all the FOSS freaks out there, the javascript is licenced under the GPL v.3 licence and browsers like GNU Icecat should detect the licence automaticly.
|
||||||
|
If any issues occur with Icecat or any other browsers, feel free to contact me.
|
||||||
|
<hr>
|
||||||
|
<h2>Legal</h2>
|
||||||
|
The <u>content</u> of this website is licenced under the CC BY-SA 4.0 licence, which gives you the unrestricted freedom to <u>share</u> and <u>modify</u>
|
||||||
|
copies of this website. You are even allowed to do so commercially.<br><br>
|
||||||
|
<b>But under the following terms:</b><br>
|
||||||
|
You have to give credit to me, <b>indicate if changes were made</b> and licence the material under the same lience.<br><br>
|
||||||
|
If you want to base your work of of mine, I suggest you to <a href="https://creativecommons.org/licenses/by-sa/4.0/">read the licence</a>.<br><br>
|
||||||
|
The <u>javascript</u> of this website is licenced under the <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU General Public Licence v.3</a>.
|
||||||
|
<hr>
|
||||||
|
<h2>Source</h2>
|
||||||
|
All the sourcecode is readily avaiable on my Gitea instance <a href="https://git.weingardt.dev/0xmac/Website">here</a>.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="footnote"><var id="toplevel" data-="../">Please enable Javascript on this page as it's required to generate the footer and navigation bar.<br>For fear of non-free Javascript: The JS is licensed under GPL v.3</var></div>
|
||||||
|
</main>
|
||||||
|
<footer id="footer"></footer>
|
||||||
|
|
||||||
|
<!-- Some variables and script-call for global site elements -->
|
||||||
|
<var id="selected-nav" data-="Website Info"></var>
|
||||||
|
<script rel="text/javascript" src="../global/global.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -31,12 +31,11 @@ nav{
|
|||||||
position:inherit;
|
position:inherit;
|
||||||
top:0;
|
top:0;
|
||||||
|
|
||||||
display:flex;
|
|
||||||
padding:0 20x;
|
padding:0 20x;
|
||||||
z-index:1;
|
z-index:1;
|
||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
display: block;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -63,6 +62,12 @@ nav{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navSep {
|
||||||
|
width: 80%;
|
||||||
|
float:left;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
main{
|
main{
|
||||||
width:100%;
|
width:100%;
|
||||||
min-height:calc(100vh - 60px - 26px);
|
min-height:calc(100vh - 60px - 26px);
|
||||||
@ -163,6 +168,7 @@ footer{
|
|||||||
width: fit-content;
|
width: fit-content;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user