commit afe05b010d9a93496c6a59e7eff37be800e039e4 Author: lennobay Date: Thu Sep 3 12:58:35 2026 +0200 commit of v1.0 diff --git a/articles/this_website.md b/articles/this_website.md new file mode 100644 index 0000000..fc6a320 --- /dev/null +++ b/articles/this_website.md @@ -0,0 +1,9 @@ +# This Website +DESCRIPTION:This Website had a lot of diffrent version, featuring diffrent styles... +TAGS:projects,css,html,coding +HEADIMAGE:another.png +This Website had a lot of diffrent version, featuring diffrent styles. Everytime I recreate it, I say "this will be the version I will continue on", but then I make a change to it or am unhappy with it. So I create a new Version, mostly from scratch. If I would be honest I could call this version of the Website v20 at least, but I will call it v1. +## The "Technology" behind it +I use golang to run the http server and to compile my md files to a static website. I use md over html, becaus first one always needs to add "<>" and at the end "" of every text element, this makes it a long and fustrating process to write it. Additionaly one needs to add the head, the header and the footer to every file seperatly.This makes changing a style outside the universal css file more complicated. This means that one thinks of a new header structure, every header in every file needs to be changed. Which can be done of course with a IDE and its "occurences-tool", but this process does not ensure correct result. Leading to error this makes the progess even longer, then with the compalation method. +## Usage of the Website +This website is being populated with diffent informations such as projects, documentations and comments on diffrent technical standpoints. I will use it to improve my english level. So if you are an born english speaker, please be so kind and report any erros to me. diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..84042f4 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module haufenet.de + +go 1.26.4 diff --git a/haufenet.com b/haufenet.com new file mode 100755 index 0000000..dde9ac6 Binary files /dev/null and b/haufenet.com differ diff --git a/haufenet.de b/haufenet.de new file mode 100755 index 0000000..4438613 Binary files /dev/null and b/haufenet.de differ diff --git a/main.go b/main.go new file mode 100644 index 0000000..31a4f93 --- /dev/null +++ b/main.go @@ -0,0 +1,181 @@ +package main + +import ( + "bufio" + "log" + "net/http" + "os" + "strings" +) + +var data_articles_index string = "" +var top string = "Haufenet
Haufenet
" +var bottom string = "" + +func main() { + entries, err := os.ReadDir("./articles") + if err != nil { + log.Fatal(err) + } + for _, e := range entries { + + ReadFileArticles(e.Name()) + SetupDataIndexArticles(e.Name()) + } + log.Print("Server running on port 8090") + EditArticlesPage() + ReadFileOthers("imprint_privacy.md") + fileserver := http.FileServer(http.Dir("./website")) + http.Handle("/", fileserver) + + if err := http.ListenAndServe(":8090", nil); err != nil { + log.Fatal(err) + } + +} +func EditArticlesPage() { + + err := os.WriteFile("./website/articles/index.html", []byte(top+"

Articles

"+data_articles_index+"
"+bottom), 0755) + if err != nil { + panic(err) + } +} +func SetupDataIndexArticles(filename string) { + + file, err := os.Open("./articles/" + filename) + if err != nil { + log.Fatalf("not opening") + } + defer file.Close() + + scanner := bufio.NewScanner(file) + var title string = "" + var description string = "" + var tags string = "" + var image string = "" + for scanner.Scan() { + content := scanner.Text() + if strings.Contains(content, "###") { + continue + } else if strings.Contains(content, "##") { + continue + } else if strings.Contains(content, "#") { + part := strings.Split(content, `#`) + title = "

" + part[1] + "

" + } else if strings.Contains(content, "DESCRIPTION:") { + part := strings.Split(content, `DESCRIPTION:`) + description = "

" + part[1] + "

" + } else if strings.Contains(content, "HEADIMAGE:") { + part := strings.Split(content, `HEADIMAGE:`) + image = "" + } else if strings.Contains(content, "TAGS:") { + part := strings.Split(content, `TAGS:`) + part_2 := strings.Split(part[1], ",") + part_tags := "" + for i := 0; i < len(part_2); i++ { + part_tags += "" + part_2[i] + "" + } + part_tags += "" + tags = part_tags + } else { + continue + } + } + + filename_new := strings.Split(filename, ".md") + data_articles_index += "" + title + image + description + "" + tags + "" + +} + +func ReadFileArticles(filename string) { + file, err := os.Open("./articles/" + filename) + if err != nil { + log.Fatalf("not opening") + } + defer file.Close() + + scanner := bufio.NewScanner(file) + var new_text string = "" + var tags string = "" + for scanner.Scan() { + content := scanner.Text() + var end_type string = "" + + if strings.Contains(content, "###") { + part := strings.Split(content, `###`) + end_type = "

