1
0
test.br0tcraft.de/html+css.html

198 lines
4.5 KiB
HTML

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Br0tcraft</title>
<style>
@font-face {
font-family: "Roboto";
src: url("/fonts/Roboto/Roboto-Regular.ttf");
}
@font-face {
font-family: "Orbitron";
src: url("/fonts/Orbitron/Orbitron-Black.ttf");
}
body {
margin: 0;
font-family: "Orbitron";
background-color: white;
}
.header-container {
position: relative;
width: 100%;
overflow: hidden;
}
.header-image {
width: 100%;
height: 100%;
object-fit: cover;
object-position: 50% 5%;
}
.container {
position: absolute;
right: 32px;
left: 32px;
top: 16px;
font-family: Orbitron;
font-size: 24px;
display: flex;
align-items: center;
justify-content: space-between;
}
.logo {
width: calc(15% * 2);
}
.menu-link-home {
color: white;
text-decoration: none;
margin-left: 0px;
font-size: 6vw;
}
.menu-link {
color: white;
text-decoration: none;
margin-left: 16px;
}
.menu-link:hover {
text-decoration: underline;
}
.headline {
text-align: center;
color: rgb(0, 0, 0);
font-size: 5vw;
text-shadow: 5px 5px 3px rgba(5, 0, 0, 0.26);
}
.mobile-menu-icon {
display: none; /* Standardmäßig ausblenden */
cursor: pointer;
}
.hamburger-icon {
width: 30px;
height: 3px;
background-color: white;
margin: 6px 0;
}
.menu-links {
display: flex;
align-items: center;
justify-content: flex-end; /* Rechts ausrichten */
}
.menu-links.show {
display: flex;
}
.menu {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #333; /* Hintergrundfarbe des Menüs */
z-index: 1000;
}
.menu-link-mobile {
color: white;
padding: 20px;
text-align: center;
text-decoration: none;
display: block;
font-size: 250%;
margin: 10px; /* Abstand zwischen den Links hinzufügen */
}
.mobile-menu {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: transparent;
z-index: 1000;
}
@media screen and (max-width: 768px) {
.mobile-menu-icon {
display: block; /* Bei kleinen Bildschirmen anzeigen */
}
.hamburger-icon {
display: block;
}
.menu-links {
display: none;
flex-direction: column;
position: absolute;
top: 80px;
right: 0; /* Rechts ausrichten */
background-color: #333;
width: 100%;
justify-content: flex-start; /* Links oben ausrichten */
}
.menu-links.show {
display: flex;
}
.mobile-menu.show {
display: block;
background-color: rgb(104, 0, 0);
}
}
</style>
</head>
<body>
<div class="header-container">
<img class="header-image" src="img/Background.png" />
</div>
<div class="container">
<a class="menu-link-home" href="">BR0TCRAFT</a>
<div class="mobile-menu-icon" onclick="toggleMenu()">
<div class="hamburger-icon"></div>
<div class="hamburger-icon"></div>
<div class="hamburger-icon"></div>
</div>
<div class="menu-links">
<!-- Gemeinsame Links für Desktop und mobile Ansichten -->
<a class="menu-link" href="">Kontakt</a>
<a class="menu-link" href="">Spiele</a>
</div>
</div>
<div class="mobile-menu" onclick="toggleMenu()">
<a class="menu-link-mobile" href="">Kontakt</a>
<a class="menu-link-mobile" href="">Spiele</a>
</div>
<h1 class="headline">Meine Werke</h1>
<script>
function toggleMenu() {
var menuLinks = document.querySelector(".menu-links");
var mobileMenu = document.querySelector(".mobile-menu");
var body = document.body;
menuLinks.classList.toggle("show");
mobileMenu.classList.toggle("show");
}
</script>
</body>
</html>