From fb59ea2f57da2abf3c7bd76feddfaf10e109d2f4 Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Mon, 25 Aug 2025 14:55:07 +0200 Subject: Begin implementing go server --- OpenSans-Italic-VariableFont_wdth,wght.ttf | Bin 580280 -> 0 bytes OpenSans-VariableFont_wdth,wght.ttf | Bin 529700 -> 0 bytes go.mod | 3 + images/efter-1.jpg | Bin 2687538 -> 0 bytes images/efter-3.jpg | Bin 2005129 -> 0 bytes images/efter-4.jpg | Bin 2148716 -> 0 bytes "images/f\303\266re-1.jpg" | Bin 853079 -> 0 bytes "images/f\303\266re-3.jpg" | Bin 1995036 -> 0 bytes "images/f\303\266re-4.jpg" | Bin 2093497 -> 0 bytes images/lucas.jpg | Bin 1319268 -> 0 bytes index.html | 54 --------- main.go | 22 ++++ public/OpenSans-Italic-VariableFont_wdth,wght.ttf | Bin 0 -> 580280 bytes public/OpenSans-VariableFont_wdth,wght.ttf | Bin 0 -> 529700 bytes public/images/efter-1.jpg | Bin 0 -> 2687538 bytes public/images/efter-3.jpg | Bin 0 -> 2005129 bytes public/images/efter-4.jpg | Bin 0 -> 2148716 bytes "public/images/f\303\266re-1.jpg" | Bin 0 -> 853079 bytes "public/images/f\303\266re-3.jpg" | Bin 0 -> 1995036 bytes "public/images/f\303\266re-4.jpg" | Bin 0 -> 2093497 bytes public/images/lucas.jpg | Bin 0 -> 1319268 bytes public/index.html | 54 +++++++++ public/kontakt.html | 28 +++++ "public/omd\303\266men.html" | 45 ++++++++ public/style.css | 129 ++++++++++++++++++++++ style.css | 102 ----------------- 26 files changed, 281 insertions(+), 156 deletions(-) delete mode 100644 OpenSans-Italic-VariableFont_wdth,wght.ttf delete mode 100644 OpenSans-VariableFont_wdth,wght.ttf create mode 100644 go.mod delete mode 100644 images/efter-1.jpg delete mode 100644 images/efter-3.jpg delete mode 100644 images/efter-4.jpg delete mode 100644 "images/f\303\266re-1.jpg" delete mode 100644 "images/f\303\266re-3.jpg" delete mode 100644 "images/f\303\266re-4.jpg" delete mode 100644 images/lucas.jpg delete mode 100644 index.html create mode 100644 main.go create mode 100644 public/OpenSans-Italic-VariableFont_wdth,wght.ttf create mode 100644 public/OpenSans-VariableFont_wdth,wght.ttf create mode 100644 public/images/efter-1.jpg create mode 100644 public/images/efter-3.jpg create mode 100644 public/images/efter-4.jpg create mode 100644 "public/images/f\303\266re-1.jpg" create mode 100644 "public/images/f\303\266re-3.jpg" create mode 100644 "public/images/f\303\266re-4.jpg" create mode 100644 public/images/lucas.jpg create mode 100644 public/index.html create mode 100644 public/kontakt.html create mode 100644 "public/omd\303\266men.html" create mode 100644 public/style.css delete mode 100644 style.css diff --git a/OpenSans-Italic-VariableFont_wdth,wght.ttf b/OpenSans-Italic-VariableFont_wdth,wght.ttf deleted file mode 100644 index 67a1ac7..0000000 Binary files a/OpenSans-Italic-VariableFont_wdth,wght.ttf and /dev/null differ diff --git a/OpenSans-VariableFont_wdth,wght.ttf b/OpenSans-VariableFont_wdth,wght.ttf deleted file mode 100644 index 548c15f..0000000 Binary files a/OpenSans-VariableFont_wdth,wght.ttf and /dev/null differ diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..d6ba31d --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.magnusson.space/traedgaardstomten + +go 1.24.5 diff --git a/images/efter-1.jpg b/images/efter-1.jpg deleted file mode 100644 index 784111f..0000000 Binary files a/images/efter-1.jpg and /dev/null differ diff --git a/images/efter-3.jpg b/images/efter-3.jpg deleted file mode 100644 index 7720e09..0000000 Binary files a/images/efter-3.jpg and /dev/null differ diff --git a/images/efter-4.jpg b/images/efter-4.jpg deleted file mode 100644 index d07eafd..0000000 Binary files a/images/efter-4.jpg and /dev/null differ diff --git "a/images/f\303\266re-1.jpg" "b/images/f\303\266re-1.jpg" deleted file mode 100644 index d953313..0000000 Binary files "a/images/f\303\266re-1.jpg" and /dev/null differ diff --git "a/images/f\303\266re-3.jpg" "b/images/f\303\266re-3.jpg" deleted file mode 100644 index 3965218..0000000 Binary files "a/images/f\303\266re-3.jpg" and /dev/null differ diff --git "a/images/f\303\266re-4.jpg" "b/images/f\303\266re-4.jpg" deleted file mode 100644 index 48b5a69..0000000 Binary files "a/images/f\303\266re-4.jpg" and /dev/null differ diff --git a/images/lucas.jpg b/images/lucas.jpg deleted file mode 100644 index 669c4cf..0000000 Binary files a/images/lucas.jpg and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index e829e43..0000000 --- a/index.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - Trädgårdstomten.se - - - -
-
-

