From 4d8e89201a20cdb75dada548c4befca0212f27bd Mon Sep 17 00:00:00 2001 From: Igor Lobanov Date: Mon, 13 Nov 2023 19:56:47 +0100 Subject: [PATCH] lint --- src/components/Article/Article.module.scss | 6 ++++-- src/components/Article/Comment/Comment.module.scss | 2 +- src/components/Author/AuthorBadge/AuthorBadge.tsx | 4 ++-- src/components/Author/AuthorCard/AuthorCard.tsx | 12 +++++++----- .../Editor/EditorFloatingMenu/EditorFloatingMenu.tsx | 2 +- .../SocialNetworkInput.module.scss | 2 ++ .../_shared/SolidSwiper/Swiper.module.scss | 10 +++++----- 7 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/components/Article/Article.module.scss b/src/components/Article/Article.module.scss index ed15b000..8216369c 100644 --- a/src/components/Article/Article.module.scss +++ b/src/components/Article/Article.module.scss @@ -75,6 +75,7 @@ img { &[data-float='left'], &[data-float='right'] { @include font-size(2.2rem); + line-height: 1.4; @include media-breakpoint-up(sm) { @@ -423,7 +424,7 @@ img { } .shoutStatsItemViews { - color: rgb(0 0 0 / 0.4); + color: rgb(0 0 0 / 40%); cursor: default; font-weight: normal; margin-left: auto; @@ -466,7 +467,8 @@ img { .shoutStatsItemAdditionalDataItem { font-weight: normal; display: inline-block; - //margin-left: 2rem; + + // margin-left: 2rem; margin-right: 0; margin-bottom: 0; cursor: default; diff --git a/src/components/Article/Comment/Comment.module.scss b/src/components/Article/Comment/Comment.module.scss index e16db64f..168ae67c 100644 --- a/src/components/Article/Comment/Comment.module.scss +++ b/src/components/Article/Comment/Comment.module.scss @@ -4,7 +4,7 @@ transition: background-color 0.3s; position: relative; list-style: none; - background: rgb(0 0 0 / 0.1); + background: rgb(0 0 0 / 10%); @include media-breakpoint-down(sm) { padding-right: 0; diff --git a/src/components/Author/AuthorBadge/AuthorBadge.tsx b/src/components/Author/AuthorBadge/AuthorBadge.tsx index 74b49154..5c9683f1 100644 --- a/src/components/Author/AuthorBadge/AuthorBadge.tsx +++ b/src/components/Author/AuthorBadge/AuthorBadge.tsx @@ -64,7 +64,7 @@ export const AuthorBadge = (props: Props) => { return isSubscribing() ? t('subscribing...') : t('Subscribe') }) - const unsubscribeValue = () => { + const unsubscribeValue = createMemo(() => { if (props.iconButtons) { return } @@ -75,7 +75,7 @@ export const AuthorBadge = (props: Props) => { {t('Unfollow')} ) - } + }) return (
diff --git a/src/components/Author/AuthorCard/AuthorCard.tsx b/src/components/Author/AuthorCard/AuthorCard.tsx index 432bc5ef..62c7856b 100644 --- a/src/components/Author/AuthorCard/AuthorCard.tsx +++ b/src/components/Author/AuthorCard/AuthorCard.tsx @@ -97,20 +97,22 @@ export const AuthorCard = (props: Props) => { } }) - const followButtonText = () => { + const followButtonText = createMemo(() => { if (isSubscribing()) { return t('subscribing...') - } else if (subscribed()) { + } + + if (subscribed()) { return ( <> {t('Following')} {t('Unfollow')} ) - } else { - return t('Follow') } - } + + return t('Follow') + }) return (
diff --git a/src/components/Editor/EditorFloatingMenu/EditorFloatingMenu.tsx b/src/components/Editor/EditorFloatingMenu/EditorFloatingMenu.tsx index 3c03dfce..eca9335a 100644 --- a/src/components/Editor/EditorFloatingMenu/EditorFloatingMenu.tsx +++ b/src/components/Editor/EditorFloatingMenu/EditorFloatingMenu.tsx @@ -1,5 +1,5 @@ import { createEffect, createSignal, Show } from 'solid-js' -import type { Editor, JSONContent } from '@tiptap/core' +import type { Editor } from '@tiptap/core' import { Icon } from '../../_shared/Icon' import { InlineForm } from '../InlineForm' import styles from './EditorFloatingMenu.module.scss' diff --git a/src/components/_shared/SocialNetworkInput/SocialNetworkInput.module.scss b/src/components/_shared/SocialNetworkInput/SocialNetworkInput.module.scss index 65401cdf..29728c4a 100644 --- a/src/components/_shared/SocialNetworkInput/SocialNetworkInput.module.scss +++ b/src/components/_shared/SocialNetworkInput/SocialNetworkInput.module.scss @@ -40,8 +40,10 @@ width: 54px; height: 54px; padding: 16px; + &:hover { background: var(--background-color-invert); + img { filter: invert(1); } diff --git a/src/components/_shared/SolidSwiper/Swiper.module.scss b/src/components/_shared/SolidSwiper/Swiper.module.scss index 648ca264..e953b565 100644 --- a/src/components/_shared/SolidSwiper/Swiper.module.scss +++ b/src/components/_shared/SolidSwiper/Swiper.module.scss @@ -38,8 +38,8 @@ } .container { - margin: auto; // max-width: 800px; + margin: auto; position: relative; padding: 24px 0; display: flex; @@ -177,12 +177,12 @@ } &.prev { - background-image: linear-gradient(to right, #000, rgb(0 0 0 / 0)); + background-image: linear-gradient(to right, #000, rgb(0 0 0 / 0%)); left: 0; } &.next { - background-image: linear-gradient(to left, #000, rgb(0 0 0 / 0)); + background-image: linear-gradient(to left, #000, rgb(0 0 0 / 0%)); justify-content: end; right: 0; } @@ -239,11 +239,11 @@ height: auto; &.prev { - left: -var(--navigation-reserve); + left: calc(0px - var(--navigation-reserve)); } &.next { - right: -var(--navigation-reserve); + right: calc(0px - var(--navigation-reserve)); } }