From 5c9a45c261c1dbd560aed49b2356f4237264ac61 Mon Sep 17 00:00:00 2001 From: Keir Finlow-Bates Date: Sat, 17 Feb 2024 15:38:29 +0200 Subject: [PATCH] Include signup form --- .gitignore | 1 + public/assets/css/main.css | 14 ++--- public/index.html | 25 ++++++-- public/subscribed.html | 123 +++++++++++++++++++++++++++++++++++++ server.js | 22 +++++-- 5 files changed, 168 insertions(+), 17 deletions(-) create mode 100644 public/subscribed.html diff --git a/.gitignore b/.gitignore index 3502ef7..4004c95 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ yarn-debug.log* yarn-error.log* lerna-debug.log* .pnpm-debug.log* +database.txt # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/public/assets/css/main.css b/public/assets/css/main.css index 1e5259e..9acfa38 100644 --- a/public/assets/css/main.css +++ b/public/assets/css/main.css @@ -1828,7 +1828,7 @@ input, select, textarea { -webkit-appearance: none; -ms-appearance: none; appearance: none; - background: #f7f7f7; + background: #dddddd; border-radius: 0.35em; border: solid 2px transparent; color: inherit; @@ -2565,19 +2565,19 @@ input, select, textarea { -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out; -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out; transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out; - background-color: transparent; + background-color: #c49393; border-radius: 0.35em; - border: solid 3px #efefef; - color: #787878 !important; + border: solid 3px #c49393; + color: #e7e7e7 !important; cursor: pointer; display: inline-block; font-weight: 400; height: 3.15em; - height: calc(2.75em + 6px); + height: 2.75em; line-height: 2.75em; min-width: 10em; padding: 0 1.5em; - text-align: center; + text-align: top; text-decoration: none; white-space: nowrap; } @@ -2816,8 +2816,6 @@ input, select, textarea { #main > section { border-top: solid 2px #efefef; - margin: 4em 0 0 0; - padding: 4em 0 0 0; } #main > section:first-child { diff --git a/public/index.html b/public/index.html index 542a07e..d72122d 100644 --- a/public/index.html +++ b/public/index.html @@ -24,14 +24,31 @@
+ + +
+

Join my mailing list to receive notifications for promotions and new books.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

About Keir

I spend a lot of time researching and thinking about blockchain, often while walking through the Finnish woods. And then, every now and again, I find myself compelled to write a book about what I've discovered.

- -

@@ -51,7 +68,7 @@

Evil Tokenomics

Buy a copy: eBook, hardback or paperback

-

Ever wondered how crypto-scammers use tokenomics to manipulate us? Read this book, in which a fictional criminal mastermind explains how he fools both the buying public, project founders, and investors to steal your hard-earned cash using all sorts of psychological and economic tricks.

+

Ever wondered how crypto-scammers use tokenomics to manipulate us? Read this book, in which a fictional criminal mastermind explains how he fools both the buying public, project founders, and even investors to steal your hard-earned cash using all sorts of psychological and economic tricks.

How To Build A Brand On LinkedIn

@@ -69,7 +86,7 @@ -
+

The Merchandise

Prices shown are estimates and may differ depending on your shipping destination

diff --git a/public/subscribed.html b/public/subscribed.html new file mode 100644 index 0000000..0246b66 --- /dev/null +++ b/public/subscribed.html @@ -0,0 +1,123 @@ + + + + + Thinklair Publishing + + + + + + + + + + + +
+ + + +
+

Thank you for subscribing!

+
+ + +
+
+

About Keir

+
+

I spend a lot of time researching and thinking about blockchain, often while walking through the Finnish woods. And then, every now and again, I find myself compelled to write a book about what I've discovered.

+
+ + +
+
+

The Books

+
+ +
+
+

Move Over Brokers Here Comes The Blockchain

+ +

Buy a copy: eBook, hardback or paperback

+

BIBA award winner. An in-depth explanation of blockchain using simple analogies, this book covers everything from the technology that drives blockchain, through to economic, sociological and even philosophical examinations of why blockchain is significant.

+
+
+

Evil Tokenomics

+ +

Buy a copy: eBook, hardback or paperback

+

Ever wondered how crypto-scammers use tokenomics to manipulate us? Read this book, in which a fictional criminal mastermind explains how he fools both the buying public, project founders, and even investors to steal your hard-earned cash using all sorts of psychological and economic tricks.

+
+
+

How To Build A Brand On LinkedIn

+ +

Buy a copy: paperback or eBook

+

This is a cheap, short, and simple primer to improve your presence on social media, focussing on LinkedIn in particular. The book provides not just hints and tips on the algorithm, but also advice on how to write posts, articles, and record short videos.

+
+ +
+
+ + +
+
+

The Merchandise

+

Prices shown are estimates and may differ depending on your shipping destination

+
+ +
+
+

Move Over Brokers Clothing

+ + + +
+
+

Evil Tokenomics Clothing

+ +
+
+

The Orthoverse Clothing

+ +
+
+
+
+ + + + + + + + + + + + + diff --git a/server.js b/server.js index 7548d48..6d26b0b 100644 --- a/server.js +++ b/server.js @@ -1,16 +1,28 @@ const express = require("express") const fs = require('fs') +const bodyParser = require('body-parser') const app = express() const PORT = process.env.PORT || 8997 app.use(express.static("public")) -app.use(express.json()) +app.use(bodyParser.urlencoded({ extended: true })) -app.post('/', function requestHandler(req,res) { - fs.appendFile('./database.txt', req.body.toString() + "\n") - -} +app.post('/subscribe', (req, res) => { + const name = req.body.name + const email = req.body.email + fs.appendFile('./database.txt', name + ";" + email + "\n", (err) => { + if (err) { + console.log(err); + } + else { + // Get the file contents after the append operation + console.log("\nFile Contents of file after append:\n", + fs.readFileSync("./database.txt", "utf8")); + } + }) + res.redirect('/subscribed.html') +}) app.listen(PORT, () => { console.log(`Server is running on port ${PORT}`);