Skip to content

Commit a01b6cd

Browse files
authored
Merge pull request #53 from increments/qiita/fix-sicebar-style
Fix sidebar link style and article tag style
2 parents 21cc2f1 + 17e53d8 commit a01b6cd

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

src/client/components/Article.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
Weight,
88
getSpace,
99
} from "../lib/variables";
10-
import { MaterialSymbol } from "./MaterialSymbol";
1110
import { QiitaMarkdownHtmlBody } from "./QiitaMarkdownHtmlBody";
1211
import { Slide } from "./Slide";
1312

@@ -25,12 +24,9 @@ export const Article = ({ renderedBody, tags, title, slide }: Props) => {
2524
<article css={containerStyle}>
2625
<h1 css={titleStyle}>{title}</h1>
2726
<div css={tagListWrapStyle}>
28-
<MaterialSymbol fill={true} css={{ color: Colors.mediumEmphasis }}>
29-
sell
30-
</MaterialSymbol>
3127
<ul css={tagListStyle}>
3228
{tags.map((tag, index) => (
33-
<li key={tag}>
29+
<li css={tagListItemStyle} key={tag}>
3430
<span>{tag}</span>
3531
{index !== tags.length - 1 && <span>,</span>}
3632
</li>
@@ -67,6 +63,14 @@ const tagListStyle = css({
6763
gap: getSpace(1),
6864
});
6965

66+
const tagListItemStyle = css({
67+
backgroundColor: Colors.surfaceVariant,
68+
borderRadius: 4,
69+
color: Colors.mediumEmphasis,
70+
fontSize: Typography.body2,
71+
padding: `0 ${getSpace(3 / 4)}px`,
72+
});
73+
7074
const bodyStyle = css({
7175
marginTop: getSpace(6),
7276
});

src/client/components/SidebarArticles.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const articleSummaryStyle = css({
9999
alignItems: "center",
100100
backgroundColor: "transparent",
101101
color: Colors.mediumEmphasis,
102+
cursor: "pointer",
102103
display: "flex",
103104
fontWeight: Weight.bold,
104105
fontSize: Typography.body2,
@@ -110,6 +111,7 @@ const articleSummaryStyle = css({
110111
...pointerFine({
111112
"&:hover": {
112113
backgroundColor: Colors.gray5,
114+
cursor: "pointer",
113115
textDecoration: "none",
114116
},
115117
}),

src/client/components/SidebarContents.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => {
219219
rel="noopener noreferrer"
220220
>
221221
コミュニティガイドライン
222+
<MaterialSymbol css={{ color: Colors.disabled }}>
223+
open_in_new
224+
</MaterialSymbol>
222225
</a>
223226
</li>
224227
<li>
@@ -229,6 +232,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => {
229232
rel="noopener noreferrer"
230233
>
231234
利用規約
235+
<MaterialSymbol css={{ color: Colors.disabled }}>
236+
open_in_new
237+
</MaterialSymbol>
232238
</a>
233239
</li>
234240
<li>
@@ -239,6 +245,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => {
239245
rel="noopener noreferrer"
240246
>
241247
プライバシーポリシー
248+
<MaterialSymbol css={{ color: Colors.disabled }}>
249+
open_in_new
250+
</MaterialSymbol>
242251
</a>
243252
</li>
244253
</ul>
@@ -395,6 +404,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => {
395404
rel="noopener noreferrer"
396405
>
397406
コミュニティガイドライン
407+
<MaterialSymbol css={{ color: Colors.disabled }}>
408+
open_in_new
409+
</MaterialSymbol>
398410
</a>
399411
</li>
400412
<li>
@@ -405,6 +417,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => {
405417
rel="noopener noreferrer"
406418
>
407419
利用規約
420+
<MaterialSymbol css={{ color: Colors.disabled }}>
421+
open_in_new
422+
</MaterialSymbol>
408423
</a>
409424
</li>
410425
<li>
@@ -415,6 +430,9 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => {
415430
rel="noopener noreferrer"
416431
>
417432
プライバシーポリシー
433+
<MaterialSymbol css={{ color: Colors.disabled }}>
434+
open_in_new
435+
</MaterialSymbol>
418436
</a>
419437
</li>
420438
</ul>
@@ -534,7 +552,7 @@ export const SidebarContents = ({ isStateOpen, handleMobileClose }: Props) => {
534552

535553
const sidebarStyle = css({
536554
height: "100vh",
537-
maxWidth: 360,
555+
width: 360,
538556
padding: `${getSpace(2)}px 0`,
539557
position: "sticky",
540558
top: 0,
@@ -632,6 +650,7 @@ const articlesListItemStyle = css({
632650
)}px ${getSpace(3 / 2)}px`,
633651
whiteSpace: "nowrap",
634652
textOverflow: "ellipsis",
653+
width: "100%",
635654

636655
...pointerFine({
637656
"&:hover": {
@@ -675,6 +694,9 @@ const articleFooterListStyle = css({
675694
});
676695

677696
const articleFooterListItemStyle = css({
697+
alignItems: "center",
698+
display: "flex",
699+
gap: getSpace(1),
678700
color: Colors.mediumEmphasis,
679701
fontSize: Typography.body3,
680702
});

0 commit comments

Comments
 (0)