create review site
This commit is contained in:
parent
1d41948720
commit
7e8d7e1b11
33
frontend/anmeldelser/index.html
Normal file
33
frontend/anmeldelser/index.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="anmeldelser/style.css">
|
||||
<script src="/frontend/bundle.js" defer></script>
|
||||
|
||||
<title>Postnummer App</title>
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="topbar">
|
||||
<h1>Postnummer App</h1>
|
||||
<div class="spacer"></div>
|
||||
<button id="dropdown-button">≡</button>
|
||||
<div id="dropdown">
|
||||
<a href="https://mtkonge.dk">more based site</a>
|
||||
<a href="https://mtkonge.dk">more based site</a>
|
||||
</div>
|
||||
</div>
|
||||
<h2 id="reviews-title">Anmeldelser</h2>
|
||||
<div id="reviews-container"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
4
frontend/anmeldelser/style.css
Normal file
4
frontend/anmeldelser/style.css
Normal file
@ -0,0 +1,4 @@
|
||||
#anmeldelser {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
@ -33,6 +33,7 @@
|
||||
<div id="info">
|
||||
<p id="zip-code">Postnummer ikke fundet</p>
|
||||
<p id="mouse-position"></p>
|
||||
<a href="/anmeldelser">anmeldelser</a>
|
||||
<p id="coords"></p>
|
||||
</div>
|
||||
</main>
|
||||
|
16
frontend/src/review.ts
Normal file
16
frontend/src/review.ts
Normal file
@ -0,0 +1,16 @@
|
||||
const reviewContainer = document.getElementById("review-container")!
|
||||
|
||||
|
||||
|
||||
function addReview(location: string, title: string, content: string, stars: number, ) {
|
||||
const id = Math.random() * 1000000
|
||||
reviewContainer.innerHTML +=
|
||||
`<div id="review${id}">
|
||||
<h3>${title}</h3>
|
||||
<p>${location}</p>
|
||||
<p>${content}</p>
|
||||
<p>${stars} stjerner</p>
|
||||
</div>`
|
||||
}
|
||||
|
||||
addReview("Odense", "meget fint pitstop af motorvejen", "en lille sidevej fra motorvejen hvor det bliver serveret god brunsviger, meget fint sted :)", 5)
|
Loading…
Reference in New Issue
Block a user