gebäude seiten erstellt

This commit is contained in:
Cay 2026-03-11 18:03:37 +00:00
parent 680ce4f9a4
commit d8e14295db
10 changed files with 108 additions and 21 deletions

2
app.js
View File

@ -12,6 +12,7 @@ const characterRoutes = require("./routes/character");
const session = require("express-session");
const loginRoutes = require("./routes/login");
const launcherRoutes = require("./routes/launcher");
const buildingRoutes = require("./routes/buildings");
const app = express();
const PORT = process.env.PORT || 3000;
@ -71,6 +72,7 @@ app.use("/verify", verifyRoutes);
app.use("/create-character", characterRoutes);
app.use("/login", loginRoutes);
app.use("/launcher", launcherRoutes);
app.use("/", buildingRoutes);
/* ========================
404 Handler

26
public/css/building.css Normal file
View File

@ -0,0 +1,26 @@
body {
margin: 0;
height: 100vh;
background: url("/images/dok_bg.png") center / cover no-repeat;
display: flex;
justify-content: center;
align-items: center;
font-family: sans-serif;
color: white;
}
.building {
background: rgba(0, 0, 0, 0.7);
padding: 40px;
border-radius: 10px;
text-align: center;
width: 400px;
}
a {
color: #6ec6ff;
text-decoration: none;
}

View File

@ -18,11 +18,11 @@
.area {
fill: rgba(255, 255, 255, 0);
cursor: pointer;
transition: all 0.25s;
transition: 0.3s;
}
.area:hover {
fill: rgba(255, 255, 255, 0.2);
fill: rgba(120, 200, 255, 0.15);
stroke: #6ec6ff;
stroke-width: 3;
filter: drop-shadow(0 0 10px #6ec6ff);

24
routes/buildings.js Normal file
View File

@ -0,0 +1,24 @@
const express = require("express");
const router = express.Router();
router.get("/castle", (req, res) => {
res.render("buildings/castle");
});
router.get("/market", (req, res) => {
res.render("buildings/market");
});
router.get("/church", (req, res) => {
res.render("buildings/church");
});
router.get("/portal", (req, res) => {
res.render("buildings/portal");
});
router.get("/tower", (req, res) => {
res.render("buildings/tower");
});
module.exports = router;

View File

@ -0,0 +1,7 @@
<div class="building">
<h1>Schloss</h1>
<p>Hier kannst du deine Charaktere verwalten.</p>
<a href="/launcher">Zurück zur Karte</a>
</div>

View File

@ -0,0 +1,7 @@
<div class="building">
<h1>Kirche</h1>
<p>Segnungen und Heilungen.</p>
<a href="/launcher">Zurück zur Karte</a>
</div>

View File

@ -0,0 +1,7 @@
<div class="building">
<h1>Marktplatz</h1>
<p>Hier kannst du Items kaufen.</p>
<a href="/launcher">Zurück zur Karte</a>
</div>

View File

@ -0,0 +1,7 @@
<div class="building">
<h1>Portal</h1>
<p>Dungeon Zugang.</p>
<a href="/launcher">Zurück zur Karte</a>
</div>

View File

@ -0,0 +1,7 @@
<div class="building">
<h1>Turm</h1>
<p>PvP Arena.</p>
<a href="/launcher">Zurück zur Karte</a>
</div>

View File

@ -31,40 +31,40 @@
</head>
<body>
<div class="map-container">
<svg viewBox="0 0 2048 1024" class="map-overlay">
<div class="worldmap">
<svg viewBox="0 0 1358 679" class="map-overlay">
<a href="/castle">
<polygon
class="area"
points="920,230 1120,230 1180,350 860,350"
points="580,120 750,120 780,250 550,250"
></polygon>
</a>
<a href="/market">
<polygon
class="area"
points="870,500 1170,500 1230,630 810,630"
></polygon>
</a>
<a href="/portal">
<polygon
class="area"
points="230,140 330,140 350,310 210,310"
></polygon>
</a>
<a href="/tower">
<polygon
class="area"
points="1500,260 1600,260 1600,420 1500,420"
points="450,300 900,300 1000,450 350,450"
></polygon>
</a>
<a href="/church">
<polygon
class="area"
points="960,420 1030,420 1030,520 960,520"
points="250,330 320,330 320,420 250,420"
></polygon>
</a>
<a href="/portal">
<polygon
class="area"
points="60,120 140,120 140,260 60,260"
></polygon>
</a>
<a href="/tower">
<polygon
class="area"
points="1080,150 1150,150 1150,300 1080,300"
></polygon>
</a>
</svg>