Skip to content

Commit 0dffbbd

Browse files
committed
add sidebar
1 parent 4c99811 commit 0dffbbd

6 files changed

Lines changed: 374 additions & 4 deletions

File tree

locales/en/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,8 @@
552552
"settings": "Settings",
553553
"post": "Post",
554554
"documentation": "Documentation",
555-
"forum": "Forum"
555+
"forum": "Forum",
556+
"notFound": "Not found"
556557
},
557558
"themeEditor": {
558559
"title": "Theme Editor",

locales/ja/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,8 @@
552552
"settings": "設定",
553553
"post": "投稿",
554554
"documentation": "ドキュメント",
555-
"forum": "フォーラム"
555+
"forum": "フォーラム",
556+
"notFound": "見つかりません"
556557
},
557558
"themeEditor": {
558559
"title": "テーマエディタ",

web/src/components/Sidebar.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { CssVar } from '../types/Theme'
1616

1717
import { SwitchAccountButton } from './SwitchAccountButton'
1818
import { ProfileName } from './ProfileName'
19+
import { SidebarLists } from './SidebarLists'
1920
import { useNavigate } from 'react-router-dom'
2021
import { useComposer } from '../contexts/Composer'
2122
import { semantics } from '@concrnt/worldlib'
@@ -109,7 +110,12 @@ export const Sidebar = () => {
109110
{t('settings')}
110111
</ListItem>
111112
</List>
112-
<div style={{ flex: 1 }} />
113+
<Divider
114+
style={{
115+
borderColor: CssVar.backdropText
116+
}}
117+
/>
118+
<SidebarLists />
113119
<Button
114120
onClick={() => {
115121
const home = semantics.homeTimeline(client.ccid, client.currentProfile)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* スクロールバーはhover中のみ表示する(グローバルのthumb色を上書き) */
2+
.scroll {
3+
scrollbar-width: thin;
4+
scrollbar-color: transparent transparent;
5+
}
6+
7+
.scroll:hover {
8+
scrollbar-color: color-mix(in srgb, var(--backdrop-text) 20%, transparent) transparent;
9+
}
10+
11+
.scroll::-webkit-scrollbar-thumb {
12+
background-color: transparent;
13+
}
14+
15+
.scroll:hover::-webkit-scrollbar-thumb {
16+
background-color: color-mix(in srgb, var(--backdrop-text) 20%, transparent);
17+
}
18+
19+
/* アイコン付きリスト行: hoverでアイコンから展開矢印にフェード切替 */
20+
.iconStack {
21+
position: relative;
22+
width: 24px;
23+
height: 24px;
24+
display: flex;
25+
align-items: center;
26+
justify-content: center;
27+
}
28+
29+
.fadeIcon {
30+
position: absolute;
31+
display: flex;
32+
align-items: center;
33+
transition: opacity 0.2s;
34+
}
35+
36+
.fadeArrow {
37+
position: absolute;
38+
opacity: 0;
39+
transition:
40+
transform 0.2s,
41+
opacity 0.2s;
42+
}
43+
44+
.iconStack:hover .fadeIcon {
45+
opacity: 0;
46+
}
47+
48+
.iconStack:hover .fadeArrow {
49+
opacity: 1;
50+
}

0 commit comments

Comments
 (0)