[Update] Config Page: Supporters: Add animation.

This commit is contained in:
Sakamoto Shiina
2025-02-03 12:41:19 +09:00
parent 4fb675943f
commit 0955aaa12c
7 changed files with 113 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
.scroll_container { .scroll_container {
width: 100%; width: 100%;
overflow-y: auto; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
} }

View File

@@ -1,12 +1,22 @@
import styles from "./Supporters.module.scss"; import styles from "./Supporters.module.scss";
import { SupportUsContainer } from "./support_us_container/SupportUsContainer"; import { SupportUsContainer } from "./support_us_container/SupportUsContainer";
import { SupportersContainer } from "./supporters_container/SupportersContainer"; import { SupportersContainer } from "./supporters_container/SupportersContainer";
import { useSupporters } from "@logics_configs";
import { useEffect } from "react";
export const Supporters = () => { export const Supporters = () => {
const { asyncFetchSupportersData } = useSupporters();
useEffect(() => {
asyncFetchSupportersData();
}, []);
return ( return (
<div className={styles.container}> <div className={styles.container}>
<SupportUsContainer /> <SupportUsContainer />
<SupportersContainer /> <div className={styles.supportersWrapper}>
<SupportersContainer />
</div>
</div> </div>
); );
}; };

View File

@@ -5,4 +5,17 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%; width: 100%;
}
.supportersWrapper {
opacity: 0;
animation: fadeIn 0.8s ease-in-out 1.6s forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
} }

View File

@@ -1,3 +1,44 @@
$progress_ease: cubic-bezier(0, 1, 0.75, 1);
@keyframes revealTopImg {
0% {
clip-path: inset(0 50% 0 50%);
opacity: 0;
}
100% {
clip-path: inset(0 0 0 0);
opacity: 1;
}
}
@keyframes bounceIn {
0% {
transform: translateY(100%);
opacity: 0;
}
60% {
transform: translateY(-10%);
opacity: 1;
}
80% {
transform: translateY(10%);
opacity: 1;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
@keyframes expandWidth {
0% {
transform: scaleX(0);
}
100% {
transform: scaleX(1);
}
}
.support_us_container { .support_us_container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -6,39 +47,56 @@
gap: 1.4rem; gap: 1.4rem;
width: 100%; width: 100%;
} }
.support_buttons_wrapper { .support_buttons_wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: 2rem; gap: 1.2rem;
} }
.top_img { .top_img {
width: 100%; width: 100%;
animation: revealTopImg 0.8s ease forwards;
} }
.lines_container { .lines_container {
display: flex; display: flex;
justify-content: center;
align-items: center;
width: 100%;
gap: 3.6rem; gap: 3.6rem;
} }
.line_basic, .line_fuwa, .line_mochi, .line_mogu { .line_basic,
.line_fuwa,
.line_mochi,
.line_mogu {
width: 8.6rem; width: 8.6rem;
height: 0.2rem; height: 0.2rem;
transform: scaleX(0);
transform-origin: left center;
} }
.line_basic { .line_basic {
background-color: var(--dark_800_color); background-color: var(--dark_800_color);
animation: expandWidth 1s $progress_ease 0.4s forwards;
} }
.line_fuwa { .line_fuwa {
background-color: #5788a2; background-color: #5788a2;
animation: expandWidth 1s $progress_ease 0.6s forwards;
} }
.line_mochi { .line_mochi {
background-color: var(--received_300_color); background-color: var(--received_300_color);
animation: expandWidth 1s $progress_ease 0.8s forwards;
} }
.line_mogu { .line_mogu {
background-color: var(--dark_basic_text_color); background-color: var(--dark_basic_text_color);
animation: expandWidth 1s $progress_ease 1s forwards;
} }
.support_us_button_wrapper { .support_us_button_wrapper {
@@ -52,8 +110,21 @@
.support_button { .support_button {
position: relative; position: relative;
padding: 1.2rem 1.6rem; padding: 1.2rem 1.6rem;
opacity: 0;
transform: translateY(100%);
} }
.support_button:nth-child(1) {
animation: bounceIn 0.4s ease-out 1.2s forwards;
}
.support_button:nth-child(2) {
animation: bounceIn 0.4s ease-out 1.4s forwards;
}
.support_button:nth-child(3) {
animation: bounceIn 0.4s ease-out 1.6s forwards;
}
.support_img { .support_img {
&.fanbox_logo { &.fanbox_logo {
height: 1.8rem; height: 1.8rem;
@@ -64,8 +135,6 @@
} }
.spiral_top::before, .spiral_top::before,
.spiral_top::after, .spiral_top::after,
.spiral_bottom::before, .spiral_bottom::before,
@@ -74,6 +143,7 @@
position: absolute; position: absolute;
transition-duration: 0.3s; transition-duration: 0.3s;
} }
.spiral_top::before { .spiral_top::before {
background: var(--dark_800_color); background: var(--dark_800_color);
box-shadow: 0 0 0.4rem 0 var(--dark_800_color); box-shadow: 0 0 0.4rem 0 var(--dark_800_color);
@@ -116,20 +186,17 @@
height: 0; height: 0;
} }
.support_button:hover
.spiral_top::before { .support_button:hover .spiral_top::before {
height: 100%; height: 100%;
} }
.support_button:hover .support_button:hover .spiral_top::after {
.spiral_top::after {
width: 100%; width: 100%;
} }
.support_button:hover .support_button:hover .spiral_bottom::before {
.spiral_bottom::before {
width: 100%; width: 100%;
} }
.support_button:hover .support_button:hover .spiral_bottom::after {
.spiral_bottom::after {
height: 100%; height: 100%;
} }
@@ -141,10 +208,12 @@
flex-direction: column; flex-direction: column;
gap: 1rem; gap: 1rem;
} }
.vrct_supporters_title { .vrct_supporters_title {
height: 6rem; height: 6rem;
} }
.vrct_supporters_desc { .vrct_supporters_desc {
font-size: 1.4rem; font-size: 1.4rem;
text-align: start; text-align: start;
} }

