-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcontent.css
More file actions
344 lines (303 loc) · 6.78 KB
/
content.css
File metadata and controls
344 lines (303 loc) · 6.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
/* ============================================================
LinuxDo Star - Content Styles
Design System:
- Primary accent: #f5a623 (amber/gold) for stars
- Header gradient: #667eea → #764ba2 (purple-blue)
- Font: inherit from Discourse (system font stack)
- Spacing: 4px base unit
- Border-radius: 4px (match Discourse)
- Transitions: 200ms ease (micro-interactions)
============================================================ */
/* ===== Star Button - Matches Discourse native btn style ===== */
.ld-star-btn.btn.btn-icon.btn-flat {
/* Inherit Discourse's btn-flat sizing/spacing */
position: relative;
/* Ensure the entire button area is clickable */
cursor: pointer;
}
/* Make sure all child elements pass clicks to the button */
.ld-star-btn * {
pointer-events: none;
}
/* Star icon - match Discourse icon sizing */
.ld-star-btn .ld-star-icon {
width: 1em;
height: 1em;
transition: transform 200ms ease;
}
/* Unstarred: gray like other icons */
.ld-star-btn .ld-star-icon path {
fill: none;
stroke: var(--primary-medium, #919191);
stroke-width: 1.5;
stroke-linejoin: round;
transition: fill 200ms ease, stroke 200ms ease;
}
.ld-star-btn:hover .ld-star-icon path {
stroke: #eab308;
fill: rgba(234, 179, 8, 0.1);
}
/* Starred state */
.ld-star-btn.ld-star-active .ld-star-icon path {
fill: #eab308;
stroke: #eab308;
}
.ld-star-btn.ld-star-active:hover .ld-star-icon path {
fill: #ca8a04;
stroke: #ca8a04;
}
/* Pop animation on star */
@keyframes ld-star-pop {
0% { transform: scale(1); }
40% { transform: scale(1.35); }
70% { transform: scale(0.9); }
100% { transform: scale(1); }
}
.ld-star-btn.ld-star-just-activated .ld-star-icon {
animation: ld-star-pop 350ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
/* ===== Topic Title Star (standalone, not in action bar) ===== */
.ld-star-topic-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
margin-left: 6px;
vertical-align: middle;
background: transparent;
border: none;
border-radius: 4px;
cursor: pointer;
padding: 0;
transition: background 150ms ease;
}
.ld-star-topic-btn * { pointer-events: none; }
.ld-star-topic-btn:hover {
background: rgba(234, 179, 8, 0.1);
}
.ld-star-topic-btn .ld-star-icon {
width: 20px;
height: 20px;
}
/* ===== Cascade Indicator (blue dot) ===== */
.ld-star-btn.ld-star-cascade::after {
content: '';
position: absolute;
top: 4px;
right: 4px;
width: 6px;
height: 6px;
background: #667eea;
border-radius: 50%;
border: 1px solid white;
}
/* ===== Collection Picker Popup ===== */
.ld-star-popup {
background: #ffffff;
border: 1px solid #e4e4e7;
border-radius: 8px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
min-width: 200px;
max-width: 260px;
padding: 4px;
animation: ld-popup-in 150ms ease;
font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
display: flex;
flex-direction: column;
}
@keyframes ld-popup-in {
from { opacity: 0; transform: translateY(-4px); }
to { opacity: 1; transform: translateY(0); }
}
.ld-star-popup-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 10px 2px;
font-size: 11px;
font-weight: 600;
color: #a1a1aa;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.ld-star-popup-total {
font-weight: 400;
text-transform: none;
letter-spacing: 0;
}
/* Search in popup */
.ld-star-popup-search-wrap {
padding: 4px 6px;
}
.ld-star-popup-search {
width: 100%;
height: 28px;
padding: 0 8px;
border: 1px solid #e4e4e7;
border-radius: 5px;
font-size: 12px;
color: #09090b;
outline: none;
background: #fafafa;
transition: border-color 100ms;
}
.ld-star-popup-search:focus {
border-color: #a1a1aa;
background: #fff;
}
.ld-star-popup-search::placeholder {
color: #a1a1aa;
}
/* Scrollable list */
.ld-star-popup-list {
max-height: 200px;
overflow-y: auto;
padding: 2px 0;
}
.ld-star-popup-list::-webkit-scrollbar {
width: 4px;
}
.ld-star-popup-list::-webkit-scrollbar-thumb {
background: #d4d4d8;
border-radius: 2px;
}
.ld-star-popup-empty {
padding: 12px 10px;
text-align: center;
font-size: 12px;
color: #a1a1aa;
}
.ld-star-popup-header {
padding: 6px 10px 4px;
font-size: 11px;
font-weight: 600;
color: #a1a1aa;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.ld-star-popup-item {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
padding: 7px 10px;
border: none;
background: transparent;
border-radius: 5px;
cursor: pointer;
font-size: 13px;
color: #09090b;
text-align: left;
transition: background 80ms;
}
.ld-star-popup-item:hover {
background: #f4f4f5;
}
.ld-star-popup-item.active {
background: #f4f4f5;
font-weight: 500;
}
.ld-star-popup-icon {
font-size: 14px;
flex-shrink: 0;
width: 18px;
text-align: center;
}
.ld-star-popup-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ld-star-popup-check {
color: #22c55e;
font-weight: 700;
font-size: 13px;
flex-shrink: 0;
}
.ld-star-popup-new {
border-top: 1px solid #f4f4f5;
margin-top: 2px;
padding-top: 7px;
color: #71717a;
}
.ld-star-popup-new:hover {
color: #09090b;
}
.ld-star-popup-input-row {
display: flex;
gap: 4px;
padding: 4px 6px;
}
.ld-star-popup-input {
flex: 1;
height: 28px;
padding: 0 8px;
border: 1px solid #e4e4e7;
border-radius: 5px;
font-size: 12px;
color: #09090b;
outline: none;
}
.ld-star-popup-input:focus {
border-color: #a1a1aa;
}
.ld-star-popup-input-ok {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #e4e4e7;
border-radius: 5px;
background: #18181b;
color: #fff;
cursor: pointer;
font-size: 12px;
font-weight: 700;
flex-shrink: 0;
}
.ld-star-popup-input-ok:hover {
background: #27272a;
}
/* ===== Toast Notification ===== */
.ld-star-toast {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%) translateY(16px);
background: #1a1a2e;
color: #ffffff;
padding: 10px 20px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
line-height: 1.4;
z-index: 99999;
opacity: 0;
pointer-events: none;
transition: opacity 250ms ease, transform 250ms ease;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
gap: 8px;
}
.ld-star-toast.ld-star-toast-visible {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
.ld-star-toast-icon {
font-size: 16px;
flex-shrink: 0;
}
/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
.ld-star-btn,
.ld-star-btn .ld-star-icon,
.ld-star-btn .ld-star-icon path,
.ld-star-toast {
transition-duration: 0ms !important;
animation-duration: 0ms !important;
}
}