This is the main dovel repository, it has the Go code to run dovel SMTP server.
Author: blmayer (bleemayer@gmail.com)
Date: Mon Mar 20 23:11:03 2023 -0300
Parent: e680083
Added assets folder
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/Makefile b/Makefile
index 7d7b6cc..ed1753b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: clean deploy deploy-site
+.PHONY: clean deploy deploy-site deploy-assets deploy-pages
dovel: $(wildcard cmd/dovel/*.go interfaces/*/*.go config/*.go)
GOARCH=arm GOARM=6 go build -o $@ cmd/dovel/*.go
@@ -10,5 +10,8 @@ deploy: dovel
deploy-site: index.html
scp $^ zero:dovel.email/
-deploy-pages: $(wildcard www/*)
+deploy-assets: $(wildcard www/assets/*)
+ scp $^ zero:blmayer.dev/www/mail/assets/
+
+deploy-pages: $(wildcard www/*.*)
scp $^ zero:blmayer.dev/www/mail
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/cmd/dovel/main.go b/cmd/dovel/main.go
index 5afbd59..3c1b238 100644
--- a/cmd/dovel/main.go
+++ b/cmd/dovel/main.go
@@ -9,6 +9,7 @@ import (
"log"
"net/http"
"os"
+ "path"
"time"
"blmayer.dev/x/dovel/config"
@@ -89,6 +90,7 @@ func main() {
if hand.Templates != "" {
http.HandleFunc(hand.Domain+"/", mail.IndexHandler())
+ http.HandleFunc(hand.Domain+"/assets/", newAssetsHandler(hand.Templates))
http.HandleFunc(hand.Domain+"/out", mail.SendHandler(b))
}
@@ -122,3 +124,11 @@ func main() {
log.Fatal(err)
}
}
+
+func newAssetsHandler(root string) http.HandlerFunc {
+ return func(w http.ResponseWriter, r *http.Request) {
+ http.ServeFile(w, r, path.Join(root, r.URL.Path[1:]))
+ }
+}
+
+
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/assets/apple-touch-icon.png b/www/assets/apple-touch-icon.png
new file mode 100644
index 0000000..13b9018
Binary files /dev/null and b/www/assets/apple-touch-icon.png differ
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/assets/favicon-mobile.png b/www/assets/favicon-mobile.png
new file mode 100644
index 0000000..de112e2
Binary files /dev/null and b/www/assets/favicon-mobile.png differ
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/assets/favicon.ico b/www/assets/favicon.ico
new file mode 100644
index 0000000..2e1f8df
Binary files /dev/null and b/www/assets/favicon.ico differ
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/assets/icon.png b/www/assets/icon.png
new file mode 100644
index 0000000..2798922
Binary files /dev/null and b/www/assets/icon.png differ
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/assets/manifest.json b/www/assets/manifest.json
new file mode 100644
index 0000000..2cd1a87
--- /dev/null
+++ b/www/assets/manifest.json
@@ -0,0 +1,13 @@
+{
+ "short_name": "dovel",
+ "name": "Dovel",
+ "icons": [
+ {
+ "src": "/assets/icon.png",
+ "type": "image/png",
+ "sizes": "512x512"
+ }
+ ],
+ "start_url": "../index.html",
+ "display": "standalone"
+}
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/head.html b/www/head.html
index d041738..567e3b7 100644
--- a/www/head.html
+++ b/www/head.html
@@ -1,4 +1,4 @@
<title>dovel</title>
-<link rel=icon href=/favicon.ico>
+<link rel=icon href=/assets/favicon.ico>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
{{template "style-min.html"}}
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/index.html b/www/index.html
index 8f8faf3..eccf355 100644
--- a/www/index.html
+++ b/www/index.html
@@ -1,6 +1,8 @@
+<!DOCTYPE html>
+<html>
<head>
{{template "head.html"}}
- <link rel="manifest" href="/manifest.json">
+ <link rel="manifest" href="/assets/manifest.json">
</head>
<body>
@@ -16,3 +18,4 @@
<br>
{{end}}
</body>
+</html>
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/manifest.json b/www/manifest.json
deleted file mode 100644
index f81bda4..0000000
--- a/www/manifest.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "short_name": "dovel",
- "name": "Dovel",
- "icons": [
- {
- "src": "/icon.png",
- "type": "image/png",
- "sizes": "200x200"
- }
- ],
- "start_url": "index.html",
- "display": "standalone",
- "theme_color": "white",
- "background_color": "white"
-}
commit dddc52e2b2f7f4841f5398a6b7192f0d57b059bc
Author: blmayer <bleemayer@gmail.com>
Date: Mon Mar 20 23:11:03 2023 -0300
Added assets folder
diff --git a/www/style-min.html b/www/style-min.html
index 6d9df80..7ca9016 100644
--- a/www/style-min.html
+++ b/www/style-min.html
@@ -1,8 +1,8 @@
<style>
body {
- max-width: 800;
+ max-width: 800px;
padding: 0 20px;
- margin: 50 auto;
+ margin: 50px auto;
font-family: sans-serif;
}
a {
@@ -22,7 +22,7 @@
}
label {
display: inline-block;
- min-width: 80;
+ min-width: 80px;
}
pre {
white-space: pre-wrap;