diff --git a/client/scss/base/material.scss b/client/scss/base/material.scss index 4e42f62b..2a01a9e5 100644 --- a/client/scss/base/material.scss +++ b/client/scss/base/material.scss @@ -312,8 +312,8 @@ $material-colors: ( ), 'theme': ( - 'primary': #1976D2, - 'secondary': #424242, + 'primary': #048eb0, + 'secondary': #ee7e00, 'accent': #82B1FF, 'error': #FF5252, 'info': #2196F3, diff --git a/client/themes/default/scss/app.scss b/client/themes/default/scss/app.scss index c01faf12..d452d6cc 100644 --- a/client/themes/default/scss/app.scss +++ b/client/themes/default/scss/app.scss @@ -685,7 +685,7 @@ display:inline-block; vertical-align:top; padding-top:0; - + &:first-child { width: 100%; } diff --git a/server/modules/rendering/automatic-glossary/definition.yml b/server/modules/rendering/automatic-glossary/definition.yml new file mode 100644 index 00000000..441f6a78 --- /dev/null +++ b/server/modules/rendering/automatic-glossary/definition.yml @@ -0,0 +1,29 @@ +key: automaticGlossary +title: Glossary +description: Basic HTML Parser +author: requarks.io +input: html +output: html +icon: mdi-language-html5 +props: + absoluteLinks: + type: Boolean + default: false + title: Treat relative links as root absolute + hint: For example, a link to foo/bar on page xyz will render as /foo/bar instead of /xyz/foo/bar. + order: 1 + openExternalLinkNewTab: + type: Boolean + default: false + title: Open external links in a new tab + hint: External links will have a _blank target attribute added automatically. + order: 2 + relAttributeExternalLink: + type: String + default: noreferrer + title: Protect against XSS when opening _blank target links + hint: External links with _blank attribute will have an additional rel attribute. + order: 3 + enum: + - noreferrer + - noopener diff --git a/server/modules/rendering/automatic-glossary/renderer.js b/server/modules/rendering/automatic-glossary/renderer.js new file mode 100644 index 00000000..ae79e71d --- /dev/null +++ b/server/modules/rendering/automatic-glossary/renderer.js @@ -0,0 +1,22 @@ +const _ = require('lodash') +const cheerio = require('cheerio') +const uslug = require('uslug') +const pageHelper = require('../../../helpers/page') +const URL = require('url').URL + + +/* global WIKI */ + +module.exports = { + async render() { + let $ = cheerio.load(this.input, { + decodeEntities: true + }) + + if ($.root().children().length < 1) { + return '' + } + + return $.html() + } +}