diff options
author | Mark Powers <mark@marks.kitchen> | 2021-12-23 16:50:42 -0600 |
---|---|---|
committer | Mark Powers <mark@marks.kitchen> | 2021-12-23 16:50:42 -0600 |
commit | 1d3574d38909bc9aae2792d839023e296fb25791 (patch) | |
tree | c409fbff38083b85356498f636714e6ec74f95e4 /src/html | |
parent | 85a103d6a02a50ce28cbb44c2e693000d9b7388d (diff) |
Add email unsubcribe link, update about me, add hello.js
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/admin.html | 13 | ||||
-rw-r--r-- | src/html/email-confirm.html | 23 | ||||
-rw-r--r-- | src/html/email-success.html | 2 | ||||
-rw-r--r-- | src/html/email-unsubscribe.html | 23 |
4 files changed, 59 insertions, 2 deletions
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); + } + } </script> </head> @@ -130,10 +139,12 @@ <tr> <th>Name</th> <th>Address</th> + <th></th> </tr> <tr v-for="item in emails"> <td>{{item.name}}</td> <td>{{item.address}}</td> + <td><button v-on:click="delete_email(item.id, item.name)">X</button></td> </tr> </table> </div> 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 @@ +<!doctype html> +<html lang="en"> + +<head> + <title>Mark's Kitchen - Email</title> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <link rel="stylesheet" type="text/css" href="/css/styles.css"> + <meta name="description" content="Email unsubscrube"> +</head> + +<body> + <div> + <h1> + <a class="navigation" href="/" title="marks.kitchen"><</a> + Unsubcribe? + </h1> + <a href="confirm">Click to unsubscribe!</a> + </div> + </div> +</body> + +</html> diff --git a/src/html/email-success.html b/src/html/email-success.html index 65bc2e5..11350df 100644 --- a/src/html/email-success.html +++ b/src/html/email-success.html @@ -15,7 +15,7 @@ <a class="navigation" href="/" title="marks.kitchen"><</a> Email </h1> - <h2 id="status" v-if='show'>Success, thank you!</h2> + <h2 id="status">Success, thank you!</h2> </div> </div> </body> 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 @@ +<!doctype html> +<html lang="en"> + +<head> + <title>Mark's Kitchen - Email</title> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <link rel="stylesheet" type="text/css" href="/css/styles.css"> + <meta name="description" content="Email unsubscrube"> +</head> + +<body> + <div> + <h1> + <a class="navigation" href="/" title="marks.kitchen"><</a> + Email + </h1> + <h2 id="status">You are now unsubscribed!</h2> + </div> + </div> +</body> + +</html> |