Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

woop signature

node v10.24.1
version: 15.0.1
endpointsharetweet
var tonicExpress = require("@runkit/runkit/express-endpoint/1.0.0"); // Just provide the exports object to the tonicExpress helper var app = tonicExpress(module.exports); var bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({extended: true})); app.get("/", (req, res) => { res.send(` <html> <body> <div style="width:400px;padding:40px;font-family: Arial, Helvetica, sans-serif;margin:0 auto;border:1px solid #000;text-align:center;"> <img width="200" height="60" src="https://asset.woopit.fr/woop_logo.png"> <form action="/signature" method="post"> <p><label for="firstname" style="width:100px;display:inline-block;">Prénom</label> <input type="text" id="firstname" name="firstname" required minlength="4" size="25" required /></p> <p><label for="name" style="width:100px;display:inline-block;">Nom</label> <input type="text" id="name" name="name" required minlength="4" size="25" required /></p> <p><label for="email" style="width:100px;display:inline-block;">Email</label> <input type="text" id="email" name="email" required minlength="4" size="25" required /></p> <p><label for="tel" style="width:100px;display:inline-block;">Tel</label> <input type="text" id="tel" name="tel" value="+33.6." size="25" /></p> <p><label for="fonc" style="width:100px;display:inline-block;">Poste</label> <input type="text" id="fonc" name="fonc" required minlength="2" size="25" required /></p> <input type="submit" value="Envoyer" /> </form> </div> </body> </html> `); }); app.post("/signature", (req, res) => { const name = req.body.name; const firstname = req.body.firstname; const email = req.body.email; const fonc = req.body.fonc; const tel = req.body.tel; res.send(` <div style="padding:80px;"> <table cellpadding="0" cellspacing="0" border="0" style="background:none; border-width: 0px; border: 0px; margin: 0; padding: 0;"> <tr> <td style="width:25%; text-align: center; padding-top: 0; padding-bottom: 5px; padding-right: 20px; border-top: 0; border-bottom: 0; border-left: 0;border-right:5px solid #FFE000;"> <img width="200" height="60" src="https://asset.woopit.fr/woop_logo.png"> </td> <td style="min-width:75%; width: 350px; padding-top: 0; padding-bottom: 0; padding-left: 20px; padding-right: 20px;"> <p style="margin: 0px; font-size: 17px; font-family: Arial, Helvetica, sans-serif; font-weight:bold;">${firstname} <span style="text-transform: uppercase;">${name}</span></p> <p style="margin: 0px; font-size: 14px; font-family: Arial, Helvetica, sans-serif;font-weight:300;text-transform: uppercase;">${fonc}</p> <p style="margin: 0px; font-size: 12px; font-family: Arial, Helvetica, sans-serif;">${tel}</p> <p style="margin: 0px; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"><a style="color:#000;text-decoration:none!important;font-weight:bold;" href="mailto:${email}" target="_blank">${email}</a></p> <p style="margin: 0px; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"><a style="color:#000;text-decoration:none!important;font-weight:bold;" href="https://www.woopit.fr/" target="_blank">woopit.fr</a></p> <p style="margin: 0px;"><a style="color:#000;" href="https://www.linkedin.com/company/woopit/mycompany/" target="_blank"><img width="30px" height="30px" src="https://asset.woopit.fr/32x32-linkedin.png" /></a>&nbsp;&nbsp;<a style="color:#000;" href="https://www.facebook.com/WOOP-101457364954719/" target="_blank"><img width="30px" height="30px" src="https://asset.woopit.fr/32x32-facebook.png" /></a>&nbsp;&nbsp;<a style="color:#000;" href="https://twitter.com/letswoopit" target="_blank"><img width="30px" height="30px" src="https://asset.woopit.fr/32x32-twitter.png" /></a></p> </td> </tr> </table> <p style="margin:20px 0 0 0;"><a href="https://www.trophees.ecommercemag.fr/content/prix-du-public-votes" target="_blank"><img src="https://asset.woopit.fr/woop_signature-tropheev3.gif" /></a></p> </div> `); });
Loading…

no comments

    sign in to comment