From 1d3574d38909bc9aae2792d839023e296fb25791 Mon Sep 17 00:00:00 2001
From: Mark Powers
Date: Thu, 23 Dec 2021 16:50:42 -0600
Subject: Add email unsubcribe link, update about me, add hello.js
---
src/html/admin.html | 13 +++++++++-
src/html/email-confirm.html | 23 ++++++++++++++++++
src/html/email-success.html | 2 +-
src/html/email-unsubscribe.html | 23 ++++++++++++++++++
src/index.js | 8 ++++--
src/js/hello.js | 6 +++++
src/server.js | 23 +++++++++++++++---
src/templates/about.html | 54 ++++++++++++++++++++++++++++++++---------
src/templates/blog-single.html | 3 ++-
src/templates/blog.html | 2 +-
src/templates/bread.html | 2 +-
src/templates/index.html | 1 +
src/templates/projects.html | 2 +-
src/templates/tags.html | 2 +-
14 files changed, 141 insertions(+), 23 deletions(-)
create mode 100644 src/html/email-confirm.html
create mode 100644 src/html/email-unsubscribe.html
create mode 100644 src/js/hello.js
diff --git a/src/html/admin.html b/src/html/admin.html
index 29e4b87..d15598a 100644
--- a/src/html/admin.html
+++ b/src/html/admin.html
@@ -18,7 +18,7 @@
showSessionTable: false,
showUrlTable: false,
showLogData: false,
- showEmailData: false,
+ showEmailData: true,
},
created() {
fetch(new Request('/admin/stats')).then(response => response.json())
@@ -28,6 +28,15 @@
}
});
}
+ function delete_email(id, name){
+ if (confirm(`Delete ${name}?`)) {
+ let path = `/admin/email/${id}`
+ fetch(new Request(path, {
+ method: 'delete',
+ })).then(response => response.json())
+ .then(response => this.emails = response);
+ }
+ }
@@ -130,10 +139,12 @@
Name
Address
+
diff --git a/src/html/email-confirm.html b/src/html/email-confirm.html
new file mode 100644
index 0000000..b0ee130
--- /dev/null
+++ b/src/html/email-confirm.html
@@ -0,0 +1,23 @@
+
+
+
+
+ {{item.name}}
{{item.address}}
+
+ <
+ Unsubcribe?
+
+ Click to unsubscribe!
+ Success, thank you!
+ Success, thank you!
diff --git a/src/html/email-unsubscribe.html b/src/html/email-unsubscribe.html new file mode 100644 index 0000000..37acf97 --- /dev/null +++ b/src/html/email-unsubscribe.html @@ -0,0 +1,23 @@ + + + +
+
+ + + + + + +
+ +