Trädgårdstomten ✂️

-
- -
-
-
-

- Jag heter Lucas Magnusson, är 26 år gammal och har flera års yrkeserfarenhet och - är även utbildad inom trädgård. Jag har alltid varit intresserad av allt som - växer. Så tidigt som vid 3 års ålder började jag trycka ner frön i jorden. - Trädgård är och har alltid varit mitt största intresse, min hobby och det jag nu - jobbar med. -

-

- Sedan jag slutade gymnasiet (2018) har jag drivit eget företag. Jag har åkt runt - till trädgårdar och beskurit, klippt häck, fixat med skötsel, designat och - planterat. Jag tycker det är så kul att dela med mig av den glädjen till mina - kunder.

-

- Här är några jobb jag gjort, se före och efter bilder: -

- Lucas Magnusson -
-
- - -
-
- - -
-
- - -
-
- - diff --git a/main.go b/main.go new file mode 100644 index 0000000..97d40a4 --- /dev/null +++ b/main.go @@ -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/public/OpenSans-Italic-VariableFont_wdth,wght.ttf b/public/OpenSans-Italic-VariableFont_wdth,wght.ttf new file mode 100644 index 0000000..67a1ac7 Binary files /dev/null and b/public/OpenSans-Italic-VariableFont_wdth,wght.ttf differ diff --git a/public/OpenSans-VariableFont_wdth,wght.ttf b/public/OpenSans-VariableFont_wdth,wght.ttf new file mode 100644 index 0000000..548c15f Binary files /dev/null and b/public/OpenSans-VariableFont_wdth,wght.ttf differ diff --git a/public/images/efter-1.jpg b/public/images/efter-1.jpg new file mode 100644 index 0000000..784111f Binary files /dev/null and b/public/images/efter-1.jpg differ diff --git a/public/images/efter-3.jpg b/public/images/efter-3.jpg new file mode 100644 index 0000000..7720e09 Binary files /dev/null and b/public/images/efter-3.jpg differ diff --git a/public/images/efter-4.jpg b/public/images/efter-4.jpg new file mode 100644 index 0000000..d07eafd Binary files /dev/null and b/public/images/efter-4.jpg differ diff --git "a/public/images/f\303\266re-1.jpg" "b/public/images/f\303\266re-1.jpg" new file mode 100644 index 0000000..d953313 Binary files /dev/null and "b/public/images/f\303\266re-1.jpg" differ diff --git "a/public/images/f\303\266re-3.jpg" "b/public/images/f\303\266re-3.jpg" new file mode 100644 index 0000000..3965218 Binary files /dev/null and "b/public/images/f\303\266re-3.jpg" differ diff --git "a/public/images/f\303\266re-4.jpg" "b/public/images/f\303\266re-4.jpg" new file mode 100644 index 0000000..48b5a69 Binary files /dev/null and "b/public/images/f\303\266re-4.jpg" differ diff --git a/public/images/lucas.jpg b/public/images/lucas.jpg new file mode 100644 index 0000000..669c4cf Binary files /dev/null and b/public/images/lucas.jpg differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..71f63a1 --- /dev/null +++ b/public/index.html @@ -0,0 +1,54 @@ + + + + + + + Trädgårdstomten.se + + + +
+
+

Trädgårdstomten ✂️

+
+ +
+
+
+

+ Jag heter Lucas Magnusson, är 26 år gammal och har flera års yrkeserfarenhet och + är även utbildad inom trädgård. Jag har alltid varit intresserad av allt som + växer. Så tidigt som vid 3 års ålder började jag trycka ner frön i jorden. + Trädgård är och har alltid varit mitt största intresse, min hobby och det jag nu + jobbar med. +

+

+ Sedan jag slutade gymnasiet (2018) har jag drivit eget företag. Jag har åkt runt + till trädgårdar och beskurit, klippt häck, fixat med skötsel, designat och + planterat. Jag tycker det är så kul att dela med mig av den glädjen till mina + kunder.

+

+ Här är några jobb jag gjort, se före och efter bilder: +

