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

@ -82,6 +82,7 @@ export default {
@import '@/styles/global-styles.scss'; @import '@/styles/global-styles.scss';
@import '@/styles/color-palette.scss'; @import '@/styles/color-palette.scss';
@import '@/styles/color-themes.scss'; @import '@/styles/color-themes.scss';
@import '@/styles/typography.scss';
body { body {
background: var(--background); background: var(--background);

Binary file not shown.

Binary file not shown.

View File

@ -192,9 +192,9 @@ a.config-button, button.config-button {
div.code-container { div.code-container {
background: var(--config-code-background); background: var(--config-code-background);
#conf-yaml { #conf-yaml span {
font-family: 'Inconsolata', sans-serif; font-family: var(--font-monospace), monospace !important;
.hljs-attr { &.hljs-attr {
font-weight: bold !important; font-weight: bold !important;
} }
} }
@ -252,7 +252,7 @@ a.hyperlink-wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding-top: 2rem; padding-top: 2rem;
background: var(--background-darker); background: var(--config-settings-background);
height: calc(100% - 2rem); height: calc(100% - 2rem);
h2 { h2 {
margin: 1rem auto; margin: 1rem auto;

View File

@ -3,6 +3,7 @@
<prism-editor class="my-editor" v-model="customCss" :highlight="highlighter" line-numbers /> <prism-editor class="my-editor" v-model="customCss" :highlight="highlighter" line-numbers />
<button class="save-button" @click="save()">Save Changes</button> <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>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> </div>
</template> </template>
@ -30,7 +31,7 @@ export default {
}, },
methods: { methods: {
validate(css) { 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() { save() {
let msg = ''; let msg = '';
@ -40,6 +41,7 @@ export default {
localStorage.setItem(localStorageKeys.APP_CONFIG, JSON.stringify(appConfig)); localStorage.setItem(localStorageKeys.APP_CONFIG, JSON.stringify(appConfig));
msg = 'Changes saved succesfully'; msg = 'Changes saved succesfully';
this.inject(this.customCss); this.inject(this.customCss);
if (this.customCss === '') setTimeout(() => { location.reload(); }, 1500); // eslint-disable-line no-restricted-globals
} else { } else {
msg = 'Error - Invalid CSS'; msg = 'Error - Invalid CSS';
} }

View File

@ -89,7 +89,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 1rem 0; padding: 1rem 0;
background: var(--background-darker); background: var(--config-settings-background);
height: calc(100% - 1rem); height: calc(100% - 1rem);
h2 { h2 {
margin: 1rem auto; margin: 1rem auto;
@ -117,6 +117,7 @@ div.form {
min-width: 24rem; min-width: 24rem;
span { span {
font-size: 1.2rem; font-size: 1.2rem;
color: var(--config-settings-color);
} }
input { input {
color: var(--config-settings-color); color: var(--config-settings-color);

View File

@ -12,6 +12,7 @@
<div class="tile-title" :id="`tile-${id}`" > <div class="tile-title" :id="`tile-${id}`" >
<span class="text">{{ title }}</span> <span class="text">{{ title }}</span>
<div class="overflow-dots">...</div> <div class="overflow-dots">...</div>
<p class="description">{{ description }}</p>
</div> </div>
<!-- Item Icon --> <!-- Item Icon -->
<Icon :icon="icon" :url="url" :size="itemSize" :color="color" v-bind:style="customStyles" /> <Icon :icon="icon" :url="url" :size="itemSize" :color="color" v-bind:style="customStyles" />
@ -205,7 +206,7 @@ export default {
} }
.tile-title { .tile-title {
height: fit-content; height: fit-content;
min-height: 1rem; min-height: 1.2rem;
span.text { span.text {
text-align: left; text-align: left;
padding-left: 10%; padding-left: 10%;
@ -228,6 +229,10 @@ export default {
&.size-large { &.size-large {
height: 100px; height: 100px;
} }
p.description {
display: none;
}
} }
</style> </style>

View File

@ -126,5 +126,19 @@ export default {
@include big-screen-up { grid-template-columns: repeat(5, 1fr); } @include big-screen-up { grid-template-columns: repeat(5, 1fr); }
} }
} }
.orientation-horizontal {
display: flex;
flex-direction: column;
.there-are-items {
display: grid;
grid-template-columns: repeat(5, 1fr);
@include phone { grid-template-columns: repeat(2, 1fr); }
@include tablet { grid-template-columns: repeat(4, 1fr); }
@include laptop { grid-template-columns: repeat(6, 1fr); }
@include monitor { grid-template-columns: repeat(8, 1fr); }
@include big-screen { grid-template-columns: repeat(10, 1fr); }
@include big-screen-up { grid-template-columns: repeat(12, 1fr); }
}
}
</style> </style>

View File

@ -3,11 +3,11 @@
<span class="options-label">Icon Size</span> <span class="options-label">Icon Size</span>
<div class="display-options"> <div class="display-options">
<IconSmall @click="updateIconSize('small')" v-tooltip="tooltip('Small')" <IconSmall @click="updateIconSize('small')" v-tooltip="tooltip('Small')"
:class="`layout-icon ${iconSize === 'small' ? 'selected' : ''}`" tabindex="2" /> :class="`layout-icon ${iconSize === 'small' ? 'selected' : ''}`" tabindex="-2" />
<IconMedium @click="updateIconSize('medium')" v-tooltip="tooltip('Medium')" <IconMedium @click="updateIconSize('medium')" v-tooltip="tooltip('Medium')"
:class="`layout-icon ${iconSize === 'medium' ? 'selected' : ''}`" tabindex="2" /> :class="`layout-icon ${iconSize === 'medium' ? 'selected' : ''}`" tabindex="-2" />
<IconLarge @click="updateIconSize('large')" v-tooltip="tooltip('Large')" <IconLarge @click="updateIconSize('large')" v-tooltip="tooltip('Large')"
:class="`layout-icon ${iconSize === 'large' ? 'selected' : ''}`" tabindex="2" /> :class="`layout-icon ${iconSize === 'large' ? 'selected' : ''}`" tabindex="-2" />
</div> </div>
</div> </div>
</template> </template>

View File

@ -3,11 +3,11 @@
<span class="options-label">Layout</span> <span class="options-label">Layout</span>
<div class="display-options"> <div class="display-options">
<IconDeafault @click="updateDisplayLayout('auto')" v-tooltip="tooltip('Auto')" <IconDeafault @click="updateDisplayLayout('auto')" v-tooltip="tooltip('Auto')"
:class="`layout-icon ${displayLayout === 'auto' ? 'selected' : ''}`" tabindex="2" /> :class="`layout-icon ${displayLayout === 'auto' ? 'selected' : ''}`" tabindex="-2" />
<IconHorizontal @click="updateDisplayLayout('horizontal')" v-tooltip="tooltip('Horizontal')" <IconHorizontal @click="updateDisplayLayout('horizontal')" v-tooltip="tooltip('Horizontal')"
:class="`layout-icon ${displayLayout === 'horizontal' ? 'selected' : ''}`" tabindex="2" /> :class="`layout-icon ${displayLayout === 'horizontal' ? 'selected' : ''}`" tabindex="-2" />
<IconVertical @click="updateDisplayLayout('vertical')" v-tooltip="tooltip('Vertical')" <IconVertical @click="updateDisplayLayout('vertical')" v-tooltip="tooltip('Vertical')"
:class="`layout-icon ${displayLayout === 'vertical' ? 'selected' : ''}`" tabindex="2" /> :class="`layout-icon ${displayLayout === 'vertical' ? 'selected' : ''}`" tabindex="-2" />
</div> </div>
</div> </div>
</template> </template>

View File

@ -5,7 +5,7 @@
id="filter-tiles" id="filter-tiles"
v-model="input" v-model="input"
ref="filter" ref="filter"
placeholder="Start typing to filter tiles..." placeholder="Start typing to filter..."
v-on:input="userIsTypingSomething" v-on:input="userIsTypingSomething"
@keydown.esc="clearFilterInput" /> @keydown.esc="clearFilterInput" />
<i v-if="input.length > 0" <i v-if="input.length > 0"

View File

@ -1,11 +1,11 @@
<template> <template>
<div class="theme-selector-section" v-if="themes" > <div class="theme-selector-section" v-if="themes" >
<span class="theme-label">Themes</span> <span class="theme-label">Theme</span>
<v-select <v-select
:options="themeNames" :options="themeNames"
v-model="selectedTheme" v-model="selectedTheme"
class="theme-dropdown" class="theme-dropdown"
:tabindex="2" :tabindex="-2"
/> />
</div> </div>
</template> </template>

View File

@ -7,6 +7,8 @@ html[data-theme='callisto'] {
--item-background-hover: #060913; --item-background-hover: #060913;
--item-hover-shadow: 0 1px 3px #00ccb4b3, 0 1px 2px #00ccb4bf; --item-hover-shadow: 0 1px 3px #00ccb4b3, 0 1px 2px #00ccb4bf;
--primary: #00CCB4; --primary: #00CCB4;
--font-body: 'Inconsolata', 'Georgia', sans-serif;
--font-headings: 'PTMono', 'Courier New', monospace;
} }
html[data-theme='thebe'] { html[data-theme='thebe'] {
@ -19,9 +21,11 @@ html[data-theme='thebe'] {
--primary: #9660ec; --primary: #9660ec;
--item-group-outer-background: #9660EC --item-group-outer-background: #9660EC
linear-gradient(45deg, #9660ec 2%,#5f60ea 51%,#9660ec 100%); linear-gradient(45deg, #9660ec 2%,#5f60ea 51%,#9660ec 100%);
--font-headings: 'PTMono', 'Courier New', monospace;
} }
html[data-theme='dracula'] { html[data-theme='dracula'] {
--font-headings: 'Allerta Stencil', sans-serif;
--background: #44475a; --background: #44475a;
--background-darker: #282a36; --background-darker: #282a36;
--item-group-background: #282a36; --item-group-background: #282a36;
@ -43,6 +47,7 @@ html[data-theme='bee'] {
--item-background: #1c2636; --item-background: #1c2636;
--item-group-background: #0b1021; --item-group-background: #0b1021;
--nav-link-background-color: #0b1021; --nav-link-background-color: #0b1021;
--font-headings: 'Sniglet', cursive;
} }
html[data-theme='raspberry-jam'] { html[data-theme='raspberry-jam'] {
@ -52,6 +57,7 @@ html[data-theme='raspberry-jam'] {
--nav-link-background-color: #0b1021; --nav-link-background-color: #0b1021;
--config-code-background: #0b1021; --config-code-background: #0b1021;
--config-code-color: #eb2d6c; --config-code-color: #eb2d6c;
--font-headings: 'Sniglet', cursive;
} }
html[data-theme='tiger'] { html[data-theme='tiger'] {
@ -59,6 +65,7 @@ html[data-theme='tiger'] {
--item-background: #1c2636; --item-background: #1c2636;
--item-group-background: #0b1021; --item-group-background: #0b1021;
--nav-link-background-color: #0b1021; --nav-link-background-color: #0b1021;
--font-headings: 'Sniglet', cursive;
} }
html[data-theme='matrix-red'] { html[data-theme='matrix-red'] {
@ -67,6 +74,8 @@ html[data-theme='matrix-red'] {
--primary: red; --primary: red;
--outline-color: red; --outline-color: red;
--curve-factor: 0px; --curve-factor: 0px;
--font-body: 'Cutive Mono', monospace;
--font-headings: 'VT323', monospace;
} }
html[data-theme='matrix'] { html[data-theme='matrix'] {
@ -75,6 +84,8 @@ html[data-theme='matrix'] {
--primary: #2bca2b; --primary: #2bca2b;
--outline-color: #2bca2b; --outline-color: #2bca2b;
--curve-factor: 0px; --curve-factor: 0px;
--font-body: 'Cutive Mono', monospace;
--font-headings: 'VT323', monospace;
} }
html[data-theme='hacker-girl'] { html[data-theme='hacker-girl'] {
@ -83,6 +94,8 @@ html[data-theme='hacker-girl'] {
--primary: #e435f1; --primary: #e435f1;
--outline-color: #e435f1; --outline-color: #e435f1;
--curve-factor: 0px; --curve-factor: 0px;
--font-body: 'Cutive Mono', monospace;
--font-headings: 'VT323', monospace;
} }
html[data-theme='high-contrast-light'] { html[data-theme='high-contrast-light'] {
@ -94,6 +107,7 @@ html[data-theme='high-contrast-light'] {
--outline-color: #000; --outline-color: #000;
--curve-factor: 0px; --curve-factor: 0px;
--config-code-color: #000; --config-code-color: #000;
--font-headings: 'PTMono', 'Courier New', monospace;
} }
html[data-theme='high-contrast-dark'] { html[data-theme='high-contrast-dark'] {
@ -103,6 +117,7 @@ html[data-theme='high-contrast-dark'] {
--primary: #fff; --primary: #fff;
--outline-color: #fff; --outline-color: #fff;
--curve-factor: 0px; --curve-factor: 0px;
--font-headings: 'PTMono', 'Courier New', monospace;
} }
html[data-theme='nord'] { html[data-theme='nord'] {
@ -135,7 +150,9 @@ html[data-theme='material'] {
--background: #e2e1e0; --background: #e2e1e0;
--background-darker: #01579B; --background-darker: #01579B;
--settings-background: #01579B; --settings-background: #01579B;
--item-group-background: #f8f8f8; --item-group-shadow: none;
--item-group-outer-background: none;
--item-group-background: none;
--item-background: #fff; --item-background: #fff;
--item-background-hover: #fff; --item-background-hover: #fff;
--settings-background: #29B6F6; --settings-background: #29B6F6;
@ -151,6 +168,10 @@ html[data-theme='material'] {
--welcome-popup-background: #01579b; --welcome-popup-background: #01579b;
--welcome-popup-text-color: #ffffff; --welcome-popup-text-color: #ffffff;
--config-code-color: #000; --config-code-color: #000;
--item-group-heading-text-color-hover: #01579b;
--config-settings-background: #01579b;
--config-settings-color: #fff;
--heading-text-color: #fff;
} }
html[data-theme='material-dark'] { html[data-theme='material-dark'] {
@ -189,7 +210,108 @@ html[data-theme='material-dark'] {
} }
} }
html[data-theme='material-2'] {
--font-body: 'Roboto', serif;
--font-headings: 'Francois One', serif;
--primary: #363636;
--background: #e2e1e0;
--background-darker: #4285f4;
--item-group-outer-background: none;
--item-group-shadow: none;
--item-group-background: none;
--item-background: #fff;
--item-background-hover: #fff;
--item-shadow: 0 1px 3px #0000001f, 0 1px 2px #0000003d;
--item-hover-shadow: 0 1px 4px #00000029, 0 2px 4px #0000002a;
--item-text-color: #363636;
--item-group-heading-text-color-hover: #363636;
--item-icon-transform-hover: none;
--nav-link-border-color-hover: #1341a6;
--settings-text-color: #363636;
--config-code-color: #363636;
--heading-text-color: #fff;
--curve-factor: 4px;
--curve-factor-navbar: 8px;
--search-container-background: linear-gradient(to bottom, #3367d6 0%,#4285f4 5%);
header {
background: #3367d6;
color: #fff;
.page-titles span.subtitle {
text-shadow: none;
}
}
footer {
opacity: 1;
color: #fff;
}
section.filter-container form label {
color: var(--primary);
}
.item:not(.size-small) {
display: flex;
flex-direction: row-reverse;
justify-content: flex-end;
text-align: left;
overflow: hidden;
align-items: end;
width: 15rem;
min-width: 15rem;
max-height: 4rem;
margin: 0.2rem;
.overflow-dots {
display: none;
}
img {
padding: 0.1rem 0.25rem;
}
.tile-title {
height: auto;
padding: 0.1rem 0.25rem;
span.text {
position: relative;
font-weight: bold;
font-size: 1.1rem;
width: 100%;
}
p.description {
display: block;
margin: 0;
white-space: pre-wrap;
}
}
}
.item.size-large {
width: 18rem;
min-width: 18rem;
max-height: 5rem;
margin: 0.4rem;
img {
padding: 0.2rem 0.5rem;
}
}
.tooltip {
display: none !important;
}
.orientation-horizontal {
display: flex;
flex-direction: column;
.there-are-items {
display: grid;
grid-template-columns: repeat(5, 1fr);
@include phone { grid-template-columns: repeat(1, 1fr); }
@include tablet { grid-template-columns: repeat(2, 1fr); }
@include laptop { grid-template-columns: repeat(3, 1fr); }
@include monitor { grid-template-columns: repeat(4, 1fr); }
@include big-screen { grid-template-columns: repeat(5, 1fr); }
@include big-screen-up { grid-template-columns: repeat(6, 1fr); }
}
}
}
html[data-theme='colorful'] { html[data-theme='colorful'] {
--font-headings: 'Podkova', monospace;
--primary: #e8eae1; --primary: #e8eae1;
--background: #0b1021; --background: #0b1021;
--item-background: #05070e; --item-background: #05070e;
@ -215,33 +337,19 @@ html[data-theme='colorful'] {
svg path { fill: #05070e; } svg path { fill: #05070e; }
i.fas, i.fab, i.far, i.fal, i.fad { color: #05070e; } i.fas, i.fab, i.far, i.fal, i.fad { color: #05070e; }
} }
h1, h2, h3, h4 {
font-weight: normal;
}
} }
html[data-theme='minimal-light'], html[data-theme='minimal-dark'] { html[data-theme='minimal-light'], html[data-theme='minimal-dark'] {
.item-group-container:not(.item-size-small):not(.orientation-vertical) { --font-body: 'PTMono-Regular', 'Courier New', monospace;
display: flex; --font-headings: 'PTMono-Regular', 'Courier New', monospace;
flex-direction: column;
.there-are-items {
display: grid;
grid-template-columns: repeat(5, 1fr);
@include phone { grid-template-columns: repeat(2, 1fr); }
@include tablet { grid-template-columns: repeat(4, 1fr); }
@include laptop { grid-template-columns: repeat(6, 1fr); }
@include monitor { grid-template-columns: repeat(8, 1fr); }
@include big-screen { grid-template-columns: repeat(10, 1fr); }
@include big-screen-up { grid-template-columns: repeat(12, 1fr); }
}
.collapsable {
border-bottom: 1px dashed #ffffff38;
border-radius: 0;
}
}
label.lbl-toggle h3 { label.lbl-toggle h3 {
font-size: 1.8rem; font-size: 1.8rem;
} }
.tile-title span.text { .tile-title span.text {
font-size: 1.2rem; font-size: 1.1rem;
font-weight: bold; font-weight: bold;
} }
@ -261,7 +369,10 @@ html[data-theme='minimal-light'], html[data-theme='minimal-dark'] {
box-shadow: none; box-shadow: none;
} }
} }
.item-group-container.orientation-horizontal .collapsable {
border-bottom: 1px dashed #ffffff38;
border-radius: 0;
}
} }
html[data-theme='minimal-light'] { html[data-theme='minimal-light'] {
@ -296,12 +407,12 @@ html[data-theme='minimal-light'] {
html[data-theme='minimal-dark'] { html[data-theme='minimal-dark'] {
--primary: #a5a5a5; --primary: #a5a5a5;
--background: #14171e; --background: #14171e;
--background-darker: #000; --background-darker: #090b0e;
--item-group-outer-background: none; --item-group-outer-background: none;
--item-group-shadow: none; --item-group-shadow: none;
--item-group-background: none; --item-group-background: none;
--item-background: none; --item-background: none;
--item-background-hover: #14171e; --item-background-hover: #090b0e;
--item-shadow: none; --item-shadow: none;
--item-hover-shadow: none; --item-hover-shadow: none;
--item-text-color: #fff; --item-text-color: #fff;

View File

@ -1,25 +1,14 @@
@import '@/styles/style-helpers.scss'; @import '@/styles/style-helpers.scss';
@font-face {
font-family: 'Inconsolata';
src: url('./assets/fonts/Inconsolata-Light.ttf');
}
html { html {
margin: 0; margin: 0;
padding: 0; padding: 0;
transition: all 1s; transition: all 1s;
margin-top: -3px; margin-top: -3px;
@extend .scroll-bar; @extend .scroll-bar;
} box-sizing: border-box;
input[type=button], button, a {
/* Default app font face */ cursor: pointer;
body, div, p, a, span, label, input, button { }
font-family: 'Inconsolata', sans-serif;
}
/* Headings font face */
h1, h2, h3, h4, h5 {
font-family: 'Inconsolata', sans-serif;
} }

View File

@ -0,0 +1,60 @@
@font-face {
font-family: 'Inconsolata';
src: url('./assets/fonts/Inconsolata-Light.ttf');
}
@font-face {
font-family: 'Raleway';
src: url('./assets/fonts/Raleway-Variable.ttf');
}
@font-face {
font-family: 'PTMono';
src: url('./assets/fonts/PTMono-Regular.ttf');
}
html {
--font-body: 'Raleway', 'Trebuchet MS', sans-serif;
--font-headings: 'Inconsolata', 'Georgia', sans-serif;
--font-monospace: 'PTMono', 'Courier New', monospace;
font-size: 1rem;
font-weight: normal;
text-decoration: none;
background: transparent;
vertical-align: baseline;
/* Default app font face */
body, div, p, a, span, label, input, button {
font-family: var(--font-body);
}
/* Headings font face */
h1, h2, h3, h4, h5 {
font-family: var(--font-headings);
}
/* Monospace, for code and raw data output */
code, pre, pre *, .jsoneditor *, .mono * {
font-family: var(--font-monospace);
font-weight: normal;
}
}
/* Fonts used for external themes */
/* Material Design Themes */
@import url('https://fonts.googleapis.com/css2?family=Francois+One&family=Roboto:wght@300&display=swap');
/* Matrix, Hacker, Nerd Themes */
@import url('https://fonts.googleapis.com/css2?family=Cutive+Mono&family=VT323&display=swap');
/* Colourful */
@import url('https://fonts.googleapis.com/css2?family=Podkova:wght@500&display=swap');
/* Dracula */
@import url('https://fonts.googleapis.com/css2?family=Allerta+Stencil&display=swap');
/* Jam */
@import url('https://fonts.googleapis.com/css2?family=Sniglet&display=swap');

View File

@ -18,18 +18,19 @@ module.exports = {
'nord-frost', 'nord-frost',
'callisto', 'callisto',
'thebe', 'thebe',
'dracula',
'material', 'material',
'material-dark', 'material-dark',
'dracula', 'minimal-dark',
'minimal-light',
'material-2',
'colorful',
'matrix', 'matrix',
'matrix-red', 'matrix-red',
'hacker-girl', 'hacker-girl',
'bee', 'bee',
'raspberry-jam', 'raspberry-jam',
'tiger', 'tiger',
'colorful',
'minimal-dark',
'minimal-light',
'high-contrast-dark', 'high-contrast-dark',
'high-contrast-light', 'high-contrast-light',
], ],