View File

@@ -1,15 +1,10 @@
import styles from "./SupportersContainer.module.scss"; import styles from "./SupportersContainer.module.scss";
import { useEffect } from "react";
import { SupportersWrapper } from "./supporters_wrapper/SupportersWrapper"; import { SupportersWrapper } from "./supporters_wrapper/SupportersWrapper";
import { useSupporters } from "@logics_configs"; import { useSupporters } from "@logics_configs";
import { supporters_images_url } from "@ui_configs"; import { supporters_images_url } from "@ui_configs";
export const SupportersContainer = () => { export const SupportersContainer = () => {
const { currentSupportersData, asyncFetchSupportersData } = useSupporters(); const { currentSupportersData } = useSupporters();
useEffect(() => {
asyncFetchSupportersData();
}, []);
if (currentSupportersData.state === "error") if (currentSupportersData.state === "error")
return <div>Failed to retrieve data.</div>; return <div>Failed to retrieve data.</div>;
@@ -17,11 +12,10 @@ export const SupportersContainer = () => {
if (currentSupportersData.state === "pending" || currentSupportersData.data === null) if (currentSupportersData.state === "pending" || currentSupportersData.data === null)
return <div>Loading...</div>; return <div>Loading...</div>;
const supporters_settings = currentSupportersData.data.supporters_settings;
return ( return (
<div className={styles.supporters_container}> <div className={styles.supporters_container}>
<img className={styles.vrct_supporters_title} src={`${supporters_images_url}/vrct_supporters_title.png`} /> <img className={styles.vrct_supporters_title} src={`${supporters_images_url}/vrct_supporters_title.png`} />
<SupportersWrapper supporters_settings={supporters_settings}/> <SupportersWrapper />
<p className={styles.vrct_supporters_desc_end}>{`みなさんのおかげで、みしゃ社長は布団で寝ることを許され(in開発室) しいなは喜び庭駆け回っていますふわもちもぐもぐですありがとうございます。これからもまだまだ進化するVRCTをどうかよろしくお願いします\nThanks to everyone, Misha has been granted the privilege of sleeping in a proper bed (in the development room), and Shiina is so happy, running around the yard! Fuwa-mochi-mogu-mogu! Thank you so much! We hope you'll continue to support the ever-evolving VRCT!`}</p> <p className={styles.vrct_supporters_desc_end}>{`みなさんのおかげで、みしゃ社長は布団で寝ることを許され(in開発室) しいなは喜び庭駆け回っていますふわもちもぐもぐですありがとうございます。これからもまだまだ進化するVRCTをどうかよろしくお願いします\nThanks to everyone, Misha has been granted the privilege of sleeping in a proper bed (in the development room), and Shiina is so happy, running around the yard! Fuwa-mochi-mogu-mogu! Thank you so much! We hope you'll continue to support the ever-evolving VRCT!`}</p>
</div> </div>
); );

View File

@@ -42,7 +42,7 @@ const getSupportersLabelsPath = (file_name) => `${image_sets.supporters_labels}$
const getSupportersIconsPath = (file_name) => `${image_sets.supporters_icons}${file_name}.png`; const getSupportersIconsPath = (file_name) => `${image_sets.supporters_icons}${file_name}.png`;
export const SupportersWrapper = ({supporters_settings}) => { export const SupportersWrapper = () => {
const { saveScrollPosition, restoreScrollPosition } = useSettingBoxScrollPosition(); const { saveScrollPosition, restoreScrollPosition } = useSettingBoxScrollPosition();
const { currentSupportersData } = useSupporters(); const { currentSupportersData } = useSupporters();
@@ -55,6 +55,8 @@ export const SupportersWrapper = ({supporters_settings}) => {
}, [currentSupportersData.data]); }, [currentSupportersData.data]);
const supporters_settings = currentSupportersData.data.supporters_settings;
const target_supporting_month = supporters_settings.target_supporting_month; const target_supporting_month = supporters_settings.target_supporting_month;
const calc_support_period = supporters_settings.calc_support_period; const calc_support_period = supporters_settings.calc_support_period;
const chato_ex_count = supporters_settings.chato_ex_count; const chato_ex_count = supporters_settings.chato_ex_count;

View File

@@ -1,4 +1,5 @@
$progress_ease: cubic-bezier(0, 1, 0.75, 1); $progress_ease: cubic-bezier(0, 1, 0.75, 1);
// Duplicated
.container { .container {
position: absolute; position: absolute;