New material theme, additional fonts, more complete theme coverage, and bug fixes

This commit is contained in:
Alicia Sykes
2021-06-01 22:44:59 +01:00
parent b60b8db884
commit 9cf720e711
16 changed files with 248 additions and 64 deletions

View File

@@ -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;

View File

@@ -3,6 +3,7 @@
<prism-editor class="my-editor" v-model="customCss" :highlight="highlighter" line-numbers />
<button class="save-button" @click="save()">Save Changes</button>
<p>Note, you will need to refresh the page for your changes to take effect</p>
<p>To remove all custom styles, delete the contents and hit Save Changes</p>
</div>
</template>
@@ -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';
}

View File

@@ -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);