gebäude seiten erstellt
This commit is contained in:
parent
680ce4f9a4
commit
d8e14295db
2
app.js
2
app.js
@ -12,6 +12,7 @@ const characterRoutes = require("./routes/character");
|
|||||||
const session = require("express-session");
|
const session = require("express-session");
|
||||||
const loginRoutes = require("./routes/login");
|
const loginRoutes = require("./routes/login");
|
||||||
const launcherRoutes = require("./routes/launcher");
|
const launcherRoutes = require("./routes/launcher");
|
||||||
|
const buildingRoutes = require("./routes/buildings");
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 3000;
|
const PORT = process.env.PORT || 3000;
|
||||||
@ -71,6 +72,7 @@ app.use("/verify", verifyRoutes);
|
|||||||
app.use("/create-character", characterRoutes);
|
app.use("/create-character", characterRoutes);
|
||||||
app.use("/login", loginRoutes);
|
app.use("/login", loginRoutes);
|
||||||
app.use("/launcher", launcherRoutes);
|
app.use("/launcher", launcherRoutes);
|
||||||
|
app.use("/", buildingRoutes);
|
||||||
|
|
||||||
/* ========================
|
/* ========================
|
||||||
404 Handler
|
404 Handler
|
||||||
|
|||||||
26
public/css/building.css
Normal file
26
public/css/building.css
Normal 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;
|
||||||
|
}
|
||||||
@ -18,11 +18,11 @@
|
|||||||
.area {
|
.area {
|
||||||
fill: rgba(255, 255, 255, 0);
|
fill: rgba(255, 255, 255, 0);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.25s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.area:hover {
|
.area:hover {
|
||||||
fill: rgba(255, 255, 255, 0.2);
|
fill: rgba(120, 200, 255, 0.15);
|
||||||
stroke: #6ec6ff;
|
stroke: #6ec6ff;
|
||||||
stroke-width: 3;
|
stroke-width: 3;
|
||||||
filter: drop-shadow(0 0 10px #6ec6ff);
|
filter: drop-shadow(0 0 10px #6ec6ff);
|
||||||
|
|||||||
24
routes/buildings.js
Normal file
24
routes/buildings.js
Normal 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;
|
||||||
7
views/buildings/castle.ejs
Normal file
7
views/buildings/castle.ejs
Normal 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>
|
||||||
7
views/buildings/church.ejs
Normal file
7
views/buildings/church.ejs
Normal 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>
|
||||||
7
views/buildings/market.ejs
Normal file
7
views/buildings/market.ejs
Normal 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>
|
||||||
7
views/buildings/portal.ejs
Normal file
7
views/buildings/portal.ejs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<div class="building">
|
||||||
|
<h1>Portal</h1>
|
||||||
|
|
||||||
|
<p>Dungeon Zugang.</p>
|
||||||
|
|
||||||
|
<a href="/launcher">Zurück zur Karte</a>
|
||||||
|
</div>
|
||||||
7
views/buildings/tower.ejs
Normal file
7
views/buildings/tower.ejs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<div class="building">
|
||||||
|
<h1>Turm</h1>
|
||||||
|
|
||||||
|
<p>PvP Arena.</p>
|
||||||
|
|
||||||
|
<a href="/launcher">Zurück zur Karte</a>
|
||||||
|
</div>
|
||||||
@ -31,40 +31,40 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="map-container">
|
<div class="worldmap">
|
||||||
<svg viewBox="0 0 2048 1024" class="map-overlay">
|
<svg viewBox="0 0 1358 679" class="map-overlay">
|
||||||
<a href="/castle">
|
<a href="/castle">
|
||||||
<polygon
|
<polygon
|
||||||
class="area"
|
class="area"
|
||||||
points="920,230 1120,230 1180,350 860,350"
|
points="580,120 750,120 780,250 550,250"
|
||||||
></polygon>
|
></polygon>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="/market">
|
<a href="/market">
|
||||||
<polygon
|
<polygon
|
||||||
class="area"
|
class="area"
|
||||||
points="870,500 1170,500 1230,630 810,630"
|
points="450,300 900,300 1000,450 350,450"
|
||||||
></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"
|
|
||||||
></polygon>
|
></polygon>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="/church">
|
<a href="/church">
|
||||||
<polygon
|
<polygon
|
||||||
class="area"
|
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>
|
></polygon>
|
||||||
</a>
|
</a>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user