From 7c016ac2e8e20acb4cc51972e5e7403d8bdc7fc1 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 20 Apr 2021 15:12:58 +0100 Subject: [PATCH] =?UTF-8?q?=EF=BF=BD=EF=BF=BD=20Refactor=20CSS=20to=20use?= =?UTF-8?q?=20constants=20for=20media=20queries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LinkItems/Item.vue | 18 +++++++++++------- src/components/LinkItems/ItemGroup.vue | 2 ++ src/components/LinkItems/ItemIcon.vue | 2 +- src/components/PageStrcture/Header.vue | 4 +++- src/components/PageStrcture/PageTitle.vue | 7 ++----- .../Settings/KeyboardShortcutInfo.vue | 4 +++- src/components/Settings/SettingsContainer.vue | 5 ++++- src/components/Settings/ThemeSelector.vue | 2 +- 8 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/components/LinkItems/Item.vue b/src/components/LinkItems/Item.vue index 39ed64ff..ed0928a0 100644 --- a/src/components/LinkItems/Item.vue +++ b/src/components/LinkItems/Item.vue @@ -3,18 +3,18 @@ :href="target !== 'iframe' ? url : '#'" :target="target === 'newtab' ? '_blank' : ''" :class="`item ${!icon? 'short': ''} size-${itemSize}`" - :id="`link-${id}`" v-tooltip="getTooltipOptions()" - rel="noopener noreferrer" - tabindex="0" + v-bind:style="customStyles" + rel="noopener noreferrer" tabindex="0" + :id="`link-${id}`" > -
+
{{ title }}
...
- + @@ -33,7 +33,8 @@ export default { subtitle: String, // Optional sub-text description: String, // Optional tooltip hover text icon: String, // Optional path to icon, within public/img/tile-icons - color: String, // Optional background color, specified in hex code + color: String, // Optional text and icon color, specified in hex code + backgroundColor: String, // Optional item background color url: String, // URL to the resource, optional but recommended target: { // Where resource will open, either 'newtab', 'sametab' or 'iframe' type: String, @@ -45,6 +46,10 @@ export default { data() { return { getId: this.id, + customStyles: { + color: this.color, + background: this.backgroundColor, + }, }; }, components: { @@ -132,7 +137,6 @@ export default { padding: 0; z-index: 2; span.text { - position: absolute; white-space: nowrap; transition: 1s; float: left; diff --git a/src/components/LinkItems/ItemGroup.vue b/src/components/LinkItems/ItemGroup.vue index d372cc62..681171f8 100644 --- a/src/components/LinkItems/ItemGroup.vue +++ b/src/components/LinkItems/ItemGroup.vue @@ -21,6 +21,8 @@ :description="item.description" :icon="item.icon" :target="item.target" + :color="item.color" + :backgroundColor="item.backgroundColor" :itemSize="newItemSize" @itemClicked="$emit('itemClicked')" @triggerModal="triggerModal" diff --git a/src/components/LinkItems/ItemIcon.vue b/src/components/LinkItems/ItemIcon.vue index 8fc49596..b3d7409c 100644 --- a/src/components/LinkItems/ItemIcon.vue +++ b/src/components/LinkItems/ItemIcon.vue @@ -1,5 +1,5 @@ diff --git a/src/components/PageStrcture/Header.vue b/src/components/PageStrcture/Header.vue index 5180f5d4..f154676f 100644 --- a/src/components/PageStrcture/Header.vue +++ b/src/components/PageStrcture/Header.vue @@ -31,6 +31,8 @@ export default {