From f7c4311500e1ef4d0546e08cca42ab5bb002d135 Mon Sep 17 00:00:00 2001 From: Are0h Date: Mon, 6 Jul 2020 16:13:49 -0700 Subject: [PATCH] fixed recent posts links, added dummy data for featured posts --- package-lock.json | 54 +++++++++++++++++++++++++++ package.json | 1 + pug.config.js | 46 +++++++++++++++++++++++ src/front/assets/scripts/start.min.js | 2 +- src/front/index.pug | 10 ++++- 5 files changed, 111 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 301befe..443ad60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5841,6 +5841,60 @@ "pug-runtime": "^2.0.5" } }, + "pug-cli": { + "version": "1.0.0-alpha6", + "resolved": "https://registry.npmjs.org/pug-cli/-/pug-cli-1.0.0-alpha6.tgz", + "integrity": "sha1-HKU56krA67ac5KroSu7V1k/+ZQE=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "commander": "^2.8.1", + "mkdirp": "^0.5.1", + "pug": "^2.0.0-alpha7" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, "pug-code-gen": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-2.0.2.tgz", diff --git a/package.json b/package.json index 1415975..df5867e 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "devDependencies": { "parcel": "^1.12.4", "pug": "^2.0.4", + "pug-cli": "^1.0.0-alpha6", "stylus": "^0.54.7" } } diff --git a/pug.config.js b/pug.config.js index 183c2bb..37f5264 100644 --- a/pug.config.js +++ b/pug.config.js @@ -50,33 +50,79 @@ module.exports = { title: 'Teyonah Parris', slug: 'teyonah-parris', feature: 'content/blog-images/2018/11/chi-raq.jpg', + path: '2020/06', created: '2018 Nov 11th' }, { title: 'Aja Naomi-King', slug: 'aja-naomi-king', feature: 'content/blog-images/2018/11/chi-raq.jpg', + path: '2020/06', created: '2018 Nov 11th' }, { title: 'Sonequa Martin-Green', slug: 'sonequa-martin-green', feature: 'content/blog-images/2018/11/chi-raq.jpg', + path: '2020/06', created: '2018 Nov 11th' }, { title: 'Jameela Jamil', slug: 'jameela-jamil', feature: 'content/blog-images/2018/11/chi-raq.jpg', + path: '2020/06', created: '2018 Nov 11th' }, { title: "I'm so behind", slug: 'im-so-behind', feature: 'content/blog-images/2018/11/chi-raq.jpg', + path: '2020/06', created: '2018 Nov 11th' } ], + + featured_posts: [ + { + metadata: { + id: 6, + uuid: 'e322f21e-3317-4795-a7e8-a280c4611406', + title: 'Roberta MF Draper', + feature: '/assets/images/blog/2020/06/bobbie-draper-the-expanse-1170x585.jpg', + path: '2020/06', + layout: 'page', + tags: 'faves, damn, the expanse, sci-fi, frankie adams', + author: 'Are0h', + deleted: false, + menu: false, + featured: true, + published: true, + slug: 'roberta-mf-draper' + }, + content: + "Even Amos doesn't want any smoke with Mars' Finest. She will fuck your whole shit up. Bad. \r\n\r\nRENDER ON SAVE WORKS!\r\n" + }, + { + metadata: { + id: 4, + uuid: '9051e9df-c723-42c6-bf77-59f5bb8caeac', + title: 'Michael MF Burnam', + feature: + '/assets/images/blog/2020/06/Sonequa-Martin-Green-as-Michael-Burnham-in-Star-Trek-Discovery-season-3.jpg', + path: '2020/06', + layout: 'page', + tags: 'star trek discovery, sonequa martin-green, faves, damn, sci-fi, tv', + author: 'Are0h', + deleted: false, + menu: true, + featured: true, + published: true, + slug: 'michael-mf-burnam' + }, + content: "Yall acting like Michael won't give you those hands." + } + ], archives: [ { year: '2020', diff --git a/src/front/assets/scripts/start.min.js b/src/front/assets/scripts/start.min.js index 8d0990a..d9e053e 100644 --- a/src/front/assets/scripts/start.min.js +++ b/src/front/assets/scripts/start.min.js @@ -196,7 +196,7 @@ var parent = module.bundle.parent; if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') { var hostname = "" || location.hostname; var protocol = location.protocol === 'https:' ? 'wss' : 'ws'; - var ws = new WebSocket(protocol + '://' + hostname + ':' + "55663" + '/'); + var ws = new WebSocket(protocol + '://' + hostname + ':' + "52552" + '/'); ws.onmessage = function (event) { checkedAssets = {}; diff --git a/src/front/index.pug b/src/front/index.pug index 5a1f465..323fca0 100644 --- a/src/front/index.pug +++ b/src/front/index.pug @@ -9,9 +9,17 @@ block main-content - if(recent_posts) - var index = 0; - for ( index; index < recent_posts.length; index++) - a(href="/"+recent_posts[index].slug)= recent_posts[index].title + a(href="/"+recent_posts[index].path+"/"+recent_posts[index].slug)= recent_posts[index].title label= " "+recent_posts[index].created br + - if(featured_posts) + span Featured + br + - var index = 0; + - for ( index; index < featured_posts.length; index++) + a(href="/"+featured_posts[index].metadata.path+"/"+featured_posts[index].metadata.slug)= featured_posts[index].metadata.title + br + br a(href='/archives') Post Archive label The whole dirty. footer