🎉 First commit with basic frontend !

This commit is contained in:
Hacki 2023-10-02 02:45:41 +02:00 committed by Akinimaginable
commit 6e5dcb5fe1
10 changed files with 204 additions and 0 deletions

18
.gitignore vendored Normal file
View file

@ -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

6
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

8
.idea/modules.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/plakken.iml" filepath="$PROJECT_DIR$/.idea/plakken.iml" />
</modules>
</component>
</project>

10
.idea/plakken.iml Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="highlight.js" level="application" />
</component>
</module>

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

0
app.js Normal file
View file

3
go.mod Normal file
View file

@ -0,0 +1,3 @@
module plakken
go 1.21

38
index.html Normal file
View file

@ -0,0 +1,38 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, user-scalable=no, initial-scale=1.0"
name="viewport">
<meta content="ie=edge" http-equiv="X-UA-Compatible">
<title>Your plak • Plakken</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<label for="content"></label>
<textarea id="content" name="content" placeholder="Your paste here"></textarea>
<nav>
<ul>
<li>
<label for="password">Password?</label>
<input id="password" type="text">
</li>
<li><label for="exp">Expiration?</label>
<input id="exp" type="date"></li>
<li>
<label for="type">Type</label>
<select id="type" name="type">
<option value="">Plaintext</option>
<option value="">Python</option>
</select>
</li>
</ul>
<button>
<svg height="26" viewBox="0 0 24 24" width="26" xmlns="http://www.w3.org/2000/svg">
<polyline points="9 11 12 14 22 4"></polyline>
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>
</svg>
</button>
</nav>
</body>
</html>

28
main.go Normal file
View file

@ -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
}
}

87
style.css Normal file
View file

@ -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;
}