A browser source overlay for winter vibes for your Live Streams or Videos

Adding config page

Changed files
+32 -89
src
+3 -33
index.html
···
<html lang="en">
<head>
<meta charset="UTF-8" />
-
<link rel="stylesheet" href="./src/style.css" />
+
<link rel="stylesheet" href="./src/styles/main.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Winter Vibes JS</title>
</head>
···
<div id="contextMenu" class="context-menu" style="display:none">
<ul>
-
<li><a href="#" id="openSettings">Settings</a></li>
-
<li><a href="#" id="openHelp">Help</a></li>
+
<li><a href="src/pages/config.html">Settings</a></li>
+
<li><a href="https://github.com/TreyBastian/winterVibesJS/blob/main/README.md">Help</a></li>
<li><a href="https://buymeacoffee.com/treysdevshed">Buy me a coffee</a></li>
</ul>
</div>
-
<div id="modalSettings" class="modal">
-
<div class="modal-content">
-
<div class="modal-header">
-
<span>Settings modal</span>
-
</div>
-
<div class="modal-main">
-
<span>example</span>
-
</div>
-
<div class="model-footer">
-
<button id="closeSettings">Close</button>
-
</div>
-
</div>
-
</div>
-
</div>
-
-
<div id="modalHelp" class="modal">
-
<div class="modal-content">
-
<div class="modal-header">
-
<span>Help modal</span>
-
</div>
-
<div class="modal-main">
-
<span>example</span>
-
</div>
-
<div class="model-footer">
-
<button id="closeHelp">Close</button>
-
</div>
-
</div>
-
</div>
-
-
<script type="module" src="/src/main.js"></script>
<script type="module" src="./src/main.js"></script>
</body>
</html>
+1 -15
src/contextMenu.js
···
menu.style.left = e.pageX + "px";
menu.style.top = e.pageY + "px";
}
-
}
-
-
/**
-
* @param {string} modalId
-
* @param {boolean} isShowing
-
*/
-
function toggleModal(modalId, isShowing) {
-
const modal = document.getElementById(modalId);
-
if (isShowing) {
-
console.log(modalId, isShowing);
-
modal.style.display = isShowing ? 'block' : 'none';
-
}
-
}
-
-
export { toggleModal };
+
}
+1 -15
src/main.js
···
resetSnowAccumulator,
} from "./snow_accumulator.js";
import { createPlow, drawPlow, movePlow, plowDone } from "./plow.js";
-
import { toggleModal } from "./contextMenu";
-
-
// Modals & buttons
-
const openSettings = document.getElementById('openSettings');
-
const openHelp = document.getElementById('openHelp');
-
const closeSettings = document.getElementById('closeSettings');
-
const closeHelp = document.getElementById('closeHelp');
-
-
openSettings.addEventListener('click', () => toggleModal('modalSettings', true));
-
openHelp.addEventListener('click', () => toggleModal('modalHelp', true));
-
-
// Closing doesn't call the function idk why its stupid... assuming its something to do with DOM
-
closeSettings.addEventListener('click', () => toggleModal('modalSettings', false));
-
closeSettings.addEventListener('click', () => console.log('close settings'));
-
closeHelp.addEventListener('click', () => toggleModal('modalHelp', false));
+
import "./contextMenu.js";
/**
* @type{Array.<Snowflake>}
+14
src/pages/config.html
···
+
<!doctype html>
+
<html lang="en">
+
<head>
+
<meta charset="UTF-8" />
+
<link rel="stylesheet" href="../styles/config.css" />
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
<title>Winter Vibes JS</title>
+
</head>
+
<body>
+
<div class="container">
+
<h1>Settings</h1>
+
</div>
+
</body>
+
</html>
-26
src/style.css src/styles/main.css
···
border-radius: 10px;
background-color: bisque;
}
-
-
.modal {
-
display: none;
-
position: fixed;
-
z-index: 100;
-
left: 0;
-
top: 0;
-
width: 100%;
-
height: 100%;
-
background-color: rgba(0, 0, 0, 0.4);
-
}
-
-
.modal-content {
-
text-align: center;
-
background-color: beige;
-
margin: 15% auto;
-
padding: 20px;
-
border: 1px solid #888;
-
width: 30%;
-
border: 1px solid black;
-
border-radius: 10px;
-
}
-
-
.modal-header {
-
font-size: 20px;
-
}
+13
src/styles/config.css
···
+
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');
+
+
body {
+
font-family: "Pixelify Sans", sans-serif;
+
font-style: normal;
+
background-color: #091e36;
+
min-width: 100vw;
+
min-height: 100vh;
+
height: 100%;
+
width: 100%;
+
margin: 0;
+
padding: 0;
+
}