" + part[1] + "

" + } else if strings.Contains(content, "##") { + part := strings.Split(content, `##`) + end_type = "

" + part[1] + "

" + } else if strings.Contains(content, "#") { + part := strings.Split(content, `#`) + end_type = "

" + part[1] + "

" + } else if strings.Contains(content, "HEADIMAGE:") { + part := strings.Split(content, `HEADIMAGE:`) + end_type = "" + } else if strings.Contains(content, "[img]:") { + part := strings.Split(content, `[img]:`) + end_type = "" + } else if strings.Contains(content, "DESCRIPTION:") { + end_type = "" + } else if strings.Contains(content, "TAGS:") { + part := strings.Split(content, `TAGS:`) + part_2 := strings.Split(part[1], ",") + part_tags := "" + for i := 0; i < len(part_2); i++ { + part_tags += "" + part_2[i] + "" + } + part_tags += "" + tags = part_tags + } else if content == "" { + end_type = "
" + } else { + end_type = "

" + content + "

" + } + new_text += end_type + + } + filename_new := strings.Split(filename, ".md") + err = os.WriteFile("./website/articles/"+filename_new[0]+".html", []byte(top+""+new_text+"

Tags

"+tags+"
"+bottom), 0755) + if err != nil { + panic(err) + } +} + +func ReadFileOthers(filename string) { + file, err := os.Open("./other/" + filename) + if err != nil { + log.Fatalf("not opening") + } + defer file.Close() + + scanner := bufio.NewScanner(file) + var new_text string = "" + for scanner.Scan() { + content := scanner.Text() + var end_type string = "" + + if strings.Contains(content, "###") { + part := strings.Split(content, `###`) + end_type = "

" + part[1] + "

" + } else if strings.Contains(content, "##") { + part := strings.Split(content, `##`) + end_type = "

" + part[1] + "

" + } else if strings.Contains(content, "#") { + part := strings.Split(content, `#`) + end_type = "

" + part[1] + "

" + } else if content == "" { + end_type = "
" + } else { + end_type = "

" + content + "

" + } + new_text += end_type + + } + filename_new := strings.Split(filename, ".md") + err = os.Mkdir("./website/"+filename_new[0], 0755) + err = os.WriteFile("./website/"+filename_new[0]+"/index.html", []byte(top+"
"+new_text+"
"+bottom), 0755) + if err != nil { + panic(err) + } +} diff --git a/other/about.md b/other/about.md new file mode 100644 index 0000000..e69de29 diff --git a/other/imprint_privacy.md b/other/imprint_privacy.md new file mode 100644 index 0000000..a90b2c3 --- /dev/null +++ b/other/imprint_privacy.md @@ -0,0 +1,15 @@ +# Impressum +Lennard Haufe +Obere Ziegeli 11 +71522 Backnang +# Kontakt +Telefon: 004917650320223 +E-Mail: info.lennard.haufe@haufenet.com +# Inhaltlich verantwortlich i.S.v. § 18 Abs. 2 MStV +Lennard Haufe +Obere Ziegelei 11 +71522 Backnang +# Dieses Impressum gilt auch für folgende Social-Media-Profile +Instagram: https://www.instagram.com/haufe_net_com/ +# Quellenangaben für verwendete Bilder und Grafiken +D. Stroh – byd-film.de diff --git a/website/apple-touch-icon.png b/website/apple-touch-icon.png new file mode 100644 index 0000000..72fa643 Binary files /dev/null and b/website/apple-touch-icon.png differ diff --git a/website/articles/fuck.html b/website/articles/fuck.html new file mode 100755 index 0000000..3f69831 --- /dev/null +++ b/website/articles/fuck.html @@ -0,0 +1 @@ +Haufenet
Haufenet

Fuck

some text you wrote me

this is what i wrote and display

Tags

projectscsshtmlcoding
\ No newline at end of file diff --git a/website/articles/index.html b/website/articles/index.html new file mode 100644 index 0000000..02002e2 --- /dev/null +++ b/website/articles/index.html @@ -0,0 +1 @@ +Haufenet
Haufenet

Articles

This Website

This Website had a lot of diffrent version, featuring diffrent styles...

