slime quest
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules
|
||||||
|
slimequest
|
28
README.md
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
slime quest template for sofia
|
||||||
|
|
||||||
|
with love by nycki
|
||||||
|
|
||||||
|
## how do I use one of these things again
|
||||||
|
|
||||||
|
- download and extract it
|
||||||
|
- open a command prompt in the folder where you saved it
|
||||||
|
|
||||||
|
- install Eleventy:
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
- build the site:
|
||||||
|
```
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
## ok now what?
|
||||||
|
|
||||||
|
Copy the entire _slimequest_ folder into your regular site! That's it!
|
||||||
|
|
||||||
|
## oh neat. how do I add more stuff?
|
||||||
|
|
||||||
|
Copy your images into _site-static_, then go into _site-source_ and copy one of the _page.md_ files. If you give a page a "title" then that's what will appear as the command on the previous page, for instance you could set the title to be `==>` or `nemo: do a silly dance` or whatever you want!
|
||||||
|
|
||||||
|
hope this helps ok bye!
|
28
eleventy.config.js
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */
|
||||||
|
export default function(eleventyConfig) {
|
||||||
|
|
||||||
|
// Markdown and templates go in site-source. They will be converted to HTML.
|
||||||
|
eleventyConfig.setInputDirectory('site-source');
|
||||||
|
eleventyConfig.setOutputDirectory('slimequest');
|
||||||
|
eleventyConfig.setTemplateFormats('md,njk');
|
||||||
|
|
||||||
|
// Everything else goes in site-static. It just gets copied normally.
|
||||||
|
eleventyConfig.addPassthroughCopy({ 'site-static': '/' });
|
||||||
|
eleventyConfig.addWatchTarget('site-static/*.css');
|
||||||
|
|
||||||
|
// If you want these files to live at, e.g. "example.com/quest", then set pathPrefix to "quest".
|
||||||
|
const pathPrefix = 'slimequest';
|
||||||
|
|
||||||
|
// Convenience function for quest images
|
||||||
|
// example: {% image '1.jpg' %}
|
||||||
|
// Can also add alt text:
|
||||||
|
// example: {% image '2.jpg', 'slime dragon with sword piercing its heart' %}
|
||||||
|
eleventyConfig.addShortcode('image', (filename, alt) => {
|
||||||
|
return `<img src=/${pathPrefix}/${filename} alt="${alt}" title="${alt}">`
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
markdownTemplateEngine: 'njk',
|
||||||
|
pathPrefix: pathPrefix,
|
||||||
|
}
|
||||||
|
}
|
2212
package-lock.json
generated
Normal file
19
package.json
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "slime-quest-web",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"start": "cross-env NODE_ENV=localhost npx eleventy --serve",
|
||||||
|
"build": "eleventy"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"type": "module",
|
||||||
|
"description": "",
|
||||||
|
"dependencies": {
|
||||||
|
"@11ty/eleventy": "^3.0.0",
|
||||||
|
"cross-env": "^7.0.3"
|
||||||
|
}
|
||||||
|
}
|
30
site-source/_includes/base.njk
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>{{ title }}</title>
|
||||||
|
<link rel="stylesheet" href="{{ '/style.css' | url }}">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<h1>{{ title or '==>' }}</h1>
|
||||||
|
<p><em>{{ subtitle }}</em><p>
|
||||||
|
{{ content | safe }}
|
||||||
|
{% set nextPage = collections.pages | getNextCollectionItem %}
|
||||||
|
{% if nextPage %}
|
||||||
|
<span class="next">> <a href="{{ nextPage.url | url }}">{{ nextPage.data.title or '==>' }}</a></span>
|
||||||
|
{% else %}
|
||||||
|
<span class="next">> _</span>
|
||||||
|
{% endif %}
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li><a href="{{ '/' | url }}">Start Over</a></li>
|
||||||
|
{% set previousPage = collections.pages | getPreviousCollectionItem %}
|
||||||
|
{% if previousPage %}
|
||||||
|
<li><a href="{{ previousPage.url }}">Go Back</a></li>
|
||||||
|
{% endif %}
|
||||||
|
<li><a href="/">Home</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
12
site-source/index.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
title: Slime Quest
|
||||||
|
---
|
||||||
|
<div class="post">
|
||||||
|
|
||||||
|
{% image '1a.jpg' %}
|
||||||
|
|
||||||
|
2.0
|
||||||
|
|
||||||
|
updates weekly
|
||||||
|
|
||||||
|
</div>
|
8
site-source/page-1.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: ==>
|
||||||
|
---
|
||||||
|
<div class="post">{% image '1.jpg' %}</div>
|
||||||
|
<div class="post">{% image '2.jpg', 'slime dragon with sword piercing its heart' %}</div>
|
||||||
|
<div class="post">{% image '3.jpg' %}</div>
|
||||||
|
<div class="post">{% image '4.jpg' %}</div>
|
||||||
|
<div class="post">{% image '5.jpg' %}</div>
|
11
site-source/page-2.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
title: ==>
|
||||||
|
---
|
||||||
|
<div class="post">
|
||||||
|
|
||||||
|
{% image '6.jpg' %}
|
||||||
|
|
||||||
|
You awaken alone in a field. Beneath you the ground is scorched. The grass around you is tall and wild. The wind is soft and warm.
|
||||||
|
You were once a Grand Slime, the queen bee of a hive of slimes. Now you’re barely a fraction of your old self.
|
||||||
|
|
||||||
|
</div>
|
4
site-source/site-source.11tydata.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"tags": [ "pages" ],
|
||||||
|
"layout": "base.njk"
|
||||||
|
}
|
BIN
site-static/1.jpg
Normal file
After Width: | Height: | Size: 184 KiB |
BIN
site-static/1a.jpg
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
site-static/2.jpg
Normal file
After Width: | Height: | Size: 176 KiB |
BIN
site-static/3.jpg
Normal file
After Width: | Height: | Size: 132 KiB |
BIN
site-static/4.jpg
Normal file
After Width: | Height: | Size: 135 KiB |
BIN
site-static/5.jpg
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
site-static/6.jpg
Normal file
After Width: | Height: | Size: 82 KiB |
53
site-static/style.css
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
/* questden colors */
|
||||||
|
body {
|
||||||
|
background: #FFFFEE;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
max-width: 40rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post {
|
||||||
|
max-width: 40rem;
|
||||||
|
background: #F0E0D6;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post img {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* nav links are a bulleted list without the bullets */
|
||||||
|
nav ul {
|
||||||
|
list-style: none;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
nav li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
nav li + li::before {
|
||||||
|
content: ' | ';
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ms paint adventures */
|
||||||
|
|
||||||
|
h1, h2, .next {
|
||||||
|
font-family: consolas, monospace, sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
color: #CC1105;
|
||||||
|
}
|
||||||
|
|
||||||
|
.next {
|
||||||
|
font-size: xx-large;
|
||||||
|
}
|