Skip to content

Commit f4a141d

Browse files
authored
Merge pull request thetrouper#50 from devashish2024/main
edits and fixes
2 parents 2485738 + 1708ad4 commit f4a141d

File tree

14 files changed

+657
-171
lines changed

14 files changed

+657
-171
lines changed

app/get/page.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

app/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import Ingame from '@/components/Sections/Ingame/Ingame';
44
import Reviews from '@/components/Sections/Reviews/Reviews';
55
import Features from '@/components/Sections/Features/Features';
66
import Hero from '@/components/Sections/Hero/Hero';
7+
import Progress from '@/components/Sections/Progress/Progress';
78

89
export default function Home() {
910
return (
1011
<>
1112
<Hero />
13+
<Progress />
1214
<CCS />
1315
<Features />
1416
<Ingame />

components/Sections/Hero/Hero.tsx

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client';
22

3-
import Progress from '../Progress/Progress';
43
import {
54
GetClickCrystalsButton,
65
JoinDiscordButton,
@@ -9,31 +8,30 @@ import { motion } from 'framer-motion';
98

109
export default function Hero() {
1110
return (
12-
<section className="pt-4 lg:pt-0 text-white bg-transparent">
13-
<div className="top-0 left-0 absolute w-screen z-[-1] bg-[radial-gradient(ellipse_200%_100%_at_bottom_left,#502250,#000000_100%)] h-hero"></div>
14-
<div className="py-6 px-8 lg:grid lg:gap-8 lg:grid-cols-12 lg:py-8 lg:h-screen">
15-
<div className="place-self-center col-span-5 lg:col-span-7 h-auto py-8 lg:py-0">
16-
<h1 className="text-left text-gray-200 tracking-normal leading-[1] font-extrabold text-6xl xl:text-8xl lg:max-w-2xl mb-6 m-0">
17-
Advanced hotkeys,
11+
<section className="py-4 lg:py-2 text-white bg-[radial-gradient(ellipse_200%_100%_at_bottom_left,#054874,#000000_100%)]">
12+
<div className="py-6 px-8 xl:grid xl:gap-8 xl:grid-cols-12 xl:py-8 xl:min-h-screen">
13+
<div className="place-self-center col-span-5 xl:col-span-7 h-auto py-8 xl:py-0">
14+
<h1 className="md:text-center xl:text-left text-gray-200 tracking-normal leading-[1] font-extrabold text-6xl md:text-7xl xl:text-8xl xl:max-w-2xl mb-6 m-0">
15+
Like Steroids,
1816
<br /> For{' '}
19-
<span className="bg-[radial-gradient(ellipse_200%_100%_at_top_center,#a31ca5_100%,#ab46af_100%)] text-transparent bg-clip-text">
17+
<span className="bg-[radial-gradient(ellipse_200%_100%_at_top_center,#2f8dbb_100%,#28429f_90%)] text-transparent bg-clip-text">
2018
Crystal PvP.
2119
</span>
2220
</h1>
23-
<div className="grid">
24-
<p className="text-gray-200/90 font-normal max-w-2xl text-left">
21+
<div className="grid md:place-items-center">
22+
<p className="text-gray-200/90 font-normal max-w-2xl md:text-center xl:text-left">
2523
Discover ClickCrystals—a powerful, free, and open-source Minecraft
26-
mod designed to enhance your Crystal PvP experience, all without
27-
cheats! Loaded with a comprehensive set of modules to modify your
28-
human input.
24+
mod designed to enhance your Crystal PvP gameplay! Loaded with 80+
25+
built-in modules and the complete, easiest scripting language for
26+
Minecraft ever existed, it's beyond the limits!
2927
</p>
3028
</div>
31-
<div className="flex flex-row gap-4 mt-4">
29+
<div className="flex flex-row items-center md:justify-center xl:justify-start gap-4 my-4">
3230
<GetClickCrystalsButton />
3331
<JoinDiscordButton />
3432
</div>
3533
</div>
36-
<div className="lg:my-4 hidden col-span-5 lg:flex lg:items-center relative">
34+
<div className="xl:my-4 hidden col-span-5 xl:flex xl:items-center relative">
3735
{/* <iframe
3836
className="aspect-video w-full h-full block"
3937
src="https://www.youtube.com/embed/-YCPZvNMmFo?si=SzaaGTq-BmCGxRMo"
@@ -44,15 +42,11 @@ export default function Hero() {
4442
></iframe> */}
4543
<motion.img
4644
src={'/textures/custom/player.png'}
47-
style={{
48-
imageRendering: 'pixelated',
49-
}}
5045
alt=""
51-
className="right-[90px] absolute size-[500px] w-auto"
46+
className="right-[90px] absolute h-[500px] w-auto"
5247
/>
5348
</div>
5449
</div>
55-
<Progress />
5650
</section>
5751
);
5852
}

components/Sections/Progress/Progress.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function Progress() {
3636
}, []);
3737

3838
return (
39-
<div className="py-12 bg-[#491649] my-0 [mask-image:linear-gradient(to_top,black_15%,black_30%,black_75%,transparent)] relative">
39+
<div className="py-12 bg-[#0c3768] my-0 bg-[radial-gradient(ellipse_200%_200%_at_bottom_left,#054874,#000000_100%)]">
4040
<div className="rounded-md py-8 px-4 lg:px-32 flex gap-4 sm:flex-row flex-col justify-between">
4141
{progress.map((progress, index) => {
4242
return (
@@ -63,7 +63,6 @@ export default function Progress() {
6363
);
6464
})}
6565
</div>
66-
<div className="obsidian_line"></div>
6766
</div>
6867
);
6968
}

components/ui/Footer/FooterLinks.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const footerLinks = [
4848
url: 'https://github.com/clickcrystals-development/ClickCrystals',
4949
},
5050
{ name: 'Modrinth', url: 'https://modrinth.com/mod/clickcrystals' },
51+
{ name: 'Instant Download', url: '/get' },
5152
],
5253
},
5354
];

