From 1aa5a4ae234466e7cb126d99cb51806b168c92d8 Mon Sep 17 00:00:00 2001 From: peter_rabbit <pierrejarriges@gmail.com> Date: Sun, 24 Jan 2021 13:23:29 +0100 Subject: [PATCH] fix-soft article placeholder --- public/games/games.js | 13 +------------ public/main.js | 13 +------------ public/software-development/software-development.js | 13 +------------ public/style/style.css | 5 +++++ .../software-development/software-development.scss | 6 ++++++ 5 files changed, 14 insertions(+), 36 deletions(-) diff --git a/public/games/games.js b/public/games/games.js index e54dd2c..8daf77a 100644 --- a/public/games/games.js +++ b/public/games/games.js @@ -91,18 +91,7 @@ module.exports = ImageCarousel; const { fetchjson, fetchtext } = require("./fetch"); function getArticleBody(text) { - return text - // .split(" ") - // .map(word => { - // if (word.includes("http://") || word.includes("https://")) { - // const splitword = word.split("||"); - // const href = splitword[0].match(/http.+/); - // const text = splitword.length > 1 ? splitword[1].replaceAll("_", " ") : href; - // return word.replace(/http.*/, `<a href=${href} target="_blank">${text}</a>`); - // } else return word; - // }) - // .join(" ") - .replaceAll("\n", "<br/>"); + return text.replaceAll("\n", "<br/>"); } function getArticleDate(date) { diff --git a/public/main.js b/public/main.js index ca3e73e..cfc5149 100644 --- a/public/main.js +++ b/public/main.js @@ -377,18 +377,7 @@ module.exports = HomePage; const { fetchjson, fetchtext } = require("./fetch"); function getArticleBody(text) { - return text - // .split(" ") - // .map(word => { - // if (word.includes("http://") || word.includes("https://")) { - // const splitword = word.split("||"); - // const href = splitword[0].match(/http.+/); - // const text = splitword.length > 1 ? splitword[1].replaceAll("_", " ") : href; - // return word.replace(/http.*/, `<a href=${href} target="_blank">${text}</a>`); - // } else return word; - // }) - // .join(" ") - .replaceAll("\n", "<br/>"); + return text.replaceAll("\n", "<br/>"); } function getArticleDate(date) { diff --git a/public/software-development/software-development.js b/public/software-development/software-development.js index 120b6c5..5a8b60e 100644 --- a/public/software-development/software-development.js +++ b/public/software-development/software-development.js @@ -91,18 +91,7 @@ module.exports = ImageCarousel; const { fetchjson, fetchtext } = require("./fetch"); function getArticleBody(text) { - return text - // .split(" ") - // .map(word => { - // if (word.includes("http://") || word.includes("https://")) { - // const splitword = word.split("||"); - // const href = splitword[0].match(/http.+/); - // const text = splitword.length > 1 ? splitword[1].replaceAll("_", " ") : href; - // return word.replace(/http.*/, `<a href=${href} target="_blank">${text}</a>`); - // } else return word; - // }) - // .join(" ") - .replaceAll("\n", "<br/>"); + return text.replaceAll("\n", "<br/>"); } function getArticleDate(date) { diff --git a/public/style/style.css b/public/style/style.css index 18d3a29..18e4148 100644 --- a/public/style/style.css +++ b/public/style/style.css @@ -1068,6 +1068,11 @@ main #page-container #software-page .software-articles article.software-article grid-column: 1; } } +main #page-container #software-page .software-articles article.placeholder { + background-color: #d4d9dd; + height: 400px; + margin: 30px; +} main footer { display: flex; justify-content: center; diff --git a/src/pages/software-development/software-development.scss b/src/pages/software-development/software-development.scss index 61132cf..e5a7886 100644 --- a/src/pages/software-development/software-development.scss +++ b/src/pages/software-development/software-development.scss @@ -87,6 +87,7 @@ } } } + @media screen and (max-width: $page_contents_center_width) { margin: 30px 20px; } @@ -104,5 +105,10 @@ } } } + article.placeholder { + background-color: $light_0; + height: 400px; + margin: 30px; + } } } -- GitLab