π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π UI work on section headers
Alicia Sykes241973769c0d
diff --git a/src/assets/locales/en.json b/src/assets/locales/en.jsonindex 27b3d9a2..bdb59bc3 100644--- a/src/assets/locales/en.json+++ b/src/assets/locales/en.json@@ -250,7 +250,8 @@"edit-section": "Edit","expand-collapse": "Expand / Collapse","move-section": "Move To",- "remove-section": "Remove"+ "remove-section": "Remove",+ "section-options": "Section Options"}},"footer": {diff --git a/src/components/LinkItems/Collapsable.vue b/src/components/LinkItems/Collapsable.vueindex 12905465..9e93dca9 100644--- a/src/components/LinkItems/Collapsable.vue+++ b/src/components/LinkItems/Collapsable.vue@@ -13,16 +13,20 @@v-model="checkboxState"tabIndex="-1">- <label :for="sectionKey" class="lbl-toggle" tabindex="-1"+ <div class="section-header"@mouseup.right="openContextMenu" @contextmenu.prevent@long-press="openContextMenu" v-longPress="500">+ <label :for="sectionKey" class="collapse-toggle"+ v-tooltip="toggleTooltip()" :aria-label="$t('context-menus.section.expand-collapse')">+ <span class="arrow" aria-hidden="true"></span>+ </label><Icon v-if="icon" :icon="icon" size="small" :url="title" class="section-icon" /><h3>{{ title }}</h3><EditModeIcon v-if="isEditMode" @click="openEditModal"- v-tooltip="editTooltip()" class="edit-mode-item" />+ v-tooltip="editTooltip()" class="header-action" /><OpenIcon @click.prevent.stop="openContextMenu" @contextmenu.prevent- class="edit-mode-item" />- </label>+ v-tooltip="optionsTooltip()" class="header-action" />+ </div><div class="collapsible-content"><div class="content-inner"><slot></slot>@@ -157,6 +161,12 @@ export default {const content = this.$t('interactive-editor.edit-section.edit-tooltip');return { content, delay: { show: 100, hide: 0 } };},+ toggleTooltip() {+ return { content: this.$t('context-menus.section.expand-collapse'), delay: { show: 200, hide: 0 } };+ },+ optionsTooltip() {+ return { content: this.$t('context-menus.section.section-options'), delay: { show: 200, hide: 0 } };+ },},};</script>@@ -198,43 +208,42 @@ export default {display: none;}- label.lbl-toggle {- outline: none;- display: block;+ .section-header {+ display: flex;+ align-items: center;padding: 0.25rem;+ color: var(--item-group-heading-text-color);+ border-radius: var(--curve-factor);+ h3 { flex: 1; margin: 0; padding: 0; }+ .section-icon { margin-right: 0.5rem; }+ }++ .collapse-toggle {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ width: 1.6rem;+ height: 1.6rem;cursor: pointer;border-radius: var(--curve-factor);- transition: all 0.25s ease-out;- text-align: left;- color: var(--item-group-heading-text-color);- h3 {- margin: 0;- padding: 0;- display: inline;- }- .section-icon {- display: inline;- margin-right: 0.5rem;- }- &:hover {- color: var(--item-group-heading-text-color-hover);- }- &::before {- content: ' ';- display: inline-block;+ transition: background 0.2s ease-out, opacity 0.2s ease-out;+ .arrow {+ width: 0;+ height: 0;border-top: 5px solid transparent;border-bottom: 5px solid transparent;- border-left: 5px solid currentColor;- vertical-align: middle;- margin-right: .7rem;- transform: translateY(-2px);- opacity: 0.3;- transition: all 0.4s ease-in-out;+ border-left: 6px solid currentColor;+ opacity: 0.5;+ transition: transform 0.3s ease-in-out;+ }+ &:hover, &:focus-visible {+ outline: none;+ background: var(--primary-transparent-60);+ .arrow { opacity: 1; }}}-- input.toggle:checked + .lbl-toggle::before {- transform: rotate(90deg) translateX(-3px);+ input.toggle:checked + .section-header .collapse-toggle .arrow {+ transform: rotate(90deg);}.collapsible-content {@@ -245,11 +254,11 @@ export default {border-radius: 0 0 var(--curve-factor) var(--curve-factor);}- input.toggle:checked + .lbl-toggle + .collapsible-content {+ input.toggle:checked + .section-header + .collapsible-content {max-height: var(--section-max-height);}- input.toggle:checked + .lbl-toggle {+ input.toggle:checked + .section-header {border-bottom-right-radius: 0;border-bottom-left-radius: 0;}@@ -258,24 +267,22 @@ export default {padding: 0.5rem;}- /* Section edit button, shown when in edit mode */- .edit-mode-item {+ /* Section edit buttons, pushed to the right by the flex-1 h3.+ * Shares hover styling with .collapse-toggle. */+ .header-action {+ box-sizing: content-box;width: 1rem;height: 1rem;- float: right;- right: 0.5rem;- top: 0.5rem;- margin-left: 0.2rem;- margin-right: 0.2rem;+ padding: 0.3rem;+ margin-left: 0.25rem;+ cursor: pointer;opacity: 0.3;- transition: all 0.4s ease-in-out;- }-- /* On section hover, set interface icons to full visible */- &:hover {- .edit-mode-item, label.lbl-toggle::before {+ border-radius: var(--curve-factor);+ transition: background 0.2s ease-out, opacity 0.2s ease-out;+ &:hover, &:focus-visible {+ outline: none;+ background: var(--primary-transparent-60);opacity: 1;- transition: all 0.2s ease-out;}}diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vueindex b4497e4e..a40e12a2 100644--- a/src/components/Widgets/WidgetBase.vue+++ b/src/components/Widgets/WidgetBase.vue@@ -237,27 +237,23 @@ export default {button.action-btn {height: 1rem;min-width: auto;- width: 1.75rem;+ width: 1.25rem;margin: 0;- padding: 0.1rem 0;+ padding: 0.25rem;position: absolute;top: 0;border: none;opacity: var(--dimming-factor);color: var(--widget-text-color);+ svg { width: 0.75rem; height: 0.75rem; }&:hover {opacity: 1;color: var(--widget-background-color);}- &.update-btn {- right: -0.25rem;- }-- &.open-btn {- right: 1.75rem;- }+ &.update-btn { right: -0.25rem; }+ &.open-btn { right: 1.25rem; }}// Optional widget labeldiff --git a/src/styles/color-themes.scss b/src/styles/color-themes.scssindex ac8676f4..3f28148b 100644--- a/src/styles/color-themes.scss+++ b/src/styles/color-themes.scss@@ -528,7 +528,7 @@ html[data-theme='minimal-light'], html[data-theme='minimal-dark'], html[data-themax-width: 100px;}- label.lbl-toggle h3 {+ .section-header h3 {font-size: 1.5rem;}.tile-title span.text {@@ -954,7 +954,7 @@ html[data-theme='minimal-dark'] {--about-page-background: var(--background);--about-page-color: var(--primary);- label.lbl-toggle h3 {+ .section-header h3 {font-size: 1.8rem;}@@ -1029,7 +1029,7 @@ html[data-theme='vaporware'] {.tile-title span.text {font-weight: normal;}- label.lbl-toggle h3 {+ .section-header h3 {font-size: 1.4rem;}footer {@@ -1357,28 +1357,28 @@ html[data-theme="dashy-docs"] {&:hover { box-shadow: 0 2px $second; }}// Section headings, nav bar items and minimal tabs- div.collapsable:nth-child(1n) label.lbl-toggle,+ div.collapsable:nth-child(1n) .section-header,.minimal-section-heading:nth-child(1n),a.nav-item:nth-child(1n) {@include make-colors(#db78fc, #b83ddd);--nav-link-background-color-hover: #db78fc;--nav-link-border-color-hover: #db78fc;}- div.collapsable:nth-child(2n) label.lbl-toggle,+ div.collapsable:nth-child(2n) .section-header,.minimal-section-heading:nth-child(2n),a.nav-item:nth-child(2n) {@include make-colors(#5c85f7, #3d48dd);--nav-link-background-color-hover: #5c85f7;--nav-link-border-color-hover: #5c85f7;}- div.collapsable:nth-child(3n) label.lbl-toggle,+ div.collapsable:nth-child(3n) .section-header,.minimal-section-heading:nth-child(3n),a.nav-item:nth-child(3n) {@include make-colors(#41ef90, #1e9554);--nav-link-background-color-hover: #41ef90;--nav-link-border-color-hover: #41ef90;}- div.collapsable:nth-child(4n) label.lbl-toggle,+ div.collapsable:nth-child(4n) .section-header,.minimal-section-heading:nth-child(4n),a.nav-item:nth-child(4n) {@include make-colors(#dcff5a, #ceb73f);@@ -1479,7 +1479,7 @@ html[data-theme="adventure"], html[data-theme="adventure-basic"] {background: none;}// Style overides- label.lbl-toggle h3 { font-size: 1.3rem; font-weight: bold; }+ .section-header h3 { font-size: 1.3rem; font-weight: bold; }.content-inner { border-top: 1px dashed var(--primary); }a.item.size-large:hover { border-left: 3px solid var(--white); }.item.size-large .tile-title p.description { height: 3rem; }@@ -1534,7 +1534,7 @@ html[data-theme="color-block"] {--widget-text-color: var(--white);// Style overrides- label.lbl-toggle h3 { font-size: 1.3rem; font-weight: bold; }+ .section-header h3 { font-size: 1.3rem; font-weight: bold; }.content-inner { border-top: 1px dashed var(--primary); }.item.size-large .tile-title p.description { height: 3rem; }.item, .nav-outer nav .nav-item { border-radius: 0; }@@ -1587,7 +1587,7 @@ html[data-theme="one-dark"] {--curve-factor-navbar: 6px;// Style overrides- label.lbl-toggle h3 { font-size: 1.3rem; font-weight: bold; }+ .section-header h3 { font-size: 1.3rem; font-weight: bold; }.content-inner { border-top: 1px dashed var(--primary); }.item.size-large .tile-title p.description { height: 3rem; }.item, .nav-outer nav .nav-item { border-radius: 0; }@@ -1682,7 +1682,7 @@ html[data-theme='lissy'] {transition: all 0.2s ease-in-out 0s;border: 1px solid #0000004d;- label.lbl-toggle h3 {+ .section-header h3 {font-weight: normal;}a.item p.description {@@ -1981,7 +1981,7 @@ html[data-theme="night-bat"] {--widget-text-color: var(--white);// Style overrides- label.lbl-toggle h3 { font-size: 1.3rem; font-weight: bold; }+ .section-header h3 { font-size: 1.3rem; font-weight: bold; }.content-inner { border-top: 1px dashed var(--primary); }.item.size-large .tile-title p.description { height: 3rem; }.item, .nav-outer nav .nav-item { border-radius: 1px; }@@ -2065,7 +2065,7 @@ html[data-theme='cherry-blossom'] {--side-bar-item-color: var(--top-color);--minimal-view-section-heading-background: var(--top-color);- label.lbl-toggle {+ .section-header {background: var(--top-color);padding: 0.5rem 0.25rem;min-height: 1.5rem;@@ -2164,7 +2164,7 @@ html[data-theme="tama"] {}// Style overides- label.lbl-toggle h3 { font-size: 1.3rem; font-weight: bold; }+ .section-header h3 { font-size: 1.3rem; font-weight: bold; }.content-inner { border-top: 1px dashed var(--primary); }.item.size-large .tile-title p.description { height: 3rem; }.is-collapsed {