projectscsshtmlcoding
\ No newline at end of file diff --git a/website/articles/sometext.html b/website/articles/sometext.html new file mode 100755 index 0000000..cfa7cb2 --- /dev/null +++ b/website/articles/sometext.html @@ -0,0 +1 @@ +Haufenet
Haufenet

This Website


This Website had a lot of diffrent version, featuring diffrent styles. Everytime I recreate it, I say "this will be the version I will continue on", but then I make a change to it or am unhappy with it. So I create a new Version, mostly from scratch. If I would be honest I could call this version of the Website v20 at least, but I will call it v1.



I use golang as my http server and my language to compile my static website. I do it to be able to md as my article writting language, as I do not think that html is good enough for that. First of all i alwasy need to add "<>" and at the end "", this makes it a long and fustrating process to write it. Additionaly one nees to add the head as well as the header and footer to every article, which makes changing a style more complicated, when you not only change the css. For example when you change the order of the header, every article needs to be changed, but this static site approach allows to make change to one variable, so that everything is changed.

Tags

projectscsshtmlcoding
\ No newline at end of file diff --git a/website/articles/this_website.html b/website/articles/this_website.html new file mode 100755 index 0000000..d2176b3 --- /dev/null +++ b/website/articles/this_website.html @@ -0,0 +1 @@ +Haufenet
Haufenet

This Website

This Website had a lot of diffrent version, featuring diffrent styles. Everytime I recreate it, I say "this will be the version I will continue on", but then I make a change to it or am unhappy with it. So I create a new Version, mostly from scratch. If I would be honest I could call this version of the Website v20 at least, but I will call it v1.

The "Technology" behind it

I use golang to run the http server and to compile my md files to a static website. I use md over html, becaus first one always needs to add "<>" and at the end "" of every text element, this makes it a long and fustrating process to write it. Additionaly one needs to add the head, the header and the footer to every file seperatly.This makes changing a style outside the universal css file more complicated. This means that one thinks of a new header structure, every header in every file needs to be changed. Which can be done of course with a IDE and its "occurences-tool", but this process does not ensure correct result. Leading to error this makes the progess even longer, then with the compalation method.

Usage of the Website

This website is being populated with diffent informations such as projects, documentations and comments on diffrent technical standpoints. I will use it to improve my english level. So if you are an born english speaker, please be so kind and report any erros to me.

Tags

projectscsshtmlcoding
\ No newline at end of file diff --git a/website/favicon-96x96.png b/website/favicon-96x96.png new file mode 100644 index 0000000..8379ece Binary files /dev/null and b/website/favicon-96x96.png differ diff --git a/website/favicon.ico b/website/favicon.ico new file mode 100644 index 0000000..1c3aa3f Binary files /dev/null and b/website/favicon.ico differ diff --git a/website/favicon.svg b/website/favicon.svg new file mode 100644 index 0000000..627f2ce --- /dev/null +++ b/website/favicon.svg @@ -0,0 +1 @@ +RealFaviconGeneratorhttps://realfavicongenerator.net \ No newline at end of file diff --git a/website/imprint_privacy/index.html b/website/imprint_privacy/index.html new file mode 100755 index 0000000..7f80cf7 --- /dev/null +++ b/website/imprint_privacy/index.html @@ -0,0 +1 @@ +Haufenet
Haufenet

Impressum

Lennard Haufe

Obere Ziegeli 11

71522 Backnang

Kontakt

Telefon: 004917650320223

E-Mail: info.lennard.haufe@haufenet.com

Inhaltlich verantwortlich i.S.v. § 18 Abs. 2 MStV

Lennard Haufe

Obere Ziegelei 11

71522 Backnang

Dieses Impressum gilt auch für folgende Social-Media-Profile

Instagram: https://www.instagram.com/haufe_net_com/

Quellenangaben für verwendete Bilder und Grafiken

D. Stroh – byd-film.de

