Skip to content

Commit 8837819

Browse files
committed
refactor(EventPopup): update layout and styling for improved readability and user experience
1 parent da83502 commit 8837819

2 files changed

Lines changed: 190 additions & 173 deletions

File tree

src/assets/scss/components/_event-popup.scss

Lines changed: 51 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
background: linear-gradient(180deg, var(--bg-color-alt, #fff), #fbfbfb);
9999
border-radius: 10px;
100100
box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
101-
padding: 18px 20px;
101+
padding: 12px 14px;
102102
color: var(--text-color);
103103
font-size: 13px;
104104
font-family: inherit;
@@ -129,148 +129,97 @@
129129
}
130130
}
131131

132+
.event-popup__card {
133+
background: transparent;
134+
135+
.ant-card-body {
136+
padding: 0;
137+
}
138+
}
139+
132140
.event-popup__header {
133-
display: flex;
134-
align-items: center;
135-
justify-content: space-between;
136141
gap: 12px;
137-
margin-bottom: 16px;
142+
margin-bottom: 2px;
138143
}
139144
.event-popup__subtitle {
140145
font-size: 12px;
141146
font-weight: 500;
142147
opacity: 0.8;
143-
margin-top: 4px;
148+
margin-top: 2px;
144149
color: rgba(0, 0, 0, 0.62);
145150
line-height: 1.2;
146-
max-width: 220px;
151+
max-width: 240px;
147152
overflow: hidden;
148153
text-overflow: ellipsis;
149154
white-space: nowrap;
150155
}
151156

152157
.event-popup__header-left {
153158
min-width: 0;
154-
display: flex;
155-
align-items: center;
156-
gap: 10px;
157159
}
158160
.event-popup__color-dot {
159-
width: 14px;
160-
height: 14px;
161+
width: 12px;
162+
height: 12px;
161163
border-radius: 50%;
162164
box-shadow: 0 4px 8px rgba(16, 24, 40, 0.08);
163-
flex: 0 0 14px;
165+
flex: 0 0 12px;
164166
}
165167
.event-popup__header-title {
168+
margin: 0 !important;
166169
font-weight: 700;
167-
font-size: 14px;
170+
font-size: 14px !important;
168171
letter-spacing: 0.01em;
169-
line-height: 1.1;
172+
line-height: 1.2;
170173
overflow: hidden;
171174
text-overflow: ellipsis;
172175
white-space: nowrap;
173176
}
174177

175178
.event-popup__close-btn {
176-
border: none;
177-
background: transparent;
178-
font-size: 20px;
179-
line-height: 1;
180-
padding: 6px;
181-
cursor: pointer;
182-
color: rgba(0, 0, 0, 0.45);
183-
border-radius: 6px;
184-
transition:
185-
background 120ms ease,
186-
color 120ms ease,
187-
transform 120ms ease;
188-
display: inline-flex;
189-
align-items: center;
190-
justify-content: center;
191-
width: 34px;
192-
height: 34px;
193-
}
194-
.event-popup__close-btn:hover {
195-
background: rgba(0, 0, 0, 0.045);
196-
color: rgba(0, 0, 0, 0.85);
197-
transform: translateY(-2px) scale(1.02);
198-
}
199-
.event-popup__close-btn:focus {
200-
box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
201-
outline: none;
202-
}
203-
204-
.event-popup__row {
205-
display: flex;
206-
gap: 12px;
207-
margin-bottom: 12px;
208-
align-items: flex-start;
209-
line-height: 1.5;
210-
211-
&:last-child {
212-
margin-bottom: 0;
179+
border-radius: 8px;
180+
height: 30px;
181+
width: 30px;
182+
color: rgba(0, 0, 0, 0.52);
183+
184+
&:hover,
185+
&:focus {
186+
background: rgba(0, 0, 0, 0.04);
187+
color: rgba(0, 0, 0, 0.8);
213188
}
214189
}
215-
.event-popup__label {
216-
min-width: 96px;
217-
color: rgba(0, 0, 0, 0.58);
218-
font-weight: 700;
219-
font-size: 12.5px;
220-
line-height: 1.45;
221-
text-align: right;
222-
letter-spacing: 0.2px;
223-
flex: 0 0 auto;
224-
padding-top: 2px;
225-
}
226-
.event-popup__value {
227-
flex: 1 1 auto;
228-
word-break: break-word;
229-
color: rgba(0, 0, 0, 0.86);
230-
letter-spacing: 0.01em;
231-
}
232190

233-
.event-popup__link {
234-
color: #1677ff;
235-
text-decoration: none;
236-
font-weight: 600;
237-
display: inline-flex;
238-
align-items: center;
239-
gap: 6px;
191+
.event-popup__descriptions {
192+
margin-top: 2px;
240193

241-
&:hover {
242-
color: #165bad;
243-
text-decoration: underline;
194+
.ant-descriptions-item-label {
195+
display: inline-flex;
196+
align-items: center;
197+
gap: 6px;
198+
color: rgba(0, 0, 0, 0.72);
199+
font-size: 12.5px;
200+
}
201+
.ant-descriptions-item-content {
202+
color: rgba(0, 0, 0, 0.88);
203+
font-weight: 600;
204+
font-size: 13px;
205+
}
206+
.ant-descriptions-row > th,
207+
.ant-descriptions-row > td {
208+
padding-bottom: 8px;
244209
}
245-
}
246-
247-
.event-popup__footer {
248-
display: flex;
249-
justify-content: space-between;
250-
margin-top: 14px;
251-
align-items: center;
252-
gap: 12px;
253-
}
254-
.event-popup__meta {
255-
display: flex;
256-
gap: 12px;
257-
align-items: center;
258-
color: rgba(0, 0, 0, 0.65);
259-
}
260-
.event-popup__label.small {
261-
min-width: 60px;
262-
font-weight: 600;
263-
font-size: 12px;
264-
color: rgba(0, 0, 0, 0.55);
265210
}
266211

267212
.event-popup__actions {
268-
display: flex;
269-
gap: 10px;
213+
margin-top: 4px;
214+
215+
.ant-btn {
216+
border-radius: 8px;
217+
padding: 0 12px;
218+
}
270219
}
271220

272221
.event-popup__creator {
273-
margin-top: 14px;
222+
margin-top: 8px;
274223
display: flex;
275224
justify-content: center;
276225
}

0 commit comments

Comments
 (0)