ggdgsdbsdbbb / static / css / tree.scss
571 lines · 496 sloc · 9.55 KB · 7257371492bbed5600bbea853f036419a452f290
Raw
1.repo-tabs {
2 position: fixed;
3 left: 5px;
4 top: 300px;
5 a { display: block; }
6}
7
8/* --- Main Layout Containers --- */
9
10.repo-header {
11 margin-bottom: 20px;
12}
13
14.repo-title-bar {
15 display: flex;
16 align-items: center;
17 flex-wrap: wrap;
18 gap: 8px;
19 min-height: 50px;
20}
21
22.repo-settings-link {
23 font-size: 14px;
24 line-height: 1;
25 margin-left: auto;
26}
27
28/* 1. The repo stats panel */
29.repo-stats {
30 display: flex;
31 flex-wrap: wrap;
32 align-items: center;
33 justify-content: space-evenly;
34 border: 1px solid #d8dee4;
35 border-radius: 5px;
36 background: #ffffff;
37 margin: 8px 0 10px;
38 min-height: 36px;
39 overflow: hidden;
40}
41
42.repo-stat-item {
43 display: flex;
44 align-items: center;
45 justify-content: center;
46 gap: 5px;
47 color: #111111 !important;
48 font-size: 14px !important;
49 font-weight: 600;
50 line-height: 20px;
51 min-width: 0;
52 padding: 7px 8px;
53 white-space: nowrap;
54
55 b {
56 font-weight: 700;
57 }
58
59 svg {
60 color: #111111;
61 flex: 0 0 auto;
62 height: 15px;
63 width: 15px;
64 }
65}
66
67a.repo-stat-item:hover {
68 background: #f6f8fa;
69 text-decoration: none;
70}
71
72@media (max-width: 760px) {
73 .repo-stats {
74 justify-content: space-around;
75 }
76}
77
78/* 2. The Control Bar (Branch, Code, Stars, Watch) */
79.repo-wrapper {
80 display: flex;
81 justify-content: space-between;
82 align-items: center;
83 margin-bottom: 15px;
84 flex-wrap: wrap;
85 gap: 10px;
86}
87
88.branch-specific-container {
89 display: flex;
90 align-items: center;
91 gap: 10px;
92 flex-wrap: wrap;
93}
94
95.add-file-btn {
96 display: inline-flex;
97 align-items: center;
98 justify-content: center;
99 width: 32px;
100 height: 32px;
101 background: #fafbfc;
102 border: 1px solid rgba(27, 31, 35, 0.15);
103 border-radius: 6px;
104 color: #24292e !important;
105 font-size: 18px;
106 font-weight: 400;
107 line-height: 1;
108 text-decoration: none;
109 cursor: pointer;
110
111 &:hover {
112 background: #2ea44f;
113 border-color: #2ea44f;
114 color: #fff !important;
115 }
116}
117
118/* Branch Select Dropdown */
119.branch-select {
120 appearance: none;
121 background-color: #fafbfc;
122 border: 1px solid rgba(27, 31, 35, 0.15);
123 border-radius: 6px;
124 color: #24292e;
125 cursor: pointer;
126 font-size: 14px;
127 font-weight: 500;
128 line-height: 20px;
129 max-width: 200px;
130 padding: 5px 35px 5px 12px;
131 text-overflow: ellipsis;
132 white-space: nowrap;
133 overflow: hidden;
134 background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
135 background-repeat: no-repeat;
136 background-position: right 8px center;
137 background-size: 10px;
138}
139
140.branches-link {
141 display: inline-flex;
142 align-items: center;
143 gap: 5px;
144 color: #24292e !important;
145 font-size: 14px;
146 font-weight: 500;
147 line-height: 20px;
148 padding: 5px 10px;
149 border: 1px solid rgba(27, 31, 35, 0.15);
150 border-radius: 6px;
151 background: #fafbfc;
152 white-space: nowrap;
153
154 svg {
155 color: #24292e;
156 height: 14px;
157 width: 14px;
158 flex: 0 0 auto;
159 }
160
161 b {
162 font-weight: 600;
163 }
164
165 &:hover {
166 background: #f3f4f6;
167 text-decoration: none;
168 }
169}
170
171.repo-mode-switch {
172 display: inline-flex;
173 align-items: center;
174 border: 1px solid rgba(27, 31, 35, 0.15);
175 border-radius: 6px;
176 overflow: hidden;
177 background: #ffffff;
178}
179
180.repo-mode-link {
181 display: inline-flex;
182 align-items: center;
183 height: 30px;
184 padding: 0 10px;
185 color: #24292e !important;
186 font-size: 13px !important;
187 line-height: 30px;
188 border-right: 1px solid rgba(27, 31, 35, 0.15);
189 white-space: nowrap;
190
191 &:last-child {
192 border-right: 0;
193 }
194
195 &.active {
196 background: #f6f8fa;
197 font-weight: 600;
198 }
199}
200
201a.repo-mode-link:hover {
202 background: #f6f8fa;
203 text-decoration: none;
204}
205
206/* --- Action Buttons (Code, Star, Watch) --- */
207
208.repo-code-container {
209 position: relative;
210}
211
212/* Green Code Button */
213.repo-code-button {
214 background-color: #2ea44f;
215 color: white;
216 padding: 5px 16px;
217 font-size: 14px;
218 font-weight: 600;
219 border: 1px solid rgba(27, 31, 35, 0.15);
220 border-radius: 6px;
221 cursor: pointer;
222 display: flex;
223 align-items: center;
224 justify-content: center;
225 transition: background-color 0.2s;
226
227 &:hover {
228 background-color: #2c974b;
229 }
230
231 &::after {
232 content: "";
233 display: inline-block;
234 width: 0;
235 height: 0;
236 margin-left: 5px;
237 vertical-align: middle;
238 border-top: 4px solid;
239 border-right: 4px solid transparent;
240 border-left: 4px solid transparent;
241 }
242}
243
244/* Clone Dropdown */
245.repo-clone-dropdown {
246 display: none;
247 position: absolute;
248 top: 100%;
249 right: 0;
250 margin-top: 4px;
251 padding: 16px;
252 background-color: #fff;
253 border: 1px solid #e1e4e8;
254 border-radius: 6px;
255 box-shadow: 0 8px 24px rgba(149, 157, 165, 0.2);
256 z-index: 100;
257 width: 300px;
258 color: #24292e;
259 font-size: 13px;
260
261 .clone-input-group {
262 display: flex;
263 margin-top: 8px;
264
265 input {
266 flex: 1;
267 font-family: monospace;
268 font-size: 12px;
269 padding: 5px;
270 border: 1px solid #e1e4e8;
271 border-radius: 4px 0 0 4px;
272 border-right: none;
273 background: #fafbfc;
274 }
275
276 button {
277 border-radius: 0 4px 4px 0;
278 background: #f6f8fa;
279 border: 1px solid #e1e4e8;
280 font-size: 12px;
281 padding: 5px 10px;
282 cursor: pointer;
283
284 &:hover {
285 background-color: #f3f4f6;
286 }
287 }
288 }
289}
290
291.repo-code-container:hover .repo-clone-dropdown {
292 display: block;
293}
294/* Repo Actions (Star / Watch buttons in the top bar) */
295.repo-actions {
296 display: flex;
297 align-items: center;
298 gap: 8px;
299 flex-wrap: wrap;
300
301 button {
302 display: inline-flex;
303 width: auto !important;
304 }
305}
306
307/* Two-column layout for the top of the repo (files + sidebar) */
308.repo-layout {
309 display: grid;
310 grid-template-columns: minmax(0, 1fr) 160px;
311 gap: 24px;
312 align-items: start;
313}
314
315.repo-main {
316 min-width: 0;
317}
318
319.repo-sidebar {
320 display: flex;
321 flex-direction: column;
322 gap: 24px;
323}
324
325.sidebar-section {
326 border-bottom: 1px solid #eaecef;
327 padding-bottom: 16px;
328
329 &:last-child {
330 border-bottom: 0;
331 padding-bottom: 0;
332 }
333}
334
335.sidebar-section-header {
336 display: flex;
337 align-items: center;
338 gap: 6px;
339 margin-bottom: 8px;
340
341 h3 {
342 font-size: 14px;
343 font-weight: 600;
344 color: #24292e;
345 margin: 0;
346
347 a {
348 color: inherit;
349 &:hover { color: #0366d6; text-decoration: none; }
350 }
351 }
352}
353
354.sidebar-count {
355 display: inline-flex;
356 align-items: center;
357 justify-content: center;
358 min-width: 18px;
359 height: 18px;
360 padding: 0 6px;
361 background: #eaecef;
362 color: #24292e;
363 border-radius: 9px;
364 font-size: 12px;
365 font-weight: 500;
366}
367
368.sidebar-description {
369 font-size: 14px;
370 color: #57606a;
371 margin: 0 0 12px;
372 line-height: 1.5;
373}
374
375.sidebar-description--empty {
376 font-style: italic;
377 color: #8b949e;
378}
379
380.sidebar-meta {
381 list-style: none;
382 padding: 0;
383 margin: 0;
384 display: flex;
385 flex-direction: column;
386 gap: 6px;
387
388 li {
389 display: flex;
390 align-items: center;
391 gap: 8px;
392 font-size: 13px;
393 color: #57606a;
394
395 svg {
396 color: #57606a;
397 flex: 0 0 auto;
398 }
399
400 a {
401 color: #57606a;
402 font-weight: 500;
403 &:hover { color: #0366d6; text-decoration: underline; }
404 }
405 }
406}
407
408.sidebar-empty {
409 font-size: 13px;
410 color: #8b949e;
411 margin: 0;
412 font-style: italic;
413}
414
415.sponsor-button {
416 display: inline-flex;
417 align-items: center;
418 gap: 6px;
419 padding: 5px 12px;
420 font-size: 13px;
421 font-weight: 500;
422 color: #24292e !important;
423 background: #fafbfc;
424 border: 1px solid rgba(27, 31, 35, 0.15);
425 border-radius: 6px;
426
427 &:hover {
428 background: #f3f4f6;
429 text-decoration: none;
430 }
431}
432
433.sidebar-release-latest {
434 display: flex;
435 flex-wrap: wrap;
436 align-items: center;
437 gap: 6px;
438 color: #24292e !important;
439
440 .sidebar-release-badge {
441 display: inline-flex;
442 align-items: center;
443 padding: 0 7px;
444 height: 20px;
445 background: #2ea44f;
446 color: #fff;
447 font-size: 11px;
448 font-weight: 600;
449 border-radius: 999px;
450 }
451
452 .sidebar-release-name {
453 font-weight: 600;
454 font-size: 14px;
455 }
456
457 .sidebar-release-date {
458 color: #57606a;
459 font-size: 12px;
460 flex-basis: 100%;
461 }
462
463 &:hover .sidebar-release-name {
464 color: #0366d6;
465 }
466}
467
468.sidebar-release-more {
469 display: inline-block;
470 margin-top: 8px;
471 font-size: 13px;
472 color: #0366d6;
473
474 &:hover { text-decoration: underline; }
475}
476
477.sidebar-contributors {
478 display: flex;
479 flex-wrap: wrap;
480 gap: 6px;
481}
482
483.sidebar-contributor {
484 display: inline-block;
485 width: 32px;
486 height: 32px;
487 border-radius: 50%;
488 overflow: hidden;
489 background: #f6f8fa;
490
491 img {
492 width: 100%;
493 height: 100%;
494 object-fit: cover;
495 display: block;
496 }
497}
498
499.sidebar-contributor--shadow {
500 cursor: default;
501}
502
503@media (max-width: 960px) {
504 .repo-layout {
505 grid-template-columns: minmax(0, 1fr);
506 }
507}
508
509/* Common style for Star/Watch buttons */
510.star-button, .watch-button {
511 display: inline-flex;
512 align-items: center;
513 padding: 3px 12px;
514 font-size: 12px;
515 font-weight: 500;
516 line-height: 20px;
517 color: #24292e;
518 background-color: #fafbfc;
519 border: 1px solid rgba(27, 31, 35, 0.15);
520 border-radius: 6px;
521 cursor: pointer;
522 transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);
523 transition-property: color, background-color, border-color;
524 margin-top: 0 !important; /* Override original */
525
526 &:hover {
527 background-color: #f3f4f6;
528 border-color: rgba(27, 31, 35, 0.15);
529 text-decoration: none;
530 }
531
532 svg {
533 height: 14px;
534 width: 14px;
535 margin-right: 4px;
536 fill: #6a737d;
537 }
538}
539
540/* --- Breadcrumbs --- */
541
542.tree-path {
543 font-size: 16px;
544 margin: 10px 0;
545 color: #586069;
546
547 a {
548 color: #0366d6;
549 &:hover { text-decoration: underline; }
550 }
551
552 /* Slash separator */
553 .slash {
554 color: #586069;
555 margin: 0 4px;
556 }
557}
558
559/* --- Readme Container --- */
560.readme {
561 border: 1px solid #e1e4e8;
562 border-radius: 6px;
563 padding: 32px;
564 margin-top: 24px;
565 background-color: #fff;
566
567 h1 { border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
568 code { background-color: rgba(27,31,35,.05); padding: 0.2em 0.4em; border-radius: 3px; border: none; }
569 pre code { padding: 16px; overflow: auto; line-height: 1.45; background-color: #f6f8fa; display: block; }
570 img { max-width: 100%; box-sizing: content-box; background-color: #fff; }
571}
572