From 7857fdcf719277081d3d13dd7721f1c8789d31c3 Mon Sep 17 00:00:00 2001 From: Yuriy Date: Mon, 30 Jun 2025 23:24:54 +0300 Subject: [PATCH 1/2] Update table widget with improved styling and functionality --- .../asset/ui/src/scss/_table-widget.scss | 92 ++++++++++--------- website/modules/table-widget/index.js | 10 +- .../modules/table-widget/views/widget.html | 8 +- 3 files changed, 53 insertions(+), 57 deletions(-) diff --git a/website/modules/asset/ui/src/scss/_table-widget.scss b/website/modules/asset/ui/src/scss/_table-widget.scss index a5612782..f9d92bda 100644 --- a/website/modules/asset/ui/src/scss/_table-widget.scss +++ b/website/modules/asset/ui/src/scss/_table-widget.scss @@ -37,8 +37,7 @@ padding: 24px; position: relative; overflow: hidden; - cursor: pointer; - background-color:$white; + background-color: $white; @include transition(all, 0.5s); transform: scale3d(1, 1, 1); @@ -48,7 +47,14 @@ .background-circle { display: none; - @include decorative-background-circle($gray-500, 25%, 130%, 100%, -100% -60% auto auto, -10); + @include decorative-background-circle( + $gray-500, + 25%, + 130%, + 100%, + -100% -60% auto auto, + -10 + ); } &:hover, @@ -63,7 +69,7 @@ } .sf-table-cell-description, - .sf-table-link a { + .sf-table-link { color: $gray-200; } @@ -85,10 +91,18 @@ } .background-circle { - @include decorative-background-circle($gray-500, 25%, 130%, 100%, -100% -60% auto auto, -10); + @include decorative-background-circle( + $gray-500, + 25%, + 130%, + 100%, + -100% -60% auto auto, + -10 + ); } - &:hover { + &:hover, + &:focus-visible { transform: scale3d(1.03, 1.03, 1); z-index: 10; border-color: black; @@ -99,7 +113,7 @@ } .sf-table-cell-description, - .sf-table-link a { + .sf-table-link { color: $gray-200; } @@ -112,24 +126,9 @@ &:focus-visible { transform: scale3d(1.02, 1.02, 1); - z-index: 10; - border-color: black; - - .sf-table-title, - .sf-table-cell-title { - color: $gray-100; - } - - .sf-table-cell-description, - .sf-table-link a { - color: $gray-200; - } .background-circle { display: block; - width: 150em; - height: 70em; - transform: translate3d(-5%, -10%, 0); } } @@ -161,49 +160,52 @@ } .sf-table-title { - font-weight: 700; - font-size: 18px; + font-weight: $font-weight-extra-bold; color: $gray-500; margin: 0; @include transition(color); - - @include breakpoint-medium { - font-size: 22px; - } + @include responsive-font(16px, 22px); + @include responsive-line-height(140%, 110%); } .sf-table-cell-description { border-bottom: none; - font-weight: 500; - font-size: 14px; + display: flex; + flex-direction: column; + height: 100%; color: $gray-300; + margin: 24px 0 0; @include transition(color); + @include font-settings(14px, 150%, $font-weight-normal); + + &:has(.sf-table-link) { + justify-content: space-between; + } + + &:not(:has(.sf-table-link)) { + justify-content: flex-start; + } p { - margin: 24px 0 0; + margin: 0; } + @include breakpoint-medium { - p { - margin: 32px 0 0; - min-height: 80px; - } + margin: 32px 0 0; } } .sf-table-link { margin-top: 24px; + color: $gray-300; + text-decoration: underline; + @include transition(color); + @include font-settings(11px, 120%, $font-weight-300); - a { - color: $gray-300; - text-decoration: underline; - font-weight: 300; - font-size: 11px; - @include transition(color); - - &:hover { - text-decoration: none; - } + &:hover { + text-decoration: none; } + @include breakpoint-medium { margin-top: 32px; } diff --git a/website/modules/table-widget/index.js b/website/modules/table-widget/index.js index 94c7205b..2762f09d 100644 --- a/website/modules/table-widget/index.js +++ b/website/modules/table-widget/index.js @@ -37,14 +37,8 @@ module.exports = { }, description: { label: 'Description', - type: 'area', - options: { - widgets: { - '@apostrophecms/rich-text': { - ...extendedToolbar, - }, - }, - }, + type: 'string', + textarea: true, required: true, }, ...linkSchema.fields.add, diff --git a/website/modules/table-widget/views/widget.html b/website/modules/table-widget/views/widget.html index 32268c1e..467fca1c 100644 --- a/website/modules/table-widget/views/widget.html +++ b/website/modules/table-widget/views/widget.html @@ -13,10 +13,10 @@

{{ row.title }}

- {% area row, 'description' %} +

{{ row.description }}

{% if row.linkTitle %} - + {% endif %}
From 4660e07e70c93a8f15273e809c63343382f365e7 Mon Sep 17 00:00:00 2001 From: Yuriy Date: Mon, 30 Jun 2025 23:43:16 +0300 Subject: [PATCH 2/2] Add correct links to learn more functionality in table widget --- website/modules/table-widget/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/website/modules/table-widget/index.js b/website/modules/table-widget/index.js index 2762f09d..751eb189 100644 --- a/website/modules/table-widget/index.js +++ b/website/modules/table-widget/index.js @@ -1,4 +1,3 @@ -const extendedToolbar = require('../../lib/extendedToolbar'); const headingToolbar = require('../../lib/headingToolbar'); const linkSchema = require('../../lib/linkSchema');