File tree 2 files changed +60
-1
lines changed
app/(default)/r/[owner]/[repo]/(default)
2 files changed +60
-1
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,15 @@ import {FileAction} from "@/component/repo/fileaction";
11
11
import { Loader } from "@mantine/core" ;
12
12
import dayjs from "dayjs" ;
13
13
import relativeTime from "dayjs/plugin/relativeTime" ;
14
+ import { RepoIntro } from "@/component/repo/repointro" ;
14
15
15
16
dayjs . extend ( relativeTime ) ;
16
17
17
18
18
19
export default function RepositoryPage ( ) {
19
20
const [ Repo , setRepo ] = useState < Repository | undefined > ( )
20
21
const [ Loading , setLoading ] = useState ( false ) ;
21
- const [ Tab , setTab ] = useState ( '' ) ;
22
+ const [ Tab , setTab ] = useState ( 'intro ' ) ;
22
23
const [ Owner , setOwner ] = useState ( {
23
24
owner : '' ,
24
25
repo : ''
@@ -188,6 +189,13 @@ export default function RepositoryPage() {
188
189
</ div >
189
190
)
190
191
}
192
+ {
193
+ Tab === 'intro' && (
194
+ < div className = "intro-page" >
195
+ < RepoIntro repo = { Repo } owner = { Owner . owner } branch = { DefaultBranch } head = { HeadCommit } />
196
+ </ div >
197
+ )
198
+ }
191
199
</ >
192
200
)
193
201
}
Original file line number Diff line number Diff line change 124
124
flex-direction : column;
125
125
gap : 1rem ;
126
126
}
127
+ }
128
+
129
+ .repo-intro {
130
+ display : flex;
131
+ .repo-readme {
132
+ width : auto;
133
+ }
134
+ .repo-intro-card {
135
+ @media screen and (max-width : 1500px ) {
136
+ display : none;
137
+ }
138
+ border : 1px # dddddd solid;
139
+ border-top : none;
140
+ min-width : 360px ;
141
+ max-height : 60vh ;
142
+ .clone-url {
143
+ padding : 0.25rem ;
144
+ }
145
+ .repo-intro-card-title {
146
+ padding : 1rem ;
147
+ h1 {
148
+ font-size : 1.5rem ;
149
+ }
150
+ span {
151
+ font-size : 1rem ;
152
+ }
153
+ }
154
+ .repo-intro-card-list {
155
+ display : flex;
156
+ flex-direction : column;
157
+ gap : 0.25rem ;
158
+ justify-content : flex-start;
159
+ padding : 0.5rem 0.25rem ;
160
+ max-width : 45% ;
161
+ }
162
+
163
+ .repo-intro-card-list-item {
164
+ display : flex;
165
+ justify-content : space-between;
166
+ align-items : center;
167
+ }
168
+
169
+ .repo-intro-card-list-item a {
170
+ color : # 0087ed ;
171
+ cursor : pointer;
172
+ }
173
+
174
+ .repo-intro-card-list-item span {
175
+ font-size : 1rem ;
176
+ }
177
+ }
127
178
}
You can’t perform that action at this time.
0 commit comments