JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Titelgenerator</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div id="greenscreen">
<!--Bauchbinden-->
<!--Breit-->
<div id="bauchbinde-breit" class="bauchbinden deactivated" style="display: none">
<div class="vertical-divider"></div>
<div id="centering">
<input type="text" id="speakers-breit">
<input type="text" id="speakers-breit-under">
</div>
</div>
<!--Schmal-->
<div id="bauchbinde-schmal" class="bauchbinden">
<input type="text" id="speakers-schmal">
</div>
<!--Logos-->
<!--DB-->
<div id="db-box">
</div>
<!--Campus-->
<div id="campus-box">
</div>
<!--Splitscreenbar-->
<div id="splitscreen" class="deactivated" style="display: none"></div>
</div>
<div id="hiddenUI">
<a href="javascript:void(0);" class="hide" id="hide-db-logo"><img src="img/buttons/hidden.svg" alt=""></a>
<a href="javascript:void(0);" class="hide" id="hide-campus-logo"><img src="img/buttons/hidden.svg" alt=""></a>
<a href="javascript:void(0);" class="hide" id="hide-bauchbinde-schmal"><img src="img/buttons/hidden.svg" alt=""></a>
<a href="javascript:void(0);" class="hide" id="hide-splitscreen"><img src="img/buttons/hidden.svg" alt=""></a>
<a href="javascript:void(0);" class="hide" id="hide-bauchbinde-breit"><img src="img/buttons/hidden.svg" alt=""></a>
</div>
<script src="javascript/script.js"></script>
</body>
</html>
CSS
/*FONTS*/
@font-face {
font-family: DBScreenHead-Black;
src: url('../fonts/DBScreenHead-Black.woff2');
}
@font-face {
font-family: DBScreenHead-Regular;
src: url(../fonts/DBScreenHead-Regular.woff2);
}
/*GENERAL*/
body, html {
margin: 0;
padding: 0;
}
#greenscreen {
position: relative;
width: 1920px;
height: 1080px;
background: #00B140;
}
h1 {
font-family: DBScreenHead-Black;
}
/*LOGOS*/
#db-logo {
height: 75%;
width: auto;
position: relative;
top: 50%;
transform: translateY(-50%);
/*Centering vertically*/
left: 230px;
}
#campus-logo {
height: 38%;
width: auto;
position: relative;
top: 75px;
left: 53%;
transform: translate(-50%)/*Centering horizontally*/
}
#db-box {
position: absolute;
display: block;
width: 500px;
height: 120px;
top: 120px;
background: white;
box-shadow: 0px -3px 12px 0px rgba(0, 0, 0, 0.5);
}
#campus-box {
position: relative;
display: block;
width: 395px;
height: 160px;
left: 1350px;
border-radius: 0px 0px 8px 8px;
background: white;
box-shadow: 0px -3px 12px 0px rgba(0, 0, 0, 0.5);
}
/*BAUCHBINDEN*/
.bauchbinden {
margin: 0;
padding: 0;
background: white;
position: absolute;
box-shadow: 0px -3px 12px 0px rgba(0, 0, 0, 0.5);
}
#bauchbinde-schmal {
width: 1920px;
height: 160px;
top: 920px;
}
#bauchbinde-breit {
width: 1920px;
height: 190px;
top: 890px;
}
#speakers-schmal {
position: relative;
top: 50%;
left: 360px;
transform: translateY(-50%);
/*Centering vertically*/
width: auto;
height: 100px;
font-family: DBScreenHead-Black;
font-size: 70px;
color: #757575;
background-color: transparent;
border: none;
border-left: 6px solid #757575;
padding-left: 50px;
}
#speakers-breit {
position: relative;
left: 553px;
width: auto;
height: 118px;
font-family:...
JavaScript
/*toggle view hiddenUI and hidden elements*/
function toggleHiddenElements() {
let HiddenUI = document.getElementById("hiddenUI");
let HiddenElements = document.getElementsByClassName("deactivated");
if (HiddenUI.style.display == "none") {
HiddenUI.style.display = "block";
for (let i = 0; i < HiddenElements.length; i++) {
HiddenElements[i].style.display = "block";
}
} else {
HiddenUI.style.display = "none";
for (let j = 0; j < HiddenElements.length; j++) {
HiddenElements[j].style.display = "none";
}
}
}
/* EventListener for "Enter" Keybind */
document.addEventListener("keydown", (e) => {
if (e.code == "Enter") {
e.preventDefault();
toggleHiddenElements();
}
});
/*Toggle DB Logo in upper left corner*/
document.getElementById("hide-db-logo").onclick = function () {
document.getElementById("db-box").classList.toggle("deactivated");
}
/*Toggle Campus Logo in upper right corner*/
document.getElementById("hide-campus-logo").onclick = function () {
document.getElementById("campus-box").classList.toggle("deactivated");
}
/*Toggle Bauchbinde schmal*/
document.getElementById("hide-bauchbinde-schmal").onclick = function () {
document.getElementById("bauchbinde-schmal").classList.toggle("deactivated");
}
/*Toggle Bauchbinde breit*/
document.getElementById("hide-bauchbinde-breit").onclick = function () {
document.getElementById("bauchbinde-schmal").classList.toggle("deactivated");
}
/*Toggle Splitscreen*/
document.getElementById("hide-splitscreen").onclick = function () {
document.getElementById("splitscreen").classList.toggle("deactivated");
};