From: Arnaud Guéras Date: Wed, 20 Nov 2024 15:27:44 +0000 (+0100) Subject: fix cards and mobile nav X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7af08bb4ce076a4b10de72c4c1fcc038fa757d4c;p=www-xenproject-org.git fix cards and mobile nav Signed-off-by: Arnaud Guéras --- diff --git a/stories/molecules/Card.stories.js b/stories/molecules/Card.stories.js index 4e245e8..1015477 100644 --- a/stories/molecules/Card.stories.js +++ b/stories/molecules/Card.stories.js @@ -46,7 +46,7 @@ export const Card = { ${["", "card--news", "card--bg"].map( (cls) => html`
- +
Conversation Card ${cls.replace(/card--/g, "")}
aug, 5th 2024
@@ -62,7 +62,7 @@ export const Card = { by John Doe
- Join Join diff --git a/themes/xen-project/assets/css/molecules/buttons.scss b/themes/xen-project/assets/css/molecules/buttons.scss index 6df6e3f..65e8c81 100644 --- a/themes/xen-project/assets/css/molecules/buttons.scss +++ b/themes/xen-project/assets/css/molecules/buttons.scss @@ -70,7 +70,7 @@ &:hover, &.hover, - body .card:hover & { + body .card:not(:has(.card__actions a:nth-child(2))):hover & { --color-primary: var(--color-hover); --icon-left: 0.3em; } @@ -140,7 +140,7 @@ } &:hover::before, - body .card:hover &::before { + body .card:not(:has(.card__actions a:nth-child(2))):hover &::before { transform: scaleX(1); } } diff --git a/themes/xen-project/assets/css/molecules/card.scss b/themes/xen-project/assets/css/molecules/card.scss index ee404a7..4277bf7 100644 --- a/themes/xen-project/assets/css/molecules/card.scss +++ b/themes/xen-project/assets/css/molecules/card.scss @@ -23,7 +23,7 @@ flex-direction: column; gap: 10px; position: relative; - cursor: pointer; + //cursor: pointer; img { max-width: 100%; @@ -62,6 +62,13 @@ z-index: 1; } + &:has(.card__actions a:nth-child(2)) { + .card__link { + display: none; + } + /* some other styles are applied to the "card__actions a" in buttons.scss file */ + } + /* Pour que les autres liens restent cliquables */ &__tags a, &__author a, diff --git a/themes/xen-project/layouts/partials/card.html b/themes/xen-project/layouts/partials/card.html index 3794932..1f66b3f 100644 --- a/themes/xen-project/layouts/partials/card.html +++ b/themes/xen-project/layouts/partials/card.html @@ -3,7 +3,7 @@
- + {{ if .titleLevel }} {{ .title | safeHTML }} {{ else }} @@ -23,7 +23,7 @@ {{ .linkText | default $defaultLinkText }} {{ if .secondaryLink }} - + {{ .secondaryLinkText | default $defaultLinkText }} diff --git a/themes/xen-project/layouts/partials/latest-news.html b/themes/xen-project/layouts/partials/latest-news.html index 98f6834..95bf0b0 100644 --- a/themes/xen-project/layouts/partials/latest-news.html +++ b/themes/xen-project/layouts/partials/latest-news.html @@ -7,7 +7,7 @@