π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:zap: Improved section and widget layout for Minimal view
Alicia Sykes25bc577fb178
diff --git a/src/components/MinimalView/MinimalHeading.vue b/src/components/MinimalView/MinimalHeading.vueindex 5b99c9f2..0a965bb3 100644--- a/src/components/MinimalView/MinimalHeading.vue+++ b/src/components/MinimalView/MinimalHeading.vue@@ -1,24 +1,33 @@<template><div- @click="selectSection(index)"- :class="`minimal-section-heading ${selected ? 'selected' : ''}`">- <h3>{{ title }}</h3>+ @click="selectSection(index)" v-tooltip="tooltip()"+ v-bind:class="{ selected: selected, 'minimal-section-heading': true, center: hideTitleText }">+ <Icon v-if="icon" :icon="icon" size="small" class="section-icon" />+ <h3 class="section-title" v-if="!hideTitleText">{{ title }}</h3></div></template><script>+import Icon from '@/components/LinkItems/ItemIcon.vue';export default {name: 'MinimalHeadings',+ components: { Icon },props: {index: Number,title: String,+ icon: String,selected: Boolean,+ hideTitleText: Boolean,},methods: {selectSection(index) {this.$emit('sectionSelected', index);},+ tooltip() {+ return this.hideTitleText+ ? { content: this.title, trigger: 'hover focus', delay: 250 } : null;+ },},};</script>@@ -28,23 +37,33 @@ export default {@import '@/styles/style-helpers.scss';div.minimal-section-heading {+ display: flex;cursor: pointer;- padding: 0.5rem 0.25rem;margin-bottom: 0;+ padding: 0.5rem 0.25rem;+ justify-content: flex-start;+ align-items: center;background: var(--minimal-view-section-heading-background);border: 1px solid var(--minimal-view-section-heading-color);border-bottom: none;border-radius: var(--curve-factor) var(--curve-factor) 0 0;- h3 {+ h3.section-title {margin: 0;color: var(--minimal-view-section-heading-color);}+ .section-icon {+ color: var(--minimal-view-section-heading-color);+ margin-right: 0.2rem;+ }&.selected {background: var(--minimal-view-section-heading-color);- h3 {+ h3.section-title, .section-icon {color: var(--minimal-view-section-heading-background);}}+ &.center {+ justify-content: center;+ }}</style>diff --git a/src/components/MinimalView/MinimalSection.vue b/src/components/MinimalView/MinimalSection.vueindex 706f58d8..6eb09341 100644--- a/src/components/MinimalView/MinimalSection.vue+++ b/src/components/MinimalView/MinimalSection.vue@@ -22,7 +22,7 @@@triggerModal="triggerModal"/></div>- <div v-if="widgets && (selected || showAll)">+ <div v-if="widgets && (selected && !showAll)" class="minimal-widget-wrap"><WidgetBasev-for="(widget, widgetIndx) in widgets":key="widgetIndx"@@ -125,6 +125,9 @@ export default {@include big-screen-up { --minimal-col-count: 6; }grid-template-columns: repeat(var(--minimal-col-count, 1), minmax(0, 1fr));}+ .minimal-widget-wrap {+ padding: 1rem;+ }&.selected {border: 1px solid var(--minimal-view-group-color);grid-column-start: span var(--col-count, 3);diff --git a/src/views/Minimal.vue b/src/views/Minimal.vueindex c71d57dc..6de1fcb9 100644--- a/src/views/Minimal.vue+++ b/src/views/Minimal.vue@@ -21,9 +21,11 @@:key="`heading-${index}`":index="index":title="section.name"+ :icon="section.icon":selected="selectedSection === index"@sectionSelected="sectionSelected"class="headings"+ :hideTitleText="sections.length > 8"/><!-- Section item groups --><MinimalSection