Skip to content

Commit

Permalink
Settings Page!
Browse files Browse the repository at this point in the history
  • Loading branch information
Cattn committed Dec 1, 2022
1 parent 879fe0e commit 8bfe210
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 1 deletion.
85 changes: 85 additions & 0 deletions public/folders/settings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="../css/index.css">
<link rel = "stylesheet" href = "../css/themes.css">


</head>
<nav>
<div class="nav-wrap">
<div class="navigation">

<p>
<svg class="svg-settings" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
</svg>
<a href="#" onclick="triggerHome();"><span class="setting-nav">Home</span></a>
<svg class="svg-settings" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.397.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.505-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.12-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg> <a href="#" onclick="triggerSet();"><span class="setting-nav">Settings</span></a>

<!--<span class="time-nav">Retro Emulator</span>-->
<a href="#" onclick="triggerDisc();"><span class="info-nav">Discord</span></a>
<svg class="svg-info" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36"><defs><style>.cls-1{fill:#fff;}</style></defs><g id="图层_2" data-name="图层 2"><g id="Discord_Logos" data-name="Discord Logos"><g id="Discord_Logo_-_Large_-_White" data-name="Discord Logo - Large - White"><path class="cls-1" d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"/></g></g></g></svg>
<a href="../library.html" onclick="triggerSave();"><span class="info-nav">Library</span></a>
<svg class="svg-info" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0z" />
</svg>


</p>
</div>
</div>

</nav>
<body>
<main>
<h1> Expiremental Settings: </h1>
<h2> These settings are not fully tested and may cause issues. </h2>
<br>
<h1> Open Page on startup (Web-Viewer)</h1>
<p>Put in your favorite proxy, website, or whatever!</p>
<input type="input" id="startup" placeholder="Enter a URL to a site" /> <p id="startupVal"></p>
<h1>Themes</h1>
<div class="theme-container">
<div class="dark-theme-container">
<h3 class="dark-theme-content"><a onclick="themeValue(1);"> Dark Theme </a></h3>
</div>

<div class="light-theme-container">
<h3 class="light-theme-content"><a onclick="themeValue(2);"> Light Theme </a></h3>
</div>

<div class="pink-theme-container">
<h3 class="pink-theme-content"><a onclick="themeValue(3);"> Pink Theme </a></h3>
</div>

<div class="green-theme-container">
<h3 class="green-theme-content"><a onclick="themeValue(4);"> Green Theme - Made by Nailington </a></h3>
</div>
<button type="button" style="border-radius: 20px; color: #ffffff; background-color: #006400;" class="collapsible-theme">Themes made by Joshua <a style="color: #ffffff;" href="https://latebat.me/">(Latebat)</a></button>
<div><h3 class="dark-green-theme-content"><a onclick="themeValue(5);"> Dark-Green Theme - Made by Joshua <a href="https://latebat.me/">(Latebat)</a></a></h3>
<div class="black-white-theme-container">
<h3 class="black-white-theme-content"><a onclick="themeValue(6);"> Black & white Theme</a></h3>
<div class="blue-pink-theme-container">
<h3 class="blue-pink-theme-content"><a onclick="themeValue(7);"> Blue & pink Theme</a></h3>
<div class="charcoal-yellow-theme-container">
<h3 class="charcoal-yellow-theme-content"><a onclick="themeValue(8);"> Charcoal & yellow Theme</a></h3>
<div class="hotpink-cyan-theme-container">
<h3 class="hotpink-cyan-theme-content"><a onclick="themeValue(9);"> Hot pink & cyan Theme</a></h3>
</div>
</div>
</div>
</div>
</div>



</main>
</body>
<script src="../js/theme.js"></script>
<script src="../js/settings.js"></script>
</html>

2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


<nav>
<h1 class="title-stripe">Welcome to Bunker v1 Beta #2</h1>
<h1 class="title-stripe">Welcome to Bunker v1 Beta #3</h1>
<div class="nav-wrap">

<div class="navigation">
Expand Down
35 changes: 35 additions & 0 deletions public/js/settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
let input = document.getElementById("startup");
let startupVal = document.getElementById("startupVal");
let inputDat = localStorage.getItem("startup");


if (inputDat == null) {
console.log("No startup value found");
} else {
console.log("Startup value found, loading");
input.value = inputDat;
startupVal.innerHTML = "Startup Site set!";
}
input.addEventListener('keypress', function (e) {
if (e.key === 'Enter') {
console.log(input.value);
let startupValue = input.value;
localStorage.setItem("startup", startupValue);
startupVal.innerHTML = "Startup Site set!";
}
});

function triggerHome() {
window.top.location.href = "../index.html";
}
function triggerSet() {
window.top.location.href = "settings.html";
}

function triggerDisc() {
window.top.location.href = "https://discord.gg/cT7cApxHJ2";
}

function triggerSave() {
window.top.location.href = "library.html";
}
8 changes: 8 additions & 0 deletions public/js/viewer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
let viewer = document.getElementById("viewer");
let searchBar = document.getElementById("searchBar");
let startup = localStorage.getItem("startup");

if (startup == null) {
console.log("No startup value found");
} else {
console.log("Startup value found, loading");
viewer.src = startup;
viewer.style.display = "block";
}

//event listener for enter key, then replace viewer sort with search results
searchBar.addEventListener('keypress', function (e) {
Expand Down

0 comments on commit 8bfe210

Please sign in to comment.