From 17e53d83cc5392cc40c6cf73b8151977dca932a8 Mon Sep 17 00:00:00 2001 From: Makoto Ogata Date: Mon, 21 Aug 2023 20:16:42 +0900 Subject: [PATCH] Fix sidebar link style and article tag style --- src/client/components/Article.tsx | 14 ++++++++----- src/client/components/SidebarArticles.tsx | 2 ++ src/client/components/SidebarContents.tsx | 24 ++++++++++++++++++++++- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/client/components/Article.tsx b/src/client/components/Article.tsx index 3ef343d..a6b014c 100644 --- a/src/client/components/Article.tsx +++ b/src/client/components/Article.tsx @@ -7,7 +7,6 @@ import { Weight, getSpace, } from "../lib/variables"; -import { MaterialSymbol } from "./MaterialSymbol"; import { QiitaMarkdownHtmlBody } from "./QiitaMarkdownHtmlBody"; import { Slide } from "./Slide"; @@ -25,12 +24,9 @@ export const Article = ({ renderedBody, tags, title, slide }: Props) => {

{title}

- - sell -
    {tags.map((tag, index) => ( -
  • +
  • {tag} {index !== tags.length - 1 && ,}
  • @@ -67,6 +63,14 @@ const tagListStyle = css({ gap: getSpace(1), }); +const tagListItemStyle = css({ + backgroundColor: Colors.surfaceVariant, + borderRadius: 4, + color: Colors.mediumEmphasis, + fontSize: Typography.body2, + padding: `0 ${getSpace(3 / 4)}px`, +}); + const bodyStyle = css({ marginTop: getSpace(6), }); diff --git a/src/client/components/SidebarArticles.tsx b/src/client/components/SidebarArticles.tsx index 82f47ba..e7d8e60 100644 --- a/src/client/components/SidebarArticles.tsx +++ b/src/client/components/SidebarArticles.tsx @@ -99,6 +99,7 @@ const articleSummaryStyle = css({ alignItems: "center", backgroundColor: "transparent", color: Colors.mediumEmphasis, + cursor: "pointer", display: "flex", fontWeight: Weight.bold, fontSize: Typography.body2, @@ -110,6 +111,7 @@ const articleSummaryStyle = css({ ...pointerFine({ "&:hover": { backgroundColor: Colors.gray5, + cursor: "pointer", textDecoration: "none", }, }), diff --git a/src/client/components/SidebarContents.tsx b/src/client/components/SidebarContents.tsx index 9abc9df..0c313f0 100644 --- a/src/client/components/SidebarContents.tsx +++ b/src/client/components/SidebarContents.tsx @@ -219,6 +219,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => { rel="noopener noreferrer" > コミュニティガイドライン + + open_in_new +
  • @@ -229,6 +232,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => { rel="noopener noreferrer" > 利用規約 + + open_in_new +
  • @@ -239,6 +245,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => { rel="noopener noreferrer" > プライバシーポリシー + + open_in_new +
@@ -395,6 +404,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => { rel="noopener noreferrer" > コミュニティガイドライン + + open_in_new +
  • @@ -405,6 +417,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => { rel="noopener noreferrer" > 利用規約 + + open_in_new +
  • @@ -415,6 +430,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => { rel="noopener noreferrer" > プライバシーポリシー + + open_in_new +
  • @@ -534,7 +552,7 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => { const sidebarStyle = css({ height: "100vh", - maxWidth: 360, + width: 360, padding: `${getSpace(2)}px 0`, position: "sticky", top: 0, @@ -632,6 +650,7 @@ const articlesListItemStyle = css({ )}px ${getSpace(3 / 2)}px`, whiteSpace: "nowrap", textOverflow: "ellipsis", + width: "100%", ...pointerFine({ "&:hover": { @@ -675,6 +694,9 @@ const articleFooterListStyle = css({ }); const articleFooterListItemStyle = css({ + alignItems: "center", + display: "flex", + gap: getSpace(1), color: Colors.mediumEmphasis, fontSize: Typography.body3, });