Skip to content

Commit 0489f58

Browse files
committed
New artius page
1 parent 722cb69 commit 0489f58

File tree

5 files changed

+77
-13
lines changed

5 files changed

+77
-13
lines changed

src/App.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Contact from "./pages/Contact";
1111
import About from "./pages/About";
1212
import EdMescDX from "./pages/EdMescDX";
1313
import NewArtius from "./pages/NewArtius";
14-
import Artius from "./pages/Artius";
14+
import OldArtius from "./pages/OldArtius";
1515
import { ParallaxProvider } from "react-scroll-parallax";
1616

1717
function App() {
@@ -26,8 +26,8 @@ function App() {
2626
<Route path="/" element={<Home />} />
2727
<Route path="/about" element={<About />} />
2828
<Route path="/contact" element={<Contact />} />
29-
<Route path="/artius" element={<Artius />} />
30-
<Route path="/newartius" element={<NewArtius />} />
29+
<Route path="/oldartius" element={<OldArtius />} />
30+
<Route path="/artius" element={<NewArtius />} />
3131
<Route path="/edmescdx" element={<EdMescDX />} />
3232
</Routes>
3333
</Router>

src/components/ArtiusCharButton.tsx

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//import React from 'react'
2+
3+
interface Props {
4+
img?: string;
5+
func?: () => void;
6+
}
7+
8+
const ArtiusCharButton = (props: Props) => {
9+
return (
10+
<div className="flex-1
11+
bg-no-repeat bg-contain bg-center p-5 m-1
12+
hover:bg-white transition cursor-pointer"
13+
style={{backgroundImage: `url(${props.img})`}}
14+
onClick={() => props.func && props.func()}/>
15+
)
16+
}
17+
18+
export default ArtiusCharButton

src/locales/en.json

+17-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,23 @@
8484
"comparison1": "ARTIUS draws inspiration from real-life settings, reinterpreting them into a grounded yet fantastical game world.",
8585
"comparison2": "The evil art creatures offer interesting depictions of famous art pieces & day-to-day elements.",
8686
"tailored": "/img/tailored.png",
87-
"tailoredMobile": "/img/tailored_mobile.png"
87+
"tailoredMobile": "/img/tailored_mobile.png",
88+
"meet": "Meet the Cast!",
89+
90+
"characters": {
91+
"pivolo": {
92+
"title": "Pivolo",
93+
"subtitle": "Evil",
94+
"desc": "aaaaa",
95+
"img": "/img/characters/pivolo.png"
96+
},
97+
"pierre": {
98+
"title": "Pierre",
99+
"subtitle": "Good",
100+
"desc": "aaaaa",
101+
"img": "/img/characters/pierre.png"
102+
}
103+
}
88104
}
89105
},
90106

src/pages/NewArtius.tsx

+36-6
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ import SocialIcon from "../components/SocialIcon";
2424
import ActualPage from "../components/global/ActualPage";
2525
import YouTube from "react-youtube";
2626
import Gallery from "../components/global/Gallery";
27-
import { useEffect } from "react";
27+
import { useEffect, useState } from "react";
2828
import AOS from "aos";
2929
import "aos/dist/aos.css";
3030
import { Parallax } from "react-scroll-parallax";
3131
import { useTranslation } from "react-i18next";
32+
import ArtiusCharButton from "../components/ArtiusCharButton";
3233