components/ui/Nav/DropLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const DropLink = ({ label, links, url = '#' }: DropLinkProps) => {
6565
</div>
6666
<div
6767
ref={dropdownRef}
68-
className={`${isHovered || isOpen ? 'opacity-100 visible' : 'opacity-0 invisible'} z-[999999] transition-all absolute mt-0 w-48 bg-white rounded-sm p-0 m-0 shadow-lg`}
68+
className={`${isHovered || isOpen ? 'opacity-100 visible' : 'opacity-0 invisible'} z-[999999] transition-all absolute mt-0 w-48 bg-white rounded-sm p-0 m-0 shadow-lg right-0`}
6969
onMouseEnter={handleMouseEnter}
7070
onMouseLeave={handleMouseLeave}
7171
>

components/ui/Nav/MobileMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ const MenuOverlay = () => {
2424
>
2525
<div className="flex flex-row justify-between pl-2 pr-4">
2626
<Title />
27-
<MobileMenuNav handler={setActive} />
27+
<MobileMenuNav state={active} handler={setActive} />
2828
</div>
2929
{active && (
30-
<ul className="flex flex-col items-center justify-center flex-1 px-4 py-8">
30+
<ul className="flex flex-col items-center justify-center px-4 h-screen overflow-y-scroll">
3131
{links.map((link: any, index: any) => (
3232
<motion.li
3333
key={index}

components/ui/Nav/MobileMenuNav.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
import { useState } from 'react';
44
import { motion } from 'framer-motion';
55

6-
export default function MobileMenuNav({ handler }: any) {
7-
const [navbarOpen, setNavbarOpen] = useState(true);
8-
6+
export default function MobileMenuNav({ handler, state }: any) {
97
const toggle = () => {
10-
setNavbarOpen(!navbarOpen);
11-
handler(navbarOpen);
8+
handler(!state);
129
};
1310

1411
return (
@@ -24,9 +21,9 @@ export default function MobileMenuNav({ handler }: any) {
2421
strokeWidth="1.5"
2522
strokeLinecap="round"
2623
animate={
27-
navbarOpen
28-
? { d: 'M3 6h18M3 12h18M3 18h18' }
29-
: { d: 'M3 3l18 18M3 21l18-18' }
24+
state
25+
? { d: 'M3 3l18 18M3 21l18-18' }
26+
: { d: 'M3 6h18M3 12h18M3 18h18' }
3027
}
3128
transition={{ duration: 0.2 }}
3229
/>

components/ui/Nav/Nav.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ const downloadDropdown = [
88
label: 'Official',
99
url: '/download',
1010
},
11+
{
12+
label: 'Instant Download',
13+
url: '/get',
14+
},
1115
{
1216
label: 'PlanetMinecraft',
1317
url: 'https://www.planetminecraft.com/mod/clickcrystal/',

components/ui/Nav/index.tsx

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
1+
'use client';
2+
13
import { Nav } from '@/components/ui/Nav/Nav';
24
import { Title } from '@/components/ui/Nav/Title';
35
import { Links } from '@/components/ui/Nav/Links';
46
import MobileMenu from './MobileMenu';
7+
import { useEffect, useState } from 'react';
58

69
export default function Header() {
10+
const [isTop, setIsTop] = useState(true);
11+
12+
useEffect(() => {
13+
return () => {
14+
if (typeof window != null) {
15+
window.addEventListener('scroll', () => {
16+
console.log(window.scrollY);
17+
setIsTop(window.scrollY <= 70 && window.location.pathname === '/');
18+
});
19+
}
20+
setIsTop(window.scrollY <= 70 && window.location.pathname === '/');
21+
};
22+
}, []);
723
return (
824
<div
9-
className="tracking-tight text-white"
25+
className="tracking-tight text-white sticky top-0 z-[99999] transition-transform duration-200"
1026
style={{
11-
background: "url('/textures/obsidian.png')",
12-
backgroundRepeat: 'repeat',
27+
background: isTop ? 'black' : "url('/textures/obsidian.png') repeat",
1328
imageRendering: 'pixelated',
14-
backgroundSize: '32px',
1529
}}
1630
>
17-
<header className="w-full duration-100 ease-in flex-none sticky top-0 transition-all z-40">
31+
<header className="w-full duration-100 ease-in top-0 transition-all z-40">
1832
<div className="w-full flex max-w-7xl justify-between md:items-center md:mx-auto md:px-4 md:py-3.5">
1933
<div className="hidden md:flex justify-between">
2034
<Title />

0 commit comments

Comments
 (0)