1- import { css , otherThemeVars , themeVars } from "src/types/vars" ;
1+ import { fallbackVar } from "src/functions" ;
2+ import { css , customThemeVars , otherThemeVars , themeVars } from "src/types/vars" ;
3+
4+ const userRepoVar = fallbackVar ( customThemeVars . custom . userRepolistColumns , "2" ) ;
5+ const exploreRepoVar = fallbackVar ( customThemeVars . custom . explore . repolistColumns , "2" ) ;
6+ const orgRepoVar = fallbackVar ( customThemeVars . custom . org . repolistColumns , "1" ) ;
27
38// 仓库列表
4- export const repositoriesExplore = css `
5- // [TODO] 组织和用户使用 Github 的列表样式, 探索页面手机端样式待完善
9+ export const repoList = css `
610 // 组织
7- /* .page-content.organization.profile > .ui.container > .ui.stackable > .ui.eleven, */
11+ .page-content .organization .profile > .ui .container > .ui .stackable > .ui .eleven ,
812 // 用户
9- /* .page-content.user.profile > .ui.container > .ui.stackable > .ui.twelve, */
13+ .page-content .user .profile > .ui .container > .ui .stackable > .ui .twelve ,
1014 // 探索
1115 .page-content .explore .repositories > .ui .container {
1216 > .flex-list {
1317 display : grid;
14- grid-template-columns : repeat (2 , 1fr );
15- gap : 16px ;
16-
1718 > .flex-item {
1819 border : 1px solid ${ themeVars . color . light . border } ;
1920 border-radius : ${ otherThemeVars . border . radius } ;
@@ -46,7 +47,9 @@ export const repositoriesExplore = css`
4647 color : ${ themeVars . color . text . light . num1 } ;
4748 gap : 16px ;
4849 font-size : 12px ;
49- > .flex-text-inline .tw-mr-2 {
50+ > .flex-text-inline .color-icon {
51+ width : 12px ;
52+ height : 12px ;
5053 margin-right : 0 !important ;
5154 }
5255 }
@@ -67,4 +70,92 @@ export const repositoriesExplore = css`
6770 }
6871 }
6972 }
73+ // 仓库列表列数
74+ // 组织
75+ .page-content .organization .profile > .ui .container > .ui .stackable > .ui .eleven > .flex-list {
76+ grid-template-columns : repeat (${ orgRepoVar } , 1fr );
77+ gap : min (${ orgRepoVar } * 8px , 16px );
78+ }
79+ // 用户
80+ .page-content .user .profile > .ui .container > .ui .stackable > .ui .twelve > .flex-list {
81+ grid-template-columns : repeat (${ userRepoVar } , 1fr );
82+ gap : min (${ userRepoVar } * 8px , 16px );
83+ }
84+ // 探索
85+ .page-content .explore .repositories > .ui .container > .flex-list {
86+ grid-template-columns : repeat (${ exploreRepoVar } , 1fr );
87+ gap : min (${ exploreRepoVar } * 8px , 16px );
88+ }
89+ ` ;
90+
91+ const exploreUserVar = fallbackVar ( customThemeVars . custom . explore . userlistColumns , "3" ) ;
92+ const orgUserVar = fallbackVar ( customThemeVars . custom . org . userlistColumns , "2" ) ;
93+
94+ // 用户列表
95+ export const userList = css `
96+ // 组织
97+ .page-content .organization .members > .ui .container ,
98+ // 探索的用户和组织
99+ .page-content .explore .users > .ui .container {
100+ > .flex-list {
101+ display : grid;
102+ > .flex-item {
103+ border : 1px solid ${ themeVars . color . light . border } ;
104+ border-radius : ${ otherThemeVars . border . radius } ;
105+ padding : 16px ;
106+ > .flex-item-main {
107+ // 用户名称
108+ > .flex-item-title {
109+ gap : 8px ;
110+ margin-bottom : 8px ;
111+ // 用户标签
112+ > .label {
113+ font-size : 12px ;
114+ padding : 3px 6px ;
115+ }
116+ }
117+ // 用户描述
118+ > .flex-item-body {
119+ font-size : 12px ;
120+ svg {
121+ width : 12px ;
122+ min-width : 12px ;
123+ }
124+ }
125+ }
126+ }
127+ }
128+ }
129+ // 用户列表列数
130+ // 组织
131+ .page-content .organization .members > .ui .container > .flex-list {
132+ grid-template-columns : repeat (${ orgUserVar } , 1fr );
133+ gap : min (${ orgUserVar } * 8px , 16px );
134+ }
135+ // 探索的用户和组织
136+ .page-content .explore .users > .ui .container > .flex-list {
137+ grid-template-columns : repeat (${ exploreUserVar } , 1fr );
138+ gap : min (${ exploreUserVar } * 8px , 16px );
139+ }
140+ ` ;
141+
142+ // 手机下的仓库和用户列表
143+ export const mobileList = css `
144+ @media (max-width : 767.98px ) {
145+ // 组织的仓库列表
146+ .page-content .organization .profile > .ui .container > .ui .stackable > .ui .eleven ,
147+ // 用户的仓库列表
148+ .page-content .user .profile > .ui .container > .ui .stackable > .ui .twelve ,
149+ // 探索的仓库列表
150+ .page-content .explore .repositories > .ui .container ,
151+ // 组织的成员列表
152+ .page-content .organization .members > .ui .container ,
153+ // 探索的用户和组织列表
154+ .page-content .explore .users > .ui .container {
155+ > .flex-list {
156+ grid-template-columns : 1fr ;
157+ gap : 8px ;
158+ }
159+ }
160+ }
70161` ;
0 commit comments