diff --git a/README.md b/README.md index 8fce76b0..6b1d17f9 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ All fields are optional, unless otherwise stated. **`section`** - `name` - String: (required) The title of that section - `items` - Item[]: (required) An array of items - _See **`item`** below_ +- `icon` - String: (optional) An single icon to be displayed next to the title _See **`icon`** below_ - `displayData`: An object with the following fields (all optional) - `collapsed` - Boolean: If true, the section will be collapsed initially (defaults to `false`) - `color` - String: A custom accent color for the section, as a hex code or HTML color (e.g. `#fff`) diff --git a/public/conf.yml b/public/conf.yml index 99c1cd80..0af5344e 100644 --- a/public/conf.yml +++ b/public/conf.yml @@ -13,6 +13,7 @@ appConfig: fontAwesomeKey: 0821c65656 sections: - name: Getting Started + icon: far fa-star items: - title: Source description: Source code and documentation on GitHub diff --git a/src/App.vue b/src/App.vue index d6446210..6012579e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -82,6 +82,7 @@ export default { @import '@/styles/global-styles.scss'; @import '@/styles/color-palette.scss'; @import '@/styles/color-themes.scss'; +@import '@/styles/typography.scss'; body { background: var(--background); diff --git a/src/assets/fonts/PTMono-Regular.ttf b/src/assets/fonts/PTMono-Regular.ttf new file mode 100644 index 00000000..13a8004d Binary files /dev/null and b/src/assets/fonts/PTMono-Regular.ttf differ diff --git a/src/assets/fonts/Raleway-Variable.ttf b/src/assets/fonts/Raleway-Variable.ttf new file mode 100644 index 00000000..2466a5e0 Binary files /dev/null and b/src/assets/fonts/Raleway-Variable.ttf differ diff --git a/src/components/Configuration/ConfigContainer.vue b/src/components/Configuration/ConfigContainer.vue index 8dba7106..a6f91c98 100644 --- a/src/components/Configuration/ConfigContainer.vue +++ b/src/components/Configuration/ConfigContainer.vue @@ -192,9 +192,9 @@ a.config-button, button.config-button { div.code-container { background: var(--config-code-background); - #conf-yaml { - font-family: 'Inconsolata', sans-serif; - .hljs-attr { + #conf-yaml span { + font-family: var(--font-monospace), monospace !important; + &.hljs-attr { font-weight: bold !important; } } @@ -252,7 +252,7 @@ a.hyperlink-wrapper { display: flex; flex-direction: column; padding-top: 2rem; - background: var(--background-darker); + background: var(--config-settings-background); height: calc(100% - 2rem); h2 { margin: 1rem auto; @@ -271,6 +271,7 @@ a.hyperlink-wrapper { border-radius: var(--curve-factor); text-align: left; opacity: var(--dimming-factor); + color: var(--config-settings-color); background: var(--config-settings-background); p.sub-title { font-weight: bold; diff --git a/src/components/Configuration/CustomCss.vue b/src/components/Configuration/CustomCss.vue index 93e8de5c..4f6f7fa4 100644 --- a/src/components/Configuration/CustomCss.vue +++ b/src/components/Configuration/CustomCss.vue @@ -3,6 +3,7 @@

Note, you will need to refresh the page for your changes to take effect

+

To remove all custom styles, delete the contents and hit Save Changes

@@ -30,7 +31,7 @@ export default { }, methods: { validate(css) { - return css.match(/((?:^\s*)([\w#.@*,:\-.:>,*\s]+)\s*{(?:[\s]*)((?:[A-Za-z\- \s]+[:]\s*['"0-9\w .,/()\-!%]+;?)*)*\s*}(?:\s*))/gmi); + return css === '' || css.match(/((?:^\s*)([\w#.@*,:\-.:>,*\s]+)\s*{(?:[\s]*)((?:[A-Za-z\- \s]+[:]\s*['"0-9\w .,/()\-!%]+;?)*)*\s*}(?:\s*))/gmi); }, save() { let msg = ''; @@ -40,6 +41,7 @@ export default { localStorage.setItem(localStorageKeys.APP_CONFIG, JSON.stringify(appConfig)); msg = 'Changes saved succesfully'; this.inject(this.customCss); + if (this.customCss === '') setTimeout(() => { location.reload(); }, 1500); // eslint-disable-line no-restricted-globals } else { msg = 'Error - Invalid CSS'; } diff --git a/src/components/Configuration/EditSiteMeta.vue b/src/components/Configuration/EditSiteMeta.vue index e029fd1e..b64a7f5b 100644 --- a/src/components/Configuration/EditSiteMeta.vue +++ b/src/components/Configuration/EditSiteMeta.vue @@ -89,7 +89,7 @@ export default { display: flex; flex-direction: column; padding: 1rem 0; - background: var(--background-darker); + background: var(--config-settings-background); height: calc(100% - 1rem); h2 { margin: 1rem auto; @@ -117,6 +117,7 @@ div.form { min-width: 24rem; span { font-size: 1.2rem; + color: var(--config-settings-color); } input { color: var(--config-settings-color); diff --git a/src/components/LinkItems/Collapsable.vue b/src/components/LinkItems/Collapsable.vue index e482c2ec..e67b0042 100644 --- a/src/components/LinkItems/Collapsable.vue +++ b/src/components/LinkItems/Collapsable.vue @@ -11,6 +11,7 @@ tabIndex="-1" >
@@ -24,18 +25,23 @@