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 67199e03..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; 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/Item.vue b/src/components/LinkItems/Item.vue index 54a968a3..22288e09 100644 --- a/src/components/LinkItems/Item.vue +++ b/src/components/LinkItems/Item.vue @@ -12,6 +12,7 @@
{{ title }}
...
+

{{ description }}

@@ -205,7 +206,7 @@ export default { } .tile-title { height: fit-content; - min-height: 1rem; + min-height: 1.2rem; span.text { text-align: left; padding-left: 10%; @@ -228,6 +229,10 @@ export default { &.size-large { height: 100px; } + + p.description { + display: none; + } } diff --git a/src/components/LinkItems/ItemGroup.vue b/src/components/LinkItems/ItemGroup.vue index 2c8a420b..45f1044b 100644 --- a/src/components/LinkItems/ItemGroup.vue +++ b/src/components/LinkItems/ItemGroup.vue @@ -126,5 +126,19 @@ export default { @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); } + } +} diff --git a/src/components/Settings/ItemSizeSelector.vue b/src/components/Settings/ItemSizeSelector.vue index 8d72ebe5..ea59ce7b 100644 --- a/src/components/Settings/ItemSizeSelector.vue +++ b/src/components/Settings/ItemSizeSelector.vue @@ -3,11 +3,11 @@ Icon Size
+ :class="`layout-icon ${iconSize === 'small' ? 'selected' : ''}`" tabindex="-2" /> + :class="`layout-icon ${iconSize === 'medium' ? 'selected' : ''}`" tabindex="-2" /> + :class="`layout-icon ${iconSize === 'large' ? 'selected' : ''}`" tabindex="-2" />
diff --git a/src/components/Settings/LayoutSelector.vue b/src/components/Settings/LayoutSelector.vue index 46879171..522a9443 100644 --- a/src/components/Settings/LayoutSelector.vue +++ b/src/components/Settings/LayoutSelector.vue @@ -3,11 +3,11 @@ Layout
+ :class="`layout-icon ${displayLayout === 'auto' ? 'selected' : ''}`" tabindex="-2" /> + :class="`layout-icon ${displayLayout === 'horizontal' ? 'selected' : ''}`" tabindex="-2" /> + :class="`layout-icon ${displayLayout === 'vertical' ? 'selected' : ''}`" tabindex="-2" />
diff --git a/src/components/Settings/SearchBar.vue b/src/components/Settings/SearchBar.vue index 6c4714c7..95a9e6dc 100644 --- a/src/components/Settings/SearchBar.vue +++ b/src/components/Settings/SearchBar.vue @@ -5,7 +5,7 @@ id="filter-tiles" v-model="input" ref="filter" - placeholder="Start typing to filter tiles..." + placeholder="Start typing to filter..." v-on:input="userIsTypingSomething" @keydown.esc="clearFilterInput" />
- Themes + Theme
diff --git a/src/styles/color-themes.scss b/src/styles/color-themes.scss index 79cf4188..330e7057 100644 --- a/src/styles/color-themes.scss +++ b/src/styles/color-themes.scss @@ -7,6 +7,8 @@ html[data-theme='callisto'] { --item-background-hover: #060913; --item-hover-shadow: 0 1px 3px #00ccb4b3, 0 1px 2px #00ccb4bf; --primary: #00CCB4; + --font-body: 'Inconsolata', 'Georgia', sans-serif; + --font-headings: 'PTMono', 'Courier New', monospace; } html[data-theme='thebe'] { @@ -19,9 +21,11 @@ html[data-theme='thebe'] { --primary: #9660ec; --item-group-outer-background: #9660EC linear-gradient(45deg, #9660ec 2%,#5f60ea 51%,#9660ec 100%); + --font-headings: 'PTMono', 'Courier New', monospace; } html[data-theme='dracula'] { + --font-headings: 'Allerta Stencil', sans-serif; --background: #44475a; --background-darker: #282a36; --item-group-background: #282a36; @@ -43,6 +47,7 @@ html[data-theme='bee'] { --item-background: #1c2636; --item-group-background: #0b1021; --nav-link-background-color: #0b1021; + --font-headings: 'Sniglet', cursive; } html[data-theme='raspberry-jam'] { @@ -52,6 +57,7 @@ html[data-theme='raspberry-jam'] { --nav-link-background-color: #0b1021; --config-code-background: #0b1021; --config-code-color: #eb2d6c; + --font-headings: 'Sniglet', cursive; } html[data-theme='tiger'] { @@ -59,6 +65,7 @@ html[data-theme='tiger'] { --item-background: #1c2636; --item-group-background: #0b1021; --nav-link-background-color: #0b1021; + --font-headings: 'Sniglet', cursive; } html[data-theme='matrix-red'] { @@ -67,6 +74,8 @@ html[data-theme='matrix-red'] { --primary: red; --outline-color: red; --curve-factor: 0px; + --font-body: 'Cutive Mono', monospace; + --font-headings: 'VT323', monospace; } html[data-theme='matrix'] { @@ -75,6 +84,8 @@ html[data-theme='matrix'] { --primary: #2bca2b; --outline-color: #2bca2b; --curve-factor: 0px; + --font-body: 'Cutive Mono', monospace; + --font-headings: 'VT323', monospace; } html[data-theme='hacker-girl'] { @@ -83,6 +94,8 @@ html[data-theme='hacker-girl'] { --primary: #e435f1; --outline-color: #e435f1; --curve-factor: 0px; + --font-body: 'Cutive Mono', monospace; + --font-headings: 'VT323', monospace; } html[data-theme='high-contrast-light'] { @@ -94,6 +107,7 @@ html[data-theme='high-contrast-light'] { --outline-color: #000; --curve-factor: 0px; --config-code-color: #000; + --font-headings: 'PTMono', 'Courier New', monospace; } html[data-theme='high-contrast-dark'] { @@ -103,6 +117,7 @@ html[data-theme='high-contrast-dark'] { --primary: #fff; --outline-color: #fff; --curve-factor: 0px; + --font-headings: 'PTMono', 'Courier New', monospace; } html[data-theme='nord'] { @@ -135,7 +150,9 @@ html[data-theme='material'] { --background: #e2e1e0; --background-darker: #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-hover: #fff; --settings-background: #29B6F6; @@ -151,6 +168,10 @@ html[data-theme='material'] { --welcome-popup-background: #01579b; --welcome-popup-text-color: #ffffff; --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'] { @@ -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'] { + --font-headings: 'Podkova', monospace; --primary: #e8eae1; --background: #0b1021; --item-background: #05070e; @@ -215,33 +337,19 @@ html[data-theme='colorful'] { svg path { fill: #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'] { - .item-group-container:not(.item-size-small):not(.orientation-vertical) { - 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); } - } - .collapsable { - border-bottom: 1px dashed #ffffff38; - border-radius: 0; - } - } - + --font-body: 'PTMono-Regular', 'Courier New', monospace; + --font-headings: 'PTMono-Regular', 'Courier New', monospace; label.lbl-toggle h3 { font-size: 1.8rem; } .tile-title span.text { - font-size: 1.2rem; + font-size: 1.1rem; font-weight: bold; } @@ -261,7 +369,10 @@ html[data-theme='minimal-light'], html[data-theme='minimal-dark'] { box-shadow: none; } } - + .item-group-container.orientation-horizontal .collapsable { + border-bottom: 1px dashed #ffffff38; + border-radius: 0; + } } html[data-theme='minimal-light'] { @@ -296,12 +407,12 @@ html[data-theme='minimal-light'] { html[data-theme='minimal-dark'] { --primary: #a5a5a5; --background: #14171e; - --background-darker: #000; + --background-darker: #090b0e; --item-group-outer-background: none; --item-group-shadow: none; --item-group-background: none; --item-background: none; - --item-background-hover: #14171e; + --item-background-hover: #090b0e; --item-shadow: none; --item-hover-shadow: none; --item-text-color: #fff; diff --git a/src/styles/global-styles.scss b/src/styles/global-styles.scss index c28c3adf..d82ee309 100644 --- a/src/styles/global-styles.scss +++ b/src/styles/global-styles.scss @@ -1,25 +1,14 @@ @import '@/styles/style-helpers.scss'; -@font-face { - font-family: 'Inconsolata'; - src: url('./assets/fonts/Inconsolata-Light.ttf'); -} - html { - margin: 0; - padding: 0; - transition: all 1s; - margin-top: -3px; - @extend .scroll-bar; -} - -/* Default app font face */ -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; + margin: 0; + padding: 0; + transition: all 1s; + margin-top: -3px; + @extend .scroll-bar; + box-sizing: border-box; + input[type=button], button, a { + cursor: pointer; + } } diff --git a/src/styles/typography.scss b/src/styles/typography.scss new file mode 100644 index 00000000..9f5d4f83 --- /dev/null +++ b/src/styles/typography.scss @@ -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'); \ No newline at end of file diff --git a/src/utils/defaults.js b/src/utils/defaults.js index e159aebf..017b786e 100644 --- a/src/utils/defaults.js +++ b/src/utils/defaults.js @@ -18,18 +18,19 @@ module.exports = { 'nord-frost', 'callisto', 'thebe', + 'dracula', 'material', 'material-dark', - 'dracula', + 'minimal-dark', + 'minimal-light', + 'material-2', + 'colorful', 'matrix', 'matrix-red', 'hacker-girl', 'bee', 'raspberry-jam', 'tiger', - 'colorful', - 'minimal-dark', - 'minimal-light', 'high-contrast-dark', 'high-contrast-light', ],