{{ term.term }}
32 |{{term.definition}}
34 |├── .gitignore ├── utils └── prismic-client.js ├── package.json ├── _data └── glossary.js ├── index.md ├── netlify.toml ├── _includes └── default.njk └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | _site 3 | 4 | # Local Netlify folder 5 | .netlify -------------------------------------------------------------------------------- /utils/prismic-client.js: -------------------------------------------------------------------------------- 1 | const Prismic = require('@prismicio/client'); 2 | 3 | const options = { 4 | // accessToken: 5 | }; 6 | 7 | exports.client = Prismic.client('http://drasnerd.prismic.io/api', options); 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "drasnerd.com", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "eleventy", 8 | "dev": "eleventy --serve" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "@prismicio/client": "^4.0.0", 15 | "bulma": "^0.9.2" 16 | }, 17 | "devDependencies": { 18 | "@11ty/eleventy": "^0.12.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /_data/glossary.js: -------------------------------------------------------------------------------- 1 | // const { client } = require('../utils/prismic-client'); 2 | 3 | const { client } = require('../utils/prismic-client'); 4 | 5 | module.exports = async () => { 6 | const result = await client.query(''); 7 | 8 | // hard-code getting the page 9 | const page = result.results[0]; 10 | const data = page.data.page; 11 | const title = data.title.value[0].text; 12 | 13 | const terms = data.body.value 14 | .filter((entry) => { 15 | return entry.slice_type === 'glossary_term'; 16 | }) 17 | .map((slice) => { 18 | const fields = slice['non-repeat']; 19 | return { 20 | term: fields.term.value[0].text, 21 | definition: fields.definition.value[0].text, 22 | }; 23 | }); 24 | 25 | return { 26 | title, 27 | terms, 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default.njk 3 | title: Drasnerd 4 | --- 5 | 6 | 23 | 24 |
{{term.definition}}
34 |
2 |
3 |
4 |
5 |
13 | But don’t worry! You can still: 14 | watch the video · 15 | see the demo · 16 | deploy this project · 17 | see upcoming episodes 18 |
19 | 20 | 21 | 22 | How fast can two cyberspace hooligans build an app to troll their boss? Tune in and find out as Cassidy Williams and Jason Lengstorf drag Sarah Drasner in app form! 23 | 24 | 25 | 26 | ## More Information 27 | 28 | - [Watch this app get built live + see links and additional resources][episode] 29 | - [Follow _Learn With Jason_ on Twitch][twitch] to watch future episodes live 30 | - [Add the _Learn With Jason_ schedule to your Google Calendar][cal] 31 | 32 | 33 |
34 |
35 |
36 |
37 |