Skip to content

Commit d4de290

Browse files
committed
Add simple Drawer component and re-refactor package detail page
1 parent 60f5bae commit d4de290

File tree

10 files changed

+486
-339
lines changed

10 files changed

+486
-339
lines changed

apps/cyberstorm-remix/app/commonComponents/CopyButton/CopyButton.css

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@layer nimbus-components {
22
.copy-button {
33
display: flex;
4+
flex: 0 1 0;
45
width: 1rem;
56
height: 1rem;
67
background: transparent;

apps/cyberstorm-remix/app/p/packageListing.css

+26-110
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,26 @@
11
@layer nimbus-layout {
22
.package-listing {
33
display: flex;
4-
flex-wrap: wrap;
54
gap: var(--gap-xxxl);
65
align-items: flex-start;
76
align-self: stretch;
8-
justify-content: center;
97
}
108

119
.package-listing__main {
1210
display: flex;
1311
flex: 1 0 0;
14-
flex: 1 1 40rem;
1512
flex-direction: column;
1613
gap: var(--gap-xl);
1714
align-items: flex-start;
18-
min-width: 0;
19-
max-width: 70rem;
20-
padding-top: var(--space-16);
15+
padding-top: 1rem;
2116
}
2217

2318
.package-listing__content-header {
2419
display: flex;
2520
gap: var(--gap-xl);
2621
align-items: flex-start;
2722
align-self: stretch;
28-
padding: var(--space-16);
29-
}
30-
31-
.package-listing__meta {
32-
display: flex;
33-
flex: 1 1 0;
34-
flex-direction: column;
35-
gap: var(--gap-xs);
36-
align-self: stretch;
37-
}
38-
39-
.package-listing__usage-actions {
40-
display: flex;
41-
flex: 1 1 0;
42-
flex-direction: column;
43-
gap: var(--gap-xs);
44-
}
45-
46-
.package-listing__install-download {
47-
display: flex;
48-
flex: 1 1 0;
49-
flex-flow: row wrap;
50-
gap: var(--gap-xs);
51-
align-content: stretch;
52-
}
53-
54-
.package-listing__action-button {
55-
display: flex;
56-
flex-grow: 1;
57-
justify-content: center;
58-
width: unset;
59-
}
60-
61-
.package-listing__dependency_string {
62-
display: inline-flex;
63-
flex: 1 1 0;
64-
flex-direction: row;
65-
gap: var(--gap-md);
66-
align-items: center;
67-
justify-content: center;
68-
padding: var(--space-8);
69-
border: solid 1px var(--color-surface-8);
70-
border-radius: var(--radius-md);
71-
color: var(--color-text-tertiary);
72-
background-color: var(--color-surface-2);
73-
}
74-
75-
.package-listing__interaction-and-data {
76-
display: flex;
77-
flex: 1 1 0;
78-
flex-flow: row wrap;
79-
gap: var(--gap-xxs);
80-
justify-content: space-between;
81-
}
82-
83-
.package-listing__package-data {
84-
display: flex;
85-
flex: 1 1 0;
86-
flex-direction: row;
87-
gap: var(--gap-xxs);
88-
89-
> div {
90-
display: flex;
91-
flex-direction: column;
92-
gap: var(--gap-xxs);
93-
94-
> span {
95-
display: inline-flex;
96-
flex-wrap: nowrap;
97-
gap: var(--gap-xs);
98-
align-items: center;
99-
padding: var(--space-8) var(--space-12);
100-
border-radius: var(--radius-md);
101-
color: var(--color-text-tertiary);
102-
font-weight: var(--font-weight-bold);
103-
font-size: var(--font-size-body-sm);
104-
line-height: normal;
105-
background-color: var(--color-surface-default);
106-
107-
--icon-color: var(--color-text-accent);
108-
109-
> span {
110-
text-wrap: nowrap;
111-
}
112-
}
113-
}
114-
}
115-
116-
.package-listing__package-interactions {
117-
display: flex;
118-
flex: 1 1 0;
119-
flex-direction: row-reverse;
120-
gap: var(--gap-xxs);
23+
padding: 1rem;
12124
}
12225

12326
.package-listing__content {
@@ -133,8 +36,8 @@
13336
position: sticky;
13437
top: var(--header-height);
13538
display: flex;
136-
flex: 0 0 300px;
13739
flex-direction: column;
40+
flex-shrink: 0;
13841
gap: var(--gap-md);
13942
align-items: flex-start;
14043
padding-top: var(--gap-md);
@@ -257,8 +160,29 @@
257160
max-width: 300px;
258161
}
259162

260-
/* Mobile breakpoint */
261-
@media (width <= 475px) {
163+
.package-listing__narrow-actions {
164+
display: none;
165+
flex-direction: column;
166+
gap: 0.5rem;
167+
align-items: flex-start;
168+
align-self: stretch;
169+
padding: 0 1rem;
170+
}
171+
172+
.package-listing__drawer-button {
173+
width: 100%;
174+
}
175+
176+
/* Sidebar narrow/wide switch breakpoint */
177+
@media (width <= 990px) {
178+
.package-listing-sidebar {
179+
display: none;
180+
}
181+
182+
.package-listing__narrow-actions {
183+
display: flex;
184+
}
185+
262186
.package-listing {
263187
flex-wrap: wrap;
264188
overflow: unset;
@@ -267,13 +191,5 @@
267191
.package-listing__main {
268192
min-width: 100%;
269193
}
270-
271-
.package-listing-sidebar {
272-
flex-grow: 1;
273-
}
274-
275-
.package-listing-sidebar__install {
276-
display: none;
277-
}
278194
}
279195
}

0 commit comments

Comments
 (0)