From 6e5dcb5fe1bce9681220d40c0be2d7c09e5c4ec8 Mon Sep 17 00:00:00 2001 From: hacki Date: Mon, 2 Oct 2023 02:45:41 +0200 Subject: [PATCH] :tada: First commit with basic frontend ! --- .gitignore | 18 ++++++++++ .idea/.gitignore | 6 ++++ .idea/modules.xml | 8 +++++ .idea/plakken.iml | 10 ++++++ .idea/vcs.xml | 6 ++++ app.js | 0 go.mod | 3 ++ index.html | 38 +++++++++++++++++++++ main.go | 28 +++++++++++++++ style.css | 87 +++++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 204 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/modules.xml create mode 100644 .idea/plakken.iml create mode 100644 .idea/vcs.xml create mode 100644 app.js create mode 100644 go.mod create mode 100644 index.html create mode 100644 main.go create mode 100644 style.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00b2937 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +### Go ### +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..8bf4d45 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,6 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b9c05c5 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/plakken.iml b/.idea/plakken.iml new file mode 100644 index 0000000..7f4273e --- /dev/null +++ b/.idea/plakken.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..e69de29 diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4a496c4 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module plakken + +go 1.21 diff --git a/index.html b/index.html new file mode 100644 index 0000000..cbf8e4f --- /dev/null +++ b/index.html @@ -0,0 +1,38 @@ + + + + + + + Your plak • Plakken + + + + + + + + \ No newline at end of file diff --git a/main.go b/main.go new file mode 100644 index 0000000..373757f --- /dev/null +++ b/main.go @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "net/http" +) + +func main() { + i := 0 + i = 5 + + var k int8 = 0 + + fmt.Println(i) + fmt.Println(k) + + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + _, err := fmt.Fprintf(w, "Hello, you're at %s", r.URL.Path) + if err != nil { + return + } + }) + + err := http.ListenAndServe(":8080", nil) + if err != nil { + return + } +} diff --git a/style.css b/style.css new file mode 100644 index 0000000..eb267a1 --- /dev/null +++ b/style.css @@ -0,0 +1,87 @@ +:root { + --accent: #0080e5; + --background: #121212; + --border: #2d2d2d; + --text: #f1f4f5; +} + +body { + background-color: var(--background); + color: var(--text); + font: 400 15px/2 "system-ui", monospace; + margin: 0; +} + +textarea { + appearance: none; + color: var(--text); + font: 14px/1.6 "JetBrains Mono", monospace; + height: calc(100vh - 5rem - 6px); + outline: none; + padding: 1rem; + resize: none; + width: calc(100vw - 2rem); +} + +nav { + align-items: end; + bottom: 1rem; + display: flex; + flex-flow: row wrap; + position: absolute; + right: 1rem; +} + +ul { + display: flex; + flex-flow: row wrap; + list-style: none; + gap: 2.6rem; + height: 60px; + margin: 0; + padding: 0 1rem; + width: fit-content; +} + +label { + display: block; +} + +input, select { + appearance: none; + background-color: var(--background); + border: 2px solid var(--border); + border-radius: 2px; + color: var(--text); + font-size: 15px; + padding: 5px 6px; + transition: border .15s ease; +} + +button, textarea { + background-color: var(--background); + border: none; +} + +svg { + fill: none; + stroke: #ddd; + stroke-width: 2; + stroke-linecap: round; + transition: .15s ease; +} + +input:hover, select:hover, svg:hover { + border-color: #ddd; + stroke: #fff; +} + +/*::selection { + background-color: var(--text); + color: var(--background); +}*/ + +::selection { + background-color: #be0560; + color: #fff; +} \ No newline at end of file