3334
const NewArtius = () => {
3435
useEffect(() => {
@@ -43,6 +44,20 @@ const NewArtius = () => {
4344
const slides = [pic1, pic2, pic3];
4445
const slides2 = [pic4, pic6, pic5];
4546

47+
const [currentCharTitle, setCurrentCharTitle] = useState(t("games.newArtius.characters.pivolo.title"))
48+
const [currentCharSubtitle, setCurrentCharSubtitle] = useState("Current char title.")
49+
const [currentCharDesc, setCurrentCharDesc] = useState("Current char description.")
50+
const [currentCharImg, setCurrentCharImg] = useState("/")
51+
52+
function setCharacter(characterName: string) {
53+
const path = `games.newArtius.characters.${characterName}`
54+
55+
setCurrentCharTitle(t(`${path}.title`))
56+
setCurrentCharSubtitle(t(`${path}.subtitle`))
57+
setCurrentCharDesc(t(`${path}.desc`))
58+
setCurrentCharImg(t(`${path}.img`))
59+
}
60+
4661
return (
4762
<ActualPage singleColumn={true}>
4863
<div
@@ -127,7 +142,7 @@ const NewArtius = () => {
127142
className="flex items-center justify-center"
128143
>
129144
<p className="font-adlib text-pvic-blue drop-shadow-[3px_3px_0px_rgba(0,0,0,1)] text-3xl xl:text-5xl p-5 xl:mr-20 xl:p-0 text-right max-w-[800px]">
130-
{t("games.newArtius.text2")}
145+
{t("games.newArtius.text2")}
131146
</p>
132147
</div>
133148
</div>
@@ -137,15 +152,27 @@ const NewArtius = () => {
137152
{/* Desktop */}
138153
<div
139154
data-aos="fade-up"
140-
className={`mt-20 mb-20 w-full max-w-[1400px] h-screen hidden xl:inline`}
141-
style={{ backgroundImage: `url(${t("games.newArtius.tailored")})`, backgroundSize: "contain", backgroundPosition: "center", backgroundRepeat: "no-repeat"}}
155+
className={`mt-20 mb-20 w-full max-w-[1250px] h-screen hidden xl:inline`}
156+
style={{
157+
backgroundImage: `url(${t("games.newArtius.tailored")})`,
158+
backgroundSize: "contain",
159+
backgroundPosition: "center",
160+
backgroundRepeat: "no-repeat",
161+
}}
142162
/>
143163

144164
{/* Mobile */}
145165
<div
146166
data-aos="fade-up"
147167
className={`mt-10 mb-10 w-full max-w-[600px] h-screen xl:hidden`}
148-
style={{ backgroundImage: `url(${t("games.newArtius.tailoredMobile")})`, backgroundSize: "contain", backgroundPosition: "center", backgroundRepeat: "no-repeat"}}
168+
style={{
169+
backgroundImage: `url(${t(
170+
"games.newArtius.tailoredMobile"
171+
)})`,
172+
backgroundSize: "contain",
173+
backgroundPosition: "center",
174+
backgroundRepeat: "no-repeat",
175+
}}
149176
/>
150177
</div>
151178

@@ -180,8 +207,10 @@ const NewArtius = () => {
180207
<Gallery picSize="325px" slides={slides} />
181208
</div>
182209

210+
211+
183212
{/* Final */}
184-
<div className="mt-30 p-5 xl:p-0 flex flex-col items-center justify-center">
213+
<div className="mt-20 p-5 xl:p-0 flex flex-col items-center justify-center">
185214
<img
186215
data-aos="fade-up"
187216
className="w-full max-w-[1250px] h-fit"
@@ -205,3 +234,4 @@ const NewArtius = () => {
205234
};
206235

207236
export default NewArtius;
237+

src/pages/Artius.tsx renamed to src/pages/OldArtius.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import pic6 from "../assets/img/artius/pic6.png";
99
import logo from "../assets/img/artius/logo.png";
1010
import chars_cartoon from "../assets/img/artius/chars_cartoon.png";
1111
import chars_3d from "../assets/img/artius/chars_3d.png";
12-
import pivolo from "../assets/img/artius/PIVOLO.png";
12+
import pivolo from "../assets/img/artius/pivolo.png";
1313

1414
// Modules
1515
import ActualPage from "../components/global/ActualPage";
1616
import Gallery from "../components/global/Gallery";
1717
import { useTranslation } from "react-i18next";
1818

19-
const Artius = () => {
19+
const OldArtius = () => {
2020
const slides = [pic1, pic2, pic3];
2121
const slides2 = [pic4, pic6, pic5];
2222

@@ -84,4 +84,4 @@ const Artius = () => {
8484
);
8585
};
8686

87-
export default Artius;
87+
export default OldArtius;

0 commit comments

Comments
 (0)