diff options
author | Mathias Magnusson <mathias@magnusson.space> | 2025-08-25 14:55:07 +0200 |
---|---|---|
committer | Mathias Magnusson <mathias@magnusson.space> | 2025-08-25 14:58:26 +0200 |
commit | fb59ea2f57da2abf3c7bd76feddfaf10e109d2f4 (patch) | |
tree | a6d7dad7faf61fc50172ee5ac706497b07d7afd2 | |
parent | 5391b4a7b69c7fea5df6fa658c67ec683a94cea3 (diff) | |
download | traedgaardstomten-fb59ea2f57da2abf3c7bd76feddfaf10e109d2f4.tar.gz |
-rw-r--r-- | go.mod | 3 | ||||
-rw-r--r-- | main.go | 22 | ||||
-rw-r--r-- | public/OpenSans-Italic-VariableFont_wdth,wght.ttf (renamed from OpenSans-Italic-VariableFont_wdth,wght.ttf) | bin | 580280 -> 580280 bytes | |||
-rw-r--r-- | public/OpenSans-VariableFont_wdth,wght.ttf (renamed from OpenSans-VariableFont_wdth,wght.ttf) | bin | 529700 -> 529700 bytes | |||
-rw-r--r-- | public/images/efter-1.jpg (renamed from images/efter-1.jpg) | bin | 2687538 -> 2687538 bytes | |||
-rw-r--r-- | public/images/efter-3.jpg (renamed from images/efter-3.jpg) | bin | 2005129 -> 2005129 bytes | |||
-rw-r--r-- | public/images/efter-4.jpg (renamed from images/efter-4.jpg) | bin | 2148716 -> 2148716 bytes | |||
-rw-r--r-- | public/images/före-1.jpg (renamed from images/före-1.jpg) | bin | 853079 -> 853079 bytes | |||
-rw-r--r-- | public/images/före-3.jpg (renamed from images/före-3.jpg) | bin | 1995036 -> 1995036 bytes | |||
-rw-r--r-- | public/images/före-4.jpg (renamed from images/före-4.jpg) | bin | 2093497 -> 2093497 bytes | |||
-rw-r--r-- | public/images/lucas.jpg (renamed from images/lucas.jpg) | bin | 1319268 -> 1319268 bytes | |||
-rw-r--r-- | public/index.html (renamed from index.html) | 4 | ||||
-rw-r--r-- | public/kontakt.html | 28 | ||||
-rw-r--r-- | public/omdömen.html | 45 | ||||
-rw-r--r-- | public/style.css (renamed from style.css) | 33 |
15 files changed, 130 insertions, 5 deletions
@@ -0,0 +1,3 @@ +module git.magnusson.space/traedgaardstomten + +go 1.24.5 @@ -0,0 +1,22 @@ +package main + +import ( + "embed" + "io/fs" + "net/http" +) + +//go:embed public/* +var public embed.FS + +func must[T any](t T, err error) T { + if err != nil { + panic(err) + } + return t +} + +func main() { + http.Handle("/", http.FileServerFS(must(fs.Sub(public, "public")))) + http.ListenAndServe(":http", nil) +} diff --git a/OpenSans-Italic-VariableFont_wdth,wght.ttf b/public/OpenSans-Italic-VariableFont_wdth,wght.ttf Binary files differindex 67a1ac7..67a1ac7 100644 --- a/OpenSans-Italic-VariableFont_wdth,wght.ttf +++ b/public/OpenSans-Italic-VariableFont_wdth,wght.ttf diff --git a/OpenSans-VariableFont_wdth,wght.ttf b/public/OpenSans-VariableFont_wdth,wght.ttf Binary files differindex 548c15f..548c15f 100644 --- a/OpenSans-VariableFont_wdth,wght.ttf +++ b/public/OpenSans-VariableFont_wdth,wght.ttf diff --git a/images/efter-1.jpg b/public/images/efter-1.jpg Binary files differindex 784111f..784111f 100644 --- a/images/efter-1.jpg +++ b/public/images/efter-1.jpg diff --git a/images/efter-3.jpg b/public/images/efter-3.jpg Binary files differindex 7720e09..7720e09 100644 --- a/images/efter-3.jpg +++ b/public/images/efter-3.jpg diff --git a/images/efter-4.jpg b/public/images/efter-4.jpg Binary files differindex d07eafd..d07eafd 100644 --- a/images/efter-4.jpg +++ b/public/images/efter-4.jpg diff --git a/images/före-1.jpg b/public/images/före-1.jpg Binary files differindex d953313..d953313 100644 --- a/images/före-1.jpg +++ b/public/images/före-1.jpg diff --git a/images/före-3.jpg b/public/images/före-3.jpg Binary files differindex 3965218..3965218 100644 --- a/images/före-3.jpg +++ b/public/images/före-3.jpg diff --git a/images/före-4.jpg b/public/images/före-4.jpg Binary files differindex 48b5a69..48b5a69 100644 --- a/images/före-4.jpg +++ b/public/images/före-4.jpg diff --git a/images/lucas.jpg b/public/images/lucas.jpg Binary files differindex 669c4cf..669c4cf 100644 --- a/images/lucas.jpg +++ b/public/images/lucas.jpg diff --git a/index.html b/public/index.html index e829e43..71f63a1 100644 --- a/index.html +++ b/public/index.html @@ -14,8 +14,8 @@ </section> <nav> <a href="/">Tjänster</a> - <a href="/">Omdömen</a> - <a href="/">Kontakt</a> + <a href="/omdömen.html">Omdömen</a> + <a href="/kontakt.html">Kontakt</a> </nav> </header> <main> diff --git a/public/kontakt.html b/public/kontakt.html new file mode 100644 index 0000000..4e8b2ac --- /dev/null +++ b/public/kontakt.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html lang="sv"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Trädgårdstomten.se</title> + <link rel="stylesheet" href="/style.css"> +</head> +<body> + <header> + <section> + <p>Trädgårdstomten ✂️</p> + </section> + <nav> + <a href="/">Tjänster</a> + <a href="/omdömen.html">Omdömen</a> + <a href="/kontakt.html">Kontakt</a> + </nav> + </header> + <main> + <p>Kontakta mig gärna så hör jag av mig så fort jag kan!</p> + <br> + <p>Telefonnummer: <a href="tel:+46 76 595 99 19">+46 76 595 99 19</a></p> + <p>E-postadress: <a href="mailto:lucas253magnusson@gmail.com">lucas253magnusson@gmail.com</a></p> + </main> +</body> +</html> diff --git a/public/omdömen.html b/public/omdömen.html new file mode 100644 index 0000000..1b295ea --- /dev/null +++ b/public/omdömen.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html lang="sv"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Trädgårdstomten.se</title> + <link rel="stylesheet" href="/style.css"> + <script src="https://unpkg.com/hyperscript.org@0.9.14" crossorigin="anonymous" + integrity="sha384-NzchC8z9HmP/Ed8cheGl9XuSrFSkDNHPiDl+ujbHE0F0I7tWC4rUnwPXP+7IvVZv"></script> +</head> +<body> + <header> + <section> + <p>Trädgårdstomten ✂️</p> + </section> + <nav> + <a href="/">Tjänster</a> + <a href="/omdömen.html">Omdömen</a> + <a href="/kontakt.html">Kontakt</a> + </nav> + </header> + <main> + <div class="height-transition-wrapper"> + <form> + <label for="name">Namn:</label> + <input type="text" name="name" id="name"> + <br> + <label for="review">Omdöme:</label> + <textarea name="review" id="review"></textarea> + <br> + <button>Skicka!</button> + </form> + </div> + <button _=" + on click + toggle .open on previous <div/> + if (previous <div/>) match .open then + set my.innerText to 'Stäng formulär' + else + set my.innerText to 'Lämna ett omdöme' + ">Lämna ett omdöme</button> + </main> +</body> +</html> diff --git a/style.css b/public/style.css index ba4bea3..6f145db 100644 --- a/style.css +++ b/public/style.css @@ -57,12 +57,13 @@ header nav a, header nav a:visited { main { padding: 2em; + padding-top: 4em; max-width: 1000px; margin-inline: auto; } main article { - padding-bottom: 2em; + padding-bottom: 4em; display: grid; gap: 2em; grid-template-columns: auto; @@ -92,11 +93,37 @@ main article img { main section { display: grid; grid-template-columns: 1fr 1fr; - gap: 0.5em 1em; - padding-bottom: 1.2em; + gap: 1em; + padding-bottom: 3em; } main section img { width: 100%; height: auto; } + +button { + background-color: var(--green); + border: none; + border-radius: 4px; + padding: 0.5em; + color: var(--beige); +} + +button:active { + background-color: var(--green-1); +} + +.height-transition-wrapper { + display: grid; + grid-template-rows: 0fr; + transition: grid-template-rows 0.3s ease-in-out; +} + +.height-transition-wrapper.open { + grid-template-rows: 1fr; +} + +.height-transition-wrapper > * { + overflow: hidden; +} |