plz / static / css / files.scss
217 lines · 187 sloc · 3.55 KB · 1fbadcea1b606763dc692b8ffd2f84b3648759cf
Raw
1/* Header for the file table (Last Commit Info) */
2.last_commit {
3 display: flex;
4 align-items: center;
5 justify-content: space-between;
6 padding: 10px 16px;
7 background-color: #f6f8fa;
8 border: 1px solid #e1e4e8;
9 border-top-left-radius: 6px;
10 border-top-right-radius: 6px;
11 border-bottom: none;
12 font-size: 13px;
13 color: #24292e;
14
15 .last_commit_message {
16 color: #586069;
17 margin-left: 8px;
18 flex: 1;
19 white-space: nowrap;
20 overflow: hidden;
21 text-overflow: ellipsis;
22 }
23
24 .last_commit_hash {
25 font-family: monospace;
26 color: #24292e;
27 background-color: transparent;
28 margin: 0 10px;
29 font-size: 12px;
30 }
31
32 .time {
33 color: #6a737d;
34 white-space: nowrap;
35 }
36}
37
38/* The File List Container */
39.files {
40 border: 1px solid #e1e4e8;
41 border-radius: 6px;
42 margin-bottom: 20px;
43}
44
45/* Individual File Row */
46.file {
47 display: grid;
48 /* Grid: Icon | Name | Message | Date */
49 grid-template-columns: 20px minmax(150px, 25%) 1fr 140px;
50 align-items: center;
51 padding: 8px 16px;
52 border-top: 1px solid #e1e4e8;
53 font-size: 14px;
54 line-height: 20px;
55 color: #24292e;
56 background-color: #fff;
57 transition: background-color 0.1s;
58
59 &:hover {
60 background-color: #f6f8fa;
61 }
62
63 /* Adjustments for first item if not using the last_commit header div
64 but assuming .files contains .last_commit followed by divs
65 */
66 &:last-child {
67 border-bottom-left-radius: 6px;
68 border-bottom-right-radius: 6px;
69 }
70}
71
72.files--with-size .file {
73 grid-template-columns: 20px minmax(150px, 25%) 1fr 140px 90px;
74}
75
76.files--with-size .file-size {
77 grid-column: 5;
78}
79
80.file.file-total {
81 grid-template-columns: 1fr auto;
82
83 &:hover {
84 background-color: #fff;
85 cursor: default;
86 }
87
88 .file-size {
89 grid-column: 2;
90 display: inline-flex;
91 align-items: center;
92 gap: 6px;
93 color: #24292e !important;
94 font-size: 14px;
95
96 svg {
97 fill: currentColor;
98 color: #6a737d;
99 width: 14px;
100 height: 14px;
101 }
102
103 b {
104 font-weight: 600;
105 }
106 }
107}
108
109.files--with-size .file.file-total {
110 grid-template-columns: 1fr auto;
111
112 .file-size {
113 grid-column: 2;
114 }
115}
116
117.files--top-files .file {
118 grid-template-columns: 20px minmax(0, 1fr) 110px;
119}
120
121.top-files-header {
122 display: flex;
123 align-items: center;
124 justify-content: space-between;
125 padding: 10px 16px;
126 background-color: #f6f8fa;
127 border-bottom: 1px solid #e1e4e8;
128 font-size: 13px;
129 color: #24292e;
130
131 span {
132 color: #6a737d;
133 }
134}
135
136.top-files-empty {
137 padding: 16px;
138 color: #6a737d;
139 background: #fff;
140}
141
142/* Responsive Grid for Mobile */
143@media (max-width: 768px) {
144 .file {
145 grid-template-columns: 20px 1fr;
146 gap: 5px;
147 }
148 .files--with-size .file {
149 grid-template-columns: 20px 1fr;
150 }
151 .files--top-files .file {
152 grid-template-columns: 20px 1fr;
153 }
154 .file-msg, .file-size, .file-time { display: none; }
155}
156
157/* Icon */
158.file-ico {
159 display: flex;
160 align-items: center;
161 justify-content: center;
162 color: #79b8ff; /* Folder blue */
163
164 svg {
165 fill: currentColor;
166 width: 14px;
167 height: 14px;
168 }
169}
170
171/* File Name */
172.file-name {
173 white-space: nowrap;
174 overflow: hidden;
175 text-overflow: ellipsis;
176 padding-right: 10px;
177
178 a {
179 color: #24292e !important;
180 font-weight: 400;
181
182 &:hover {
183 color: #0366d6 !important;
184 text-decoration: underline;
185 }
186 }
187}
188
189/* Commit Message */
190.file-msg {
191 color: #6a737d !important;
192 white-space: nowrap;
193 overflow: hidden;
194 text-overflow: ellipsis;
195 padding-right: 10px;
196
197 a {
198 color: #6a737d;
199 &:hover { color: #0366d6; }
200 }
201}
202
203/* Folder size */
204.file-size {
205 color: #6a737d !important;
206 text-align: right;
207 font-size: 13px;
208 white-space: nowrap;
209}
210
211/* Time */
212.file-time {
213 color: #6a737d !important;
214 text-align: right;
215 font-size: 13px;
216 padding-right: 10px;
217}
218