Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
tseng7510 committed Oct 14, 2024
1 parent 03f1190 commit 0bc4a02
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 15 deletions.
15 changes: 10 additions & 5 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ button:focus {
font-size: 0.7222222222rem;
}
}
.slogan .day .letter:nth-child(1), .slogan .day .letter:nth-child(2) {
.slogan .day .letter.active {
font-family: "Josefin Sans", sans-serif;
font-size: 2.2222222222rem;
color: #e30078;
Expand All @@ -1208,20 +1208,20 @@ button:focus {
line-height: 0.7;
}
@media screen and (max-width: 1023px) {
.slogan .day .letter:nth-child(1), .slogan .day .letter:nth-child(2) {
.slogan .day .letter.active {
font-size: 1.4444444444rem;
}
}
@media screen and (max-width: 767px) {
.slogan .day .letter:nth-child(1), .slogan .day .letter:nth-child(2) {
.slogan .day .letter.active {
font-size: 0.8888888889rem;
}
}
.slogan .day .letter:nth-child(2) {
.slogan .day .letter.active.last {
margin-right: 20px;
}
@media screen and (max-width: 1023px) {
.slogan .day .letter:nth-child(2) {
.slogan .day .letter.active.last {
margin-right: 0px;
}
}
Expand Down Expand Up @@ -3913,6 +3913,7 @@ table.tableSprite tr:nth-child(even) {
}
}
.index .activitiesBox .topBox .infoBox .out {
aspect-ratio: 390/370;
width: 100%;
max-width: 390px;
height: 370px;
Expand Down Expand Up @@ -3975,6 +3976,10 @@ table.tableSprite tr:nth-child(even) {
line-height: 1.6;
margin: 0 -20% 20px 20%;
transform-origin: center left;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
transition: all 0.3s ease;
}
@media screen and (max-width: 1023px) {
Expand Down
2 changes: 1 addition & 1 deletion css/style.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mp.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<a href="#"><img src="images/logo.png" alt="" /></a>
</div>
<div class="slogan">
<div class="day">30 DAYS TO THE OPENING</div>
<div class="day">230 DAYS TO THE OPENING</div>
<span class="line"></span>
</div>

Expand Down
15 changes: 14 additions & 1 deletion plugins/customize.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,20 @@

//blockParallax
let textWrapper = document.querySelector('.slogan .day');

const numberStr = textWrapper.textContent;
const numbersCount = numberStr.toString().match(/\d/g).length;

textWrapper.innerHTML = textWrapper.textContent.replace(/\S/g, "<span class='letter'>$&</span>");
const countSpan = document.querySelectorAll('.slogan .day span');
countSpan.forEach((i, index) => {
if (index < numbersCount) {
i.classList.add('active');
}
if (index === numbersCount - 1) {
i.classList.add('last');
}
});

anime
.timeline({ loop: true })
Expand Down Expand Up @@ -565,7 +578,7 @@ sliderUse('.activitiesTitleBox span');

if ($('.cpPicListBox').length > 0) {
$('.cpPicListBox .picBox .listBox').slick({
infinite: true,
infinite: false,
speed: 300,
slidesToShow: 1,
prevArrow: '.cpPicListBox .prev',
Expand Down
6 changes: 6 additions & 0 deletions scss/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@
}

.out {
aspect-ratio: 390/370;
width: 100%;
max-width: 390px;
height: 370px;
Expand Down Expand Up @@ -839,6 +840,11 @@
line-height: 1.6;
margin: 0 -20% 20px 20%;
transform-origin: center left;

overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
@include transition(all, 0.3);

@include screen('tablet') {
Expand Down
14 changes: 7 additions & 7 deletions scss/partials/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,7 @@ button {
font-size: Rem(13);
}

&:nth-child(1),
&:nth-child(2) {
&.active {
font-family: "Josefin Sans", sans-serif;
font-size: Rem(40);
color: #e30078;
Expand All @@ -987,13 +986,14 @@ button {
@include screen('mobile') {
font-size: Rem(16);
}
}

&:nth-child(2) {
margin-right: 20px;
&.last {

@include screen('tablet') {
margin-right: 0px;
margin-right: 20px;

@include screen('tablet') {
margin-right: 0px;
}
}
}
}
Expand Down

0 comments on commit 0bc4a02

Please sign in to comment.