+ Lucas Magnusson +
+
+ + +
+
+ + +
+
+ + +
+
+ + 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 @@ + + + + + + + Trädgårdstomten.se + + + +
+
+

Trädgårdstomten ✂️

+
+ +
+
+

Kontakta mig gärna så hör jag av mig så fort jag kan!

+
+

Telefonnummer: +46 76 595 99 19

+

E-postadress: lucas253magnusson@gmail.com

+
+ + diff --git "a/public/omd\303\266men.html" "b/public/omd\303\266men.html" new file mode 100644 index 0000000..1b295ea --- /dev/null +++ "b/public/omd\303\266men.html" @@ -0,0 +1,45 @@ + + + + + + + Trädgårdstomten.se + + + + +
+
+

Trädgårdstomten ✂️

+
+ +
+
+
+
+ + +
+ + +
+ +
+
+ +
+ + diff --git a/public/style.css b/public/style.css new file mode 100644 index 0000000..6f145db --- /dev/null +++ b/public/style.css @@ -0,0 +1,129 @@ +* { + margin: 0; + box-sizing: border-box; +} + +@font-face { + font-family: "OpenSans"; + src: url(/OpenSans-VariableFont_wdth,wght.ttf); +} + +:root { + --night: #0c090b; + --pink: #ea46c5; + --beige: #e9eddd; + --rose: #9e0012; + + --green: #5a851c; + --green-1: #486a16; + --green-2: #364f10; + + color: var(--night); +} + +body { + font-family: OpenSans; + background-color: #eee; +} + +header section { + padding-block: 0.6em; + text-align: center; + font-size: 32px; + background-color: var(--green); + display: grid; + place-items: center; + color: var(--beige); +} + +@media (min-width: 500px) { + header section { + font-size: 48px; + } +} + +header nav { + display: flex; + justify-content: center; + background-color: var(--green-1); + gap: 0.5em; +} + +header nav a, header nav a:visited { + padding: 0.5em 1em; + color: var(--beige); + text-decoration: none; +} + +main { + padding: 2em; + padding-top: 4em; + max-width: 1000px; + margin-inline: auto; +} + +main article { + padding-bottom: 4em; + display: grid; + gap: 2em; + grid-template-columns: auto; + grid-template-areas: "p1" "img" "p2" "p3"; +} + +@media (min-width: 500px) { + main article { + grid-template-columns: auto auto; + grid-template-areas: "p1 img" "p2 p2" "p3 p3"; + } +} + +@media (min-width: 650px) { + main article { + grid-template-areas: "p1 img" "p2 img" "p3 img"; + } +} + +main article img { + max-width: 220px; + height: auto; + object-fit: contain; + grid-area: img; +} + +main section { + display: grid; + grid-template-columns: 1fr 1fr; + 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; +} diff --git a/style.css b/style.css deleted file mode 100644 index ba4bea3..0000000 --- a/style.css +++ /dev/null @@ -1,102 +0,0 @@ -* { - margin: 0; - box-sizing: border-box; -} - -@font-face { - font-family: "OpenSans"; - src: url(/OpenSans-VariableFont_wdth,wght.ttf); -} - -:root { - --night: #0c090b; - --pink: #ea46c5; - --beige: #e9eddd; - --rose: #9e0012; - - --green: #5a851c; - --green-1: #486a16; - --green-2: #364f10; - - color: var(--night); -} - -body { - font-family: OpenSans; - background-color: #eee; -} - -header section { - padding-block: 0.6em; - text-align: center; - font-size: 32px; - background-color: var(--green); - display: grid; - place-items: center; - color: var(--beige); -} - -@media (min-width: 500px) { - header section { - font-size: 48px; - } -} - -header nav { - display: flex; - justify-content: center; - background-color: var(--green-1); - gap: 0.5em; -} - -header nav a, header nav a:visited { - padding: 0.5em 1em; - color: var(--beige); - text-decoration: none; -} - -main { - padding: 2em; - max-width: 1000px; - margin-inline: auto; -} - -main article { - padding-bottom: 2em; - display: grid; - gap: 2em; - grid-template-columns: auto; - grid-template-areas: "p1" "img" "p2" "p3"; -} - -@media (min-width: 500px) { - main article { - grid-template-columns: auto auto; - grid-template-areas: "p1 img" "p2 p2" "p3 p3"; - } -} - -@media (min-width: 650px) { - main article { - grid-template-areas: "p1 img" "p2 img" "p3 img"; - } -} - -main article img { - max-width: 220px; - height: auto; - object-fit: contain; - grid-area: img; -} - -main section { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 0.5em 1em; - padding-bottom: 1.2em; -} - -main section img { - width: 100%; - height: auto; -} -- cgit v1.2.3