\ No newline at end of file diff --git a/website/index.css b/website/index.css new file mode 100644 index 0000000..646198a --- /dev/null +++ b/website/index.css @@ -0,0 +1,161 @@ +body{ + margin: 0; + left: 0; + font-family: sans-serif; +} +header{ + display: grid; + grid-template-columns: 1fr 1fr 1fr; + background-color: hsl(0 0% 10%); + padding: 1rem; + gap: 1rem; +} +img{ + width: 800px +} +header a{ + display: flex; + align-items: center; + justify-content: center; + text-decoration: none; + color: white; + +} + +footer{ + display: flex; + align-items: center; + justify-content: center; + flex-direction: row; + gap: 1rem; + background-color: hsl(0 0% 10%); + color: hsl(0 0% 80%); +} +footer a{ + text-decoration: none; + font-weight: bold; + color: hsl(0 0% 90%); +} +list-articles{ + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + background-color: #FFF07C; + +} + +.bbh-bogle-regular { + font-family: "BBH Bogle", sans-serif; + font-weight: 400; + font-style: normal; +} + +#top-article-list{ + font-size: 6rem; + font-family: "BBH Bogle", sans-serif; +} + +list-articles div{ + max-width: 800px; + display: grid; + grid-auto-rows: 1fr; + gap: 2rem; + margin-bottom: 2rem; +} +article-display a{ + text-decoration: none; + color: black; +} +article-display a h1:hover{ + text-decoration: underline; +} +articles-tags{ + display: flex; + flex-direction: row; + gap: 1rem; + +} +articles-tags a{ + color: hsl(0 0% 90%); + padding: 0.5rem; + font-weight: bold; + background-color: black; +} +articles-detail{ + display: flex; + align-items: center; + justify-content: center; + text-align: justify; + +} +body-inner{ + background-color: #437C90; +} +articles-detail-down{ + max-width: 800px; + text-align: justify; + padding: 1rem; +} +articles-detail div{ + padding: 1rem; +} +skills{ + display: flex; + flex-direction: column; + padding: 1rem; + gap: 4px; +} +skills-sub{ + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 1rem; +} + +skills-sub button{ + background-color: black; + color: hsl(0 0% 80%); + font-weight: bold; + border: none; +} +skills-sub button:hover{ + background-color: hsl(0 0% 10%); +} +about h1,p{ + display: flex; + flex-direction: column; + padding: 1rem; + max-width: 900px; +} +.special-header{ + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + font-family: "BBH Bogle", sans-serif; + font-size: 8rem; +} +about{ + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} +@media (max-width: 1200px){ + img{ + width: 100%; + } + skills-sub{ + display: grid; + grid-template-columns: 1fr; + grid-template-rows: 0.1fr 0.1fr 1fr; + } + article-display{ + padding: 1rem; + } + footer{ + padding-bottom: 1rem; + display: flex; + flex-direction: column; + } +} diff --git a/website/index.html b/website/index.html new file mode 100644 index 0000000..ab569c2 --- /dev/null +++ b/website/index.html @@ -0,0 +1,26 @@ +Haufenet
Haufenet
+ +

Who I am and what I do

+ +

Hi my name is Lennard. I am a currently a student in High School and will finish it in 2027 (hopefully ;) ). I do not like to make any photos of me and post them, so you got a text instead. I do not claim to be very capable, but I still aquired some skills in the past years. When talking about the past years, I mean now 4 years since I started to take interest in IT. I started of with the idea of an NAS(Network Attached Storage), but not existant funds let me to use old laptops. The story is even longer but I will not mention the rest

+
+ + +

Networking

+

From Opnsense, Unifi to Linux and Servers

+ +
+ +

Programming

+

Loved JS and Golang, tried C and forced Java

+ +
+ +

Design

+

Work in Progress ... as You can see

+ +
+
+ +
+ diff --git a/website/pictures/another.png b/website/pictures/another.png new file mode 100644 index 0000000..b415618 Binary files /dev/null and b/website/pictures/another.png differ diff --git a/website/pictures/test.png b/website/pictures/test.png new file mode 100644 index 0000000..a4ac0b0 Binary files /dev/null and b/website/pictures/test.png differ diff --git a/website/site.webmanifest b/website/site.webmanifest new file mode 100644 index 0000000..c99d191 --- /dev/null +++ b/website/site.webmanifest @@ -0,0 +1,21 @@ +{ + "name": "Haufenet", + "short_name": "HFT", + "icons": [ + { + "src": "/web-app-manifest-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "/web-app-manifest-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/website/web-app-manifest-192x192.png b/website/web-app-manifest-192x192.png new file mode 100644 index 0000000..09012d4 Binary files /dev/null and b/website/web-app-manifest-192x192.png differ diff --git a/website/web-app-manifest-512x512.png b/website/web-app-manifest-512x512.png new file mode 100644 index 0000000..d8ca1e8 Binary files /dev/null and b/website/web-app-manifest-512x512.png differ