From 7e8d7e1b115cc9e462e0baa0f347cc2bd8286ee5 Mon Sep 17 00:00:00 2001 From: Mikkel Date: Thu, 9 Feb 2023 13:05:18 +0100 Subject: [PATCH] create review site --- frontend/anmeldelser/index.html | 33 +++++++++++++++++++++++++++++++++ frontend/anmeldelser/style.css | 4 ++++ frontend/index.html | 1 + frontend/src/review.ts | 16 ++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 frontend/anmeldelser/index.html create mode 100644 frontend/anmeldelser/style.css create mode 100644 frontend/src/review.ts diff --git a/frontend/anmeldelser/index.html b/frontend/anmeldelser/index.html new file mode 100644 index 0000000..4d527ce --- /dev/null +++ b/frontend/anmeldelser/index.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + Postnummer App + + + + + + + +
+

Postnummer App

+
+ + +
+

Anmeldelser

+
+ + + \ No newline at end of file diff --git a/frontend/anmeldelser/style.css b/frontend/anmeldelser/style.css new file mode 100644 index 0000000..5a3acd5 --- /dev/null +++ b/frontend/anmeldelser/style.css @@ -0,0 +1,4 @@ +#anmeldelser { + display: flex; + justify-content: center; +} \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 67c4207..e14b206 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -33,6 +33,7 @@

Postnummer ikke fundet

+ anmeldelser

diff --git a/frontend/src/review.ts b/frontend/src/review.ts new file mode 100644 index 0000000..eba1a4e --- /dev/null +++ b/frontend/src/review.ts @@ -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 += + `
+

${title}

+

${location}

+

${content}

+

${stars} stjerner

+
` +} + +addReview("Odense", "meget fint pitstop af motorvejen", "en lille sidevej fra motorvejen hvor det bliver serveret god brunsviger, meget fint sted :)", 5)