Import of glitchdotcom/glitch-hello-node
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
{"name":"drag-in-files.svg","date":"2016-10-22T16:17:49.954Z","url":"https://cdn.hyperdev.com/drag-in-files.svg","type":"image/svg","size":7646,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/drag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(102, 153, 205)","uuid":"adSBq97hhhpFNUna"}
|
||||
{"name":"click-me.svg","date":"2016-10-23T16:17:49.954Z","url":"https://cdn.hyperdev.com/click-me.svg","type":"image/svg","size":7116,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/click-me.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(243, 185, 186)","uuid":"adSBq97hhhpFNUnb"}
|
||||
{"name":"paste-me.svg","date":"2016-10-24T16:17:49.954Z","url":"https://cdn.hyperdev.com/paste-me.svg","type":"image/svg","size":7242,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/paste-me.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(42, 179, 185)","uuid":"adSBq97hhhpFNUnc"}
|
||||
{"uuid":"adSBq97hhhpFNUna","deleted":true}
|
||||
{"uuid":"adSBq97hhhpFNUnb","deleted":true}
|
||||
{"uuid":"adSBq97hhhpFNUnc","deleted":true}
|
||||
{"name":"1afb28a109f3e4b3488c905ac0931396.gif","date":"2020-12-16T21:14:34.041Z","url":"https://cdn.glitch.com/c62efef6-1e75-45cf-b248-afeccdda9477%2F1afb28a109f3e4b3488c905ac0931396.gif","type":"image/gif","size":724397,"imageWidth":500,"imageHeight":375,"thumbnail":"https://cdn.glitch.com/c62efef6-1e75-45cf-b248-afeccdda9477%2Fthumbnails%2F1afb28a109f3e4b3488c905ac0931396.gif","thumbnailWidth":330,"thumbnailHeight":248,"uuid":"QaAYwTfpsElJhAB2"}
|
||||
{"name":"lol.jpg","date":"2020-12-16T21:15:05.669Z","url":"https://cdn.glitch.com/c62efef6-1e75-45cf-b248-afeccdda9477%2Flol.jpg","type":"image/jpeg","size":73344,"imageWidth":1280,"imageHeight":720,"thumbnail":"https://cdn.glitch.com/c62efef6-1e75-45cf-b248-afeccdda9477%2Fthumbnails%2Flol.jpg","thumbnailWidth":330,"thumbnailHeight":186,"uuid":"K9o2bgos9Lchb0Xo"}
|
||||
{"uuid":"K9o2bgos9Lchb0Xo","deleted":true}
|
||||
{"name":"lol.jpg","date":"2020-12-16T21:15:50.488Z","url":"https://cdn.glitch.com/c62efef6-1e75-45cf-b248-afeccdda9477%2Flol.jpg","type":"image/jpeg","size":26103,"imageWidth":271,"imageHeight":203,"thumbnail":"https://cdn.glitch.com/c62efef6-1e75-45cf-b248-afeccdda9477%2Flol.jpg","thumbnailWidth":271,"thumbnailHeight":203,"uuid":"wmys9BcFp5jykKCT"}
|
||||
{"uuid":"QaAYwTfpsElJhAB2","deleted":true}
|
||||
{"uuid":"wmys9BcFp5jykKCT","deleted":true}
|
||||
@@ -1 +0,0 @@
|
||||
{"appType":"node","buildDirectory":null}
|
||||
@@ -1,34 +1,30 @@
|
||||
# hello-express
|
||||
# Hello Node
|
||||
|
||||
A server that serves a webpage, its resources, and some data
|
||||
[Node.js](https://nodejs.org/en/about/) is a popular runtime that lets you run JavaScript on the server instead of in a browser. This project uses the [Fastify](https://www.fastify.io/) framework to explore basic templating with [Handlebars](https://handlebarsjs.com/) and submitting data using forms and querystrings.
|
||||
|
||||
## What's in this project?
|
||||
|
||||
## Your Project
|
||||
← `README.md`: That’s this file, where you can tell people what your cool website does and how you built it.
|
||||
|
||||
On the front-end,
|
||||
← `public/style.css`: The styling rules for your pages and posts.
|
||||
|
||||
- Edit `views/index.html` to change the content of the webpage
|
||||
- `public/client.js` is the javacript that runs when you load the webpage
|
||||
- `public/style.css` is the styles for `views/index.html`
|
||||
- Drag in `assets`, like images or music, to add them to your project
|
||||
← `server.js`: The main server script for your new site.
|
||||
|
||||
On the back-end,
|
||||
← `src/`: This folder holds the main template for your site along with some basic data files.
|
||||
|
||||
- your app starts at `server.js`
|
||||
- add frameworks and packages in `package.json`
|
||||
- safely store app secrets in `.env` (nobody can see this but you and people you invite)
|
||||
### Working in the `src/` folder 📁
|
||||
|
||||
Click `Show` in the header to see your app live. Updates to your code will instantly deploy.
|
||||
← `src/pages/index.hbs`: This is the main page template for your site.
|
||||
|
||||
← `src/colors.json`: A collection of CSS color names. We use this to pick a random color, and to match searches against color names.
|
||||
|
||||
## Made by [Glitch](https://glitch.com/)
|
||||
← `src/seo.json`: When you're ready to share your new site or add a custom domain, change SEO/meta settings in here.
|
||||
|
||||
**Glitch** is the friendly community where you'll build the app of your dreams. Glitch lets you instantly create, remix, edit, and host an app, bot or site, and you can invite collaborators or helpers to simultaneously edit code with you.
|
||||

|
||||
|
||||
Find out more [about Glitch](https://glitch.com/about).
|
||||
## You built this with Glitch!
|
||||
|
||||
( ᵔ ᴥ ᵔ )
|
||||
[Glitch](https://glitch.com) is a friendly community where millions of people come together to build web apps and websites.
|
||||
|
||||
|
||||
## WIP / Scratch
|
||||
- Should use the glitch API to grab information about username
|
||||
- Need more help? [Check out our Help Center](https://help.glitch.com/) for answers to any common questions.
|
||||
- Ready to make it official? [Become a paid Glitch member](https://glitch.com/pricing) to boost your app with private sharing, more storage and memory, domains and more.
|
||||
|
||||
Generated
+589
-893
File diff suppressed because it is too large
Load Diff
+6
-4
@@ -7,15 +7,17 @@
|
||||
"start": "node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.17.1",
|
||||
"fastify": "^3.14.0",
|
||||
"fastify-static": "^4.0.0"
|
||||
"fastify-formbody": "^5.0.0",
|
||||
"fastify-static": "^4.0.0",
|
||||
"handlebars": "^4.7.7",
|
||||
"point-of-view": "^4.14.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "12.x"
|
||||
},
|
||||
"repository": {
|
||||
"url": "https://glitch.com/edit/#!/hello-node"
|
||||
"url": "https://glitch.com/edit/#!/glitch-hello-node"
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -23,4 +25,4 @@
|
||||
"glitch",
|
||||
"express"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Hello World!</title>
|
||||
|
||||
<!-- import the webpage's stylesheet -->
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- import the webpage's javascript file -->
|
||||
<script src="/script.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<span class="title">Hey, Node!</span>
|
||||
<img
|
||||
src="illustration.svg"
|
||||
class="illustration"
|
||||
alt="Javascript logo"
|
||||
/>
|
||||
<div><!-- helloooo --></div>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="navigation">
|
||||
<a
|
||||
href="https://glitch.com/edit/#!/remix/glitch-hello-node"
|
||||
class="btn--remix"
|
||||
>
|
||||
<img
|
||||
src="https://cdn.glitch.com/a9975ea6-8949-4bab-addb-8a95021dc2da%2FLogo_Color.svg?v=1602781328576"
|
||||
/>
|
||||
Remix on Glitch
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<!-- include the Glitch button to show what the webpage is about and
|
||||
to make it easier for folks to view source and remix -->
|
||||
<div class="glitchButton" style="position:fixed;top:20px;right:20px;"></div>
|
||||
<script src="https://button.glitch.me/button.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +0,0 @@
|
||||
// client-side js, loaded by index.html
|
||||
// run by the browser each time the page is loaded
|
||||
|
||||
console.log("hello world :o");
|
||||
|
||||
// fetch the initial list of dreams
|
||||
fetch("/api/flavors")
|
||||
.then(response => response.json()) // parse the JSON from the server
|
||||
.then(dreams => {
|
||||
return [];
|
||||
});
|
||||
+4
-4
@@ -122,7 +122,7 @@ body {
|
||||
margin-top: var(--image-margin);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Add hover state to the buttons!! oops
|
||||
*/
|
||||
/* our custom color indicator */
|
||||
div.color-info {
|
||||
color: #ffffff;
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
const path = require("path");
|
||||
const flavors = require("./src/api/flavors");
|
||||
|
||||
// Require the framework and instantiate it
|
||||
const fastify = require("fastify")({
|
||||
@@ -12,13 +11,60 @@ fastify.register(require("fastify-static"), {
|
||||
prefix: "/" // optional: default '/'
|
||||
});
|
||||
|
||||
// Our home page route, this pulls from public/index.html
|
||||
// but you don't have to send a html, or even have a webpage!
|
||||
fastify.get("/", function(request, reply) {
|
||||
return reply.sendFile("index.html");
|
||||
// fastify-formbody lets us parse incoming forms
|
||||
fastify.register(require("fastify-formbody"));
|
||||
|
||||
// point-of-view is a templating manager for fastify
|
||||
fastify.register(require("point-of-view"), {
|
||||
engine: {
|
||||
handlebars: require("handlebars")
|
||||
}
|
||||
});
|
||||
|
||||
fastify.get("/api/flavors", flavors);
|
||||
// load and parse SEO data
|
||||
const seo = require("./src/seo.json");
|
||||
if (seo.url === "glitch-default") {
|
||||
seo.url = `https://${process.env.PROJECT_DOMAIN}.glitch.me`;
|
||||
}
|
||||
|
||||
// Our home page route, this pulls from src/pages/index.hbs
|
||||
fastify.get("/", function(request, reply) {
|
||||
let params = { seo: seo };
|
||||
if (request.query.randomize) {
|
||||
const colors = require("./src/colors.json");
|
||||
const allColors = Object.keys(colors);
|
||||
let currentColor = allColors[(allColors.length * Math.random()) << 0];
|
||||
params = {
|
||||
color: colors[currentColor],
|
||||
colorError: null,
|
||||
seo: seo
|
||||
};
|
||||
}
|
||||
reply.view("/src/pages/index.hbs", params);
|
||||
});
|
||||
|
||||
// A route to handle form submissions and output the main page with custom colors
|
||||
fastify.post("/", function(request, reply) {
|
||||
let params = { seo: seo };
|
||||
let color = request.body.color;
|
||||
if (color) {
|
||||
const colors = require("./src/colors.json");
|
||||
color = color.toLowerCase().replace(/\s/g, "");
|
||||
if (colors[color]) {
|
||||
params = {
|
||||
color: colors[color],
|
||||
colorError: null,
|
||||
seo: seo
|
||||
};
|
||||
} else {
|
||||
params = {
|
||||
colorError: request.body.color,
|
||||
seo: seo
|
||||
};
|
||||
}
|
||||
}
|
||||
reply.view("/src/pages/index.hbs", params);
|
||||
});
|
||||
|
||||
// Run the server and report out to the logs
|
||||
fastify.listen(process.env.PORT, function(err, address) {
|
||||
|
||||
+55
-241
@@ -1,7 +1,9 @@
|
||||
dependencies:
|
||||
express: 4.17.1
|
||||
fastify: 3.14.1
|
||||
fastify-formbody: 5.0.0
|
||||
fastify-static: 4.0.1
|
||||
handlebars: 4.7.7
|
||||
point-of-view: 4.14.0
|
||||
packages:
|
||||
/@fastify/forwarded/1.0.0:
|
||||
dev: false
|
||||
@@ -20,15 +22,6 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==
|
||||
/accepts/1.3.7:
|
||||
dependencies:
|
||||
mime-types: 2.1.25
|
||||
negotiator: 0.6.2
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
|
||||
/ajv/6.12.6:
|
||||
dependencies:
|
||||
fast-deep-equal: 3.1.3
|
||||
@@ -42,10 +35,6 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=
|
||||
/array-flatten/1.1.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
|
||||
/atomic-sleep/1.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
@@ -65,23 +54,6 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
||||
/body-parser/1.19.0:
|
||||
dependencies:
|
||||
bytes: 3.1.0
|
||||
content-type: 1.0.4
|
||||
debug: 2.6.9
|
||||
depd: 1.1.2
|
||||
http-errors: 1.7.2
|
||||
iconv-lite: 0.4.24
|
||||
on-finished: 2.3.0
|
||||
qs: 6.7.0
|
||||
raw-body: 2.4.0
|
||||
type-is: 1.6.18
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==
|
||||
/brace-expansion/1.1.11:
|
||||
dependencies:
|
||||
balanced-match: 1.0.0
|
||||
@@ -89,12 +61,6 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
/bytes/3.1.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
|
||||
/concat-map/0.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -107,22 +73,6 @@ packages:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
|
||||
/content-type/1.0.4:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
|
||||
/cookie-signature/1.0.6:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
|
||||
/cookie/0.4.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
|
||||
/cookie/0.4.1:
|
||||
dev: false
|
||||
engines:
|
||||
@@ -179,43 +129,6 @@ packages:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
|
||||
/express/4.17.1:
|
||||
dependencies:
|
||||
accepts: 1.3.7
|
||||
array-flatten: 1.1.1
|
||||
body-parser: 1.19.0
|
||||
content-disposition: 0.5.3
|
||||
content-type: 1.0.4
|
||||
cookie: 0.4.0
|
||||
cookie-signature: 1.0.6
|
||||
debug: 2.6.9
|
||||
depd: 1.1.2
|
||||
encodeurl: 1.0.2
|
||||
escape-html: 1.0.3
|
||||
etag: 1.8.1
|
||||
finalhandler: 1.1.2
|
||||
fresh: 0.5.2
|
||||
merge-descriptors: 1.0.1
|
||||
methods: 1.1.2
|
||||
on-finished: 2.3.0
|
||||
parseurl: 1.3.3
|
||||
path-to-regexp: 0.1.7
|
||||
proxy-addr: 2.0.5
|
||||
qs: 6.7.0
|
||||
range-parser: 1.2.1
|
||||
safe-buffer: 5.1.2
|
||||
send: 0.17.1
|
||||
serve-static: 1.14.1
|
||||
setprototypeof: 1.1.1
|
||||
statuses: 1.5.0
|
||||
type-is: 1.6.18
|
||||
utils-merge: 1.0.1
|
||||
vary: 1.1.2
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.10.0'
|
||||
resolution:
|
||||
integrity: sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==
|
||||
/fast-decode-uri-component/1.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -253,6 +166,18 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-Jm2LMTB5rsJqlS1+cmgqqM9tTs0UrlgYR7TvDT3ZgXsUI5ib1NjQlqZHf+tDK5tVPdFGwyq02wAoJtyYIRSiFA==
|
||||
/fastify-formbody/5.0.0:
|
||||
dependencies:
|
||||
fastify-plugin: 2.3.4
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-W79/hq6xGyV4lFsgt+qgKHPorGu4RzAhFQ5GKXI0T8DbkEMx+7gjFAD2y+q194vMMiIvMhuE7j6JyCEZVMOHYw==
|
||||
/fastify-plugin/2.3.4:
|
||||
dependencies:
|
||||
semver: 7.3.5
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-I+Oaj6p9oiRozbam30sh39BiuiqBda7yK2nmSPVwDCfIBlKnT8YB3MY+pRQc2Fcd07bf6KPGklHJaQ2Qu81TYQ==
|
||||
/fastify-plugin/3.0.0:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -300,20 +225,6 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==
|
||||
/finalhandler/1.1.2:
|
||||
dependencies:
|
||||
debug: 2.6.9
|
||||
encodeurl: 1.0.2
|
||||
escape-html: 1.0.3
|
||||
on-finished: 2.3.0
|
||||
parseurl: 1.3.3
|
||||
statuses: 1.5.0
|
||||
unpipe: 1.0.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==
|
||||
/find-my-way/4.1.0:
|
||||
dependencies:
|
||||
fast-decode-uri-component: 1.0.1
|
||||
@@ -329,12 +240,6 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==
|
||||
/forwarded/0.1.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
|
||||
/fresh/0.5.2:
|
||||
dev: false
|
||||
engines:
|
||||
@@ -356,18 +261,24 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
|
||||
/http-errors/1.7.2:
|
||||
/handlebars/4.7.7:
|
||||
dependencies:
|
||||
depd: 1.1.2
|
||||
inherits: 2.0.3
|
||||
setprototypeof: 1.1.1
|
||||
statuses: 1.5.0
|
||||
toidentifier: 1.0.0
|
||||
minimist: 1.2.5
|
||||
neo-async: 2.6.2
|
||||
source-map: 0.6.1
|
||||
wordwrap: 1.0.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
node: '>=0.4.7'
|
||||
hasBin: true
|
||||
optionalDependencies:
|
||||
uglify-js: 3.13.3
|
||||
resolution:
|
||||
integrity: sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==
|
||||
integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==
|
||||
/hashlru/2.3.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-0cMsjjIC8I+D3M44pOQdsy0OHXGLVz6Z0beRuufhKa0KfaD2wGwAev6jILzXsd3/vpnNQJmWyZtIILqM1N+n5A==
|
||||
/http-errors/1.7.3:
|
||||
dependencies:
|
||||
depd: 1.1.2
|
||||
@@ -380,14 +291,6 @@ packages:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
|
||||
/iconv-lite/0.4.24:
|
||||
dependencies:
|
||||
safer-buffer: 2.1.2
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
||||
/inflight/1.0.6:
|
||||
dependencies:
|
||||
once: 1.4.0
|
||||
@@ -395,20 +298,10 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
|
||||
/inherits/2.0.3:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
|
||||
/inherits/2.0.4:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
/ipaddr.js/1.9.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.10'
|
||||
resolution:
|
||||
integrity: sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==
|
||||
/ipaddr.js/2.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
@@ -437,36 +330,6 @@ packages:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
|
||||
/media-typer/0.3.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
|
||||
/merge-descriptors/1.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
|
||||
/methods/1.1.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
|
||||
/mime-db/1.42.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==
|
||||
/mime-types/2.1.25:
|
||||
dependencies:
|
||||
mime-db: 1.42.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==
|
||||
/mime/1.6.0:
|
||||
dev: false
|
||||
engines:
|
||||
@@ -480,6 +343,10 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
|
||||
/minimist/1.2.5:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||
/ms/2.0.0:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -492,12 +359,10 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
/negotiator/0.6.2:
|
||||
/neo-async/2.6.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
|
||||
integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
|
||||
/on-finished/2.3.0:
|
||||
dependencies:
|
||||
ee-first: 1.1.1
|
||||
@@ -512,22 +377,12 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||
/parseurl/1.3.3:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
|
||||
/path-is-absolute/1.0.1:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
|
||||
/path-to-regexp/0.1.7:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
|
||||
/pino-std-serializers/3.2.0:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -544,27 +399,19 @@ packages:
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-bmzxwbrIPxQUlAuMkF4PWVErUGERU4z37HazlhflKFg08crsNE3fACGN6gPwg5xtKOK47Ux5cZm8YCuLV4wWJg==
|
||||
/proxy-addr/2.0.5:
|
||||
/point-of-view/4.14.0:
|
||||
dependencies:
|
||||
forwarded: 0.1.2
|
||||
ipaddr.js: 1.9.0
|
||||
fastify-plugin: 3.0.0
|
||||
hashlru: 2.3.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.10'
|
||||
resolution:
|
||||
integrity: sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==
|
||||
integrity: sha512-NaWn3oqCWnRj4SvKtYBAwWf2MI1d9/rY5wF93PAdnYq4AzdLqi/IAwTHTf1+Ul3Toi2JMqg6caSCd+eQnwqT3Q==
|
||||
/punycode/2.1.1:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
|
||||
/qs/6.7.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.6'
|
||||
resolution:
|
||||
integrity: sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
|
||||
/queue-microtask/1.2.3:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -579,17 +426,6 @@ packages:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
|
||||
/raw-body/2.4.0:
|
||||
dependencies:
|
||||
bytes: 3.1.0
|
||||
http-errors: 1.7.2
|
||||
iconv-lite: 0.4.24
|
||||
unpipe: 1.0.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==
|
||||
/readable-stream/3.6.0:
|
||||
dependencies:
|
||||
inherits: 2.0.4
|
||||
@@ -631,10 +467,6 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ==
|
||||
/safer-buffer/2.1.2:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
/secure-json-parse/2.3.2:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -672,17 +504,6 @@ packages:
|
||||
node: '>= 0.8.0'
|
||||
resolution:
|
||||
integrity: sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==
|
||||
/serve-static/1.14.1:
|
||||
dependencies:
|
||||
encodeurl: 1.0.2
|
||||
escape-html: 1.0.3
|
||||
parseurl: 1.3.3
|
||||
send: 0.17.1
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8.0'
|
||||
resolution:
|
||||
integrity: sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==
|
||||
/set-cookie-parser/2.4.8:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -698,6 +519,12 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==
|
||||
/source-map/0.6.1:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
/statuses/1.5.0:
|
||||
dev: false
|
||||
engines:
|
||||
@@ -726,21 +553,14 @@ packages:
|
||||
node: '>=0.6'
|
||||
resolution:
|
||||
integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
|
||||
/type-is/1.6.18:
|
||||
dependencies:
|
||||
media-typer: 0.3.0
|
||||
mime-types: 2.1.25
|
||||
/uglify-js/3.13.3:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
node: '>=0.8.0'
|
||||
hasBin: true
|
||||
optional: true
|
||||
resolution:
|
||||
integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
|
||||
/unpipe/1.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
|
||||
integrity: sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==
|
||||
/uri-js/4.4.1:
|
||||
dependencies:
|
||||
punycode: 2.1.1
|
||||
@@ -751,18 +571,10 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||
/utils-merge/1.0.1:
|
||||
/wordwrap/1.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.4.0'
|
||||
resolution:
|
||||
integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
|
||||
/vary/1.1.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
|
||||
integrity: sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
|
||||
/wrappy/1.0.2:
|
||||
dev: false
|
||||
resolution:
|
||||
@@ -775,6 +587,8 @@ registry: 'https://registry.npmjs.org/'
|
||||
shrinkwrapMinorVersion: 9
|
||||
shrinkwrapVersion: 3
|
||||
specifiers:
|
||||
express: ^4.17.1
|
||||
fastify: ^3.14.0
|
||||
fastify-formbody: ^5.0.0
|
||||
fastify-static: ^4.0.0
|
||||
handlebars: ^4.7.7
|
||||
point-of-view: ^4.14.0
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
const flavors = (request, reply) => {
|
||||
reply("chocolate");
|
||||
}
|
||||
|
||||
module.exports = flavors;
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
{
|
||||
"aliceblue": "#f0f8ff",
|
||||
"antiquewhite": "#faebd7",
|
||||
"aqua": "#00ffff",
|
||||
"aquamarine": "#7fffd4",
|
||||
"azure": "#f0ffff",
|
||||
"beige": "#f5f5dc",
|
||||
"bisque": "#ffe4c4",
|
||||
"black": "#000000",
|
||||
"blanchedalmond": "#ffebcd",
|
||||
"blue": "#0000ff",
|
||||
"blueviolet": "#8a2be2",
|
||||
"brown": "#a52a2a",
|
||||
"burlywood": "#deb887",
|
||||
"cadetblue": "#5f9ea0",
|
||||
"chartreuse": "#7fff00",
|
||||
"chocolate": "#d2691e",
|
||||
"coral": "#ff7f50",
|
||||
"cornflowerblue": "#6495ed",
|
||||
"cornsilk": "#fff8dc",
|
||||
"crimson": "#dc143c",
|
||||
"cyan": "#00ffff",
|
||||
"darkblue": "#00008b",
|
||||
"darkcyan": "#008b8b",
|
||||
"darkgoldenrod": "#b8860b",
|
||||
"darkgray": "#a9a9a9",
|
||||
"darkgreen": "#006400",
|
||||
"darkgrey": "#a9a9a9",
|
||||
"darkkhaki": "#bdb76b",
|
||||
"darkmagenta": "#8b008b",
|
||||
"darkolivegreen": "#556b2f",
|
||||
"darkorange": "#ff8c00",
|
||||
"darkorchid": "#9932cc",
|
||||
"darkred": "#8b0000",
|
||||
"darksalmon": "#e9967a",
|
||||
"darkseagreen": "#8fbc8f",
|
||||
"darkslateblue": "#483d8b",
|
||||
"darkslategray": "#2f4f4f",
|
||||
"darkslategrey": "#2f4f4f",
|
||||
"darkturquoise": "#00ced1",
|
||||
"darkviolet": "#9400d3",
|
||||
"deeppink": "#ff1493",
|
||||
"deepskyblue": "#00bfff",
|
||||
"dimgray": "#696969",
|
||||
"dimgrey": "#696969",
|
||||
"dodgerblue": "#1e90ff",
|
||||
"firebrick": "#b22222",
|
||||
"floralwhite": "#fffaf0",
|
||||
"forestgreen": "#228b22",
|
||||
"fuchsia": "#ff00ff",
|
||||
"gainsboro": "#dcdcdc",
|
||||
"ghostwhite": "#f8f8ff",
|
||||
"goldenrod": "#daa520",
|
||||
"gold": "#ffd700",
|
||||
"gray": "#808080",
|
||||
"green": "#008000",
|
||||
"greenyellow": "#adff2f",
|
||||
"grey": "#808080",
|
||||
"honeydew": "#f0fff0",
|
||||
"hotpink": "#ff69b4",
|
||||
"indianred": "#cd5c5c",
|
||||
"indigo": "#4b0082",
|
||||
"ivory": "#fffff0",
|
||||
"khaki": "#f0e68c",
|
||||
"lavenderblush": "#fff0f5",
|
||||
"lavender": "#e6e6fa",
|
||||
"lawngreen": "#7cfc00",
|
||||
"lemonchiffon": "#fffacd",
|
||||
"lightblue": "#add8e6",
|
||||
"lightcoral": "#f08080",
|
||||
"lightcyan": "#e0ffff",
|
||||
"lightgoldenrodyellow": "#fafad2",
|
||||
"lightgray": "#d3d3d3",
|
||||
"lightgreen": "#90ee90",
|
||||
"lightgrey": "#d3d3d3",
|
||||
"lightpink": "#ffb6c1",
|
||||
"lightsalmon": "#ffa07a",
|
||||
"lightseagreen": "#20b2aa",
|
||||
"lightskyblue": "#87cefa",
|
||||
"lightslategray": "#778899",
|
||||
"lightslategrey": "#778899",
|
||||
"lightsteelblue": "#b0c4de",
|
||||
"lightyellow": "#ffffe0",
|
||||
"lime": "#00ff00",
|
||||
"limegreen": "#32cd32",
|
||||
"linen": "#faf0e6",
|
||||
"magenta": "#ff00ff",
|
||||
"maroon": "#800000",
|
||||
"mediumaquamarine": "#66cdaa",
|
||||
"mediumblue": "#0000cd",
|
||||
"mediumorchid": "#ba55d3",
|
||||
"mediumpurple": "#9370db",
|
||||
"mediumseagreen": "#3cb371",
|
||||
"mediumslateblue": "#7b68ee",
|
||||
"mediumspringgreen": "#00fa9a",
|
||||
"mediumturquoise": "#48d1cc",
|
||||
"mediumvioletred": "#c71585",
|
||||
"midnightblue": "#191970",
|
||||
"mintcream": "#f5fffa",
|
||||
"mistyrose": "#ffe4e1",
|
||||
"moccasin": "#ffe4b5",
|
||||
"navajowhite": "#ffdead",
|
||||
"navy": "#000080",
|
||||
"oldlace": "#fdf5e6",
|
||||
"olive": "#808000",
|
||||
"olivedrab": "#6b8e23",
|
||||
"orange": "#ffa500",
|
||||
"orangered": "#ff4500",
|
||||
"orchid": "#da70d6",
|
||||
"palegoldenrod": "#eee8aa",
|
||||
"palegreen": "#98fb98",
|
||||
"paleturquoise": "#afeeee",
|
||||
"palevioletred": "#db7093",
|
||||
"papayawhip": "#ffefd5",
|
||||
"peachpuff": "#ffdab9",
|
||||
"peru": "#cd853f",
|
||||
"pink": "#ffc0cb",
|
||||
"plum": "#dda0dd",
|
||||
"powderblue": "#b0e0e6",
|
||||
"purple": "#800080",
|
||||
"rebeccapurple": "#663399",
|
||||
"red": "#ff0000",
|
||||
"rosybrown": "#bc8f8f",
|
||||
"royalblue": "#4169e1",
|
||||
"saddlebrown": "#8b4513",
|
||||
"salmon": "#fa8072",
|
||||
"sandybrown": "#f4a460",
|
||||
"seagreen": "#2e8b57",
|
||||
"seashell": "#fff5ee",
|
||||
"sienna": "#a0522d",
|
||||
"silver": "#c0c0c0",
|
||||
"skyblue": "#87ceeb",
|
||||
"slateblue": "#6a5acd",
|
||||
"slategray": "#708090",
|
||||
"slategrey": "#708090",
|
||||
"snow": "#fffafa",
|
||||
"springgreen": "#00ff7f",
|
||||
"steelblue": "#4682b4",
|
||||
"tan": "#d2b48c",
|
||||
"teal": "#008080",
|
||||
"thistle": "#d8bfd8",
|
||||
"tomato": "#ff6347",
|
||||
"turquoise": "#40e0d0",
|
||||
"violet": "#ee82ee",
|
||||
"wheat": "#f5deb3",
|
||||
"white": "#ffffff",
|
||||
"whitesmoke": "#f5f5f5",
|
||||
"yellow": "#ffff00",
|
||||
"yellowgreen": "#9acd32"
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="https://glitch.com/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>{{seo.title}}</title>
|
||||
|
||||
<!-- meta tags for SEO and social sharing -->
|
||||
<link rel="canonical" href="{{seo.url}}">
|
||||
<meta name="description" content="{{seo.description}}">
|
||||
<meta property="og:title" content="{{seo.title}}">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:url" content="{{seo.url}}">
|
||||
<meta property="og:description" content="{{seo.description}}">
|
||||
<meta property="og:image" content="{{seo.image}}">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:url" content="{{seo.url}}">
|
||||
<meta name="twitter:title" content="{{seo.title}}">
|
||||
<meta name="twitter:description" content="{{seo.description}}">
|
||||
<meta name="twitter:image" content="{{seo.image}}">
|
||||
|
||||
<!-- import the webpage's stylesheet -->
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- if we've set a custom color (search or random) we change title text color with this style block -->
|
||||
{{#if color}}
|
||||
<style>
|
||||
.title {
|
||||
color: {{color}};
|
||||
}
|
||||
</style>
|
||||
{{/if}}
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="title">Hey, Node!</div>
|
||||
|
||||
<!-- add text indicating that we've changed color OR had an error -->
|
||||
{{#if color}}
|
||||
<div class="color-info">Now available in <b>{{color}}</b>!</div>
|
||||
{{/if}}
|
||||
{{#if colorError}}
|
||||
<div class="color-info">Hmm. Couldn't find <b>"{{colorError}}"</b>. <a href="?randomize=go">Try a random color?</a></div>
|
||||
{{/if}}
|
||||
|
||||
<img
|
||||
src="illustration.svg"
|
||||
class="illustration"
|
||||
alt="Javascript logo"
|
||||
/>
|
||||
|
||||
<div>
|
||||
<!-- the "what's your favorite color?" form -->
|
||||
<form class="color-search" method="post">
|
||||
<label for="color">
|
||||
What's your favorite color?
|
||||
<input id="color" name="color" required="required" type="text">
|
||||
</label>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
|
||||
<!-- this randomize link communicates with the server using a querystring instead of a form post -->
|
||||
<a href="?randomize=go">Pick a random color for me</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="navigation">
|
||||
<a
|
||||
href="https://glitch.com/edit/#!/remix/glitch-hello-node"
|
||||
class="btn--remix"
|
||||
>
|
||||
<img
|
||||
src="https://cdn.glitch.com/a9975ea6-8949-4bab-addb-8a95021dc2da%2FLogo_Color.svg?v=1602781328576"
|
||||
/>
|
||||
Remix on Glitch
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<!-- include the Glitch button to show what the webpage is about and
|
||||
to make it easier for folks to view source and remix -->
|
||||
<div class="glitchButton" style="position:fixed;top:20px;right:20px;"></div>
|
||||
<script src="https://button.glitch.me/button.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"glitch-help-instructions": "For a custom domain, change the 'url' parameter from 'glitch-default' to your domain _without_ a traling slash, like 'https://www.example.com'",
|
||||
"title": "Hello Node!",
|
||||
"description": "A simple Node site built with Glitch. Remix it to get your own.",
|
||||
"url": "glitch-default",
|
||||
"image": "https://cdn.glitch.com/605e2a51-d45f-4d87-a285-9410ad350515%2Fhello-eleventy-social.png?v=1616712747908"
|
||||
}
|
||||
Reference in New Issue
Block a user