Skip to content

Commit 1b58ec6

Browse files
committed
feat: early bird notice
1 parent 6c7b862 commit 1b58ec6

File tree

2 files changed

+88
-3
lines changed

2 files changed

+88
-3
lines changed

my-app/src/page/Info.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export const Info = () => {
77

88
return (
99
<div class="attend_info_">
10+
<div class="early_bird-notice">
11+
<p>早鳥優惠進行中</p>
12+
</div>
1013
<section class="lesson">
1114
<div>
1215
<h2>日期</h2>
@@ -48,7 +51,10 @@ export const Info = () => {
4851
<p>
4952
新臺幣 9500 元整<br></br>
5053
<div class="early_bird">
51-
早鳥優惠:新臺幣 8900 元整(113 年 4 月 20 日 至 113 年 4 月 30 日)
54+
<span class="early_bird-label">進行中</span>
55+
<span class="early_bird_text">
56+
早鳥優惠:新臺幣 8900 元整(113 年 4 月 20 日 至 113 年 4 月 30 日)
57+
</span>
5258
</div>
5359
</p>
5460
</div>

my-app/src/style/_info.scss

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,85 @@
307307
}
308308
}
309309
}
310-
.early_bird {
311-
color: rgb(247, 180, 36);
310+
311+
.early_bird_text {
312+
position: relative;
313+
color: $yellow-1;
314+
font-weight: bold;
315+
line-height: 1.8;
316+
top: 1.1px;
317+
}
318+
319+
.early_bird-notice p {
320+
position: relative;
321+
display: flex;
322+
margin: 5vh auto;
323+
padding: 5px 5px 6px 27px;
324+
text-align: center;
325+
align-items: center;
326+
justify-content: center;
327+
width: 199px;
328+
color: #fff;
329+
background-color: green;
330+
border-radius: 100px;
331+
letter-spacing: 1.5px;
332+
}
333+
334+
.early_bird-notice p::before {
335+
content: "";
336+
position: absolute;
337+
width: 11px;
338+
height: 11px;
339+
margin-left: -82%;
340+
margin-top: 0em;
341+
background-color: #fff;
342+
border-radius: 50%;
343+
animation: pulse 2s infinite alternate;
344+
}
345+
346+
@keyframes pulse {
347+
0% {
348+
transform: scale(1);
349+
}
350+
100% {
351+
transform: scale(1.5);
352+
}
353+
}
354+
355+
.early_bird-label {
356+
display: inline-block;
357+
position: relative;
358+
margin-right: 8px;
359+
font-size: 0.7em;
360+
padding: 0.15em 5px 0.25em 24px;
361+
text-align: center;
362+
align-items: center;
363+
justify-content: center;
364+
width: 80px;
365+
color: #fff;
366+
background-color: green;
367+
border-radius: 100px;
368+
letter-spacing: 1.5px;
369+
}
370+
371+
.early_bird-label::before {
372+
content: "";
373+
position: absolute;
374+
z-index: 3;
375+
width: 0.7em;
376+
height: 0.7em;
377+
margin-left: -1.2em;
378+
margin-top: 0.45em;
379+
background-color: #fff;
380+
border-radius: 50%;
381+
animation: pulse-small 2s infinite alternate;
382+
}
383+
384+
@keyframes pulse-small {
385+
0% {
386+
transform: scale(0.9);
387+
}
388+
100% {
389+
transform: scale(1.3);
390+
}
312391
}

0 commit comments

Comments
 (0)