Skip to content

Commit 9edecd2

Browse files
authored
Merge pull request #54 from devashish2024/main
feat: update download versions to include 1.21.7 and 1.21.8
2 parents 948bdee + 46ed275 commit 9edecd2

File tree

11 files changed

+117
-191
lines changed

11 files changed

+117
-191
lines changed

components/Sections/download/DownloadTable.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export default function DownloadTable() {
1616

1717
useEffect(() => {
1818
const versionColumns = [
19+
{ field: '1218', headerName: '1.21.8' },
20+
{ field: '1217', headerName: '1.21.7' },
1921
{ field: '1216', headerName: '1.21.6' },
2022
{ field: '1215', headerName: '1.21.5' },
2123
{ field: '1211', headerName: '1.21.1' },

components/ui/Footer/Content.tsx

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

components/ui/Footer/FooterInfo.tsx

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

components/ui/Footer/FooterLinks.tsx

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

components/ui/Footer/Info.tsx

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

components/ui/Footer/Social.tsx

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

components/ui/Footer/Socials.tsx

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

components/ui/Footer/index.tsx

Lines changed: 108 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,114 @@
1-
import FooterLinks from './FooterLinks';
1+
import Link from 'next/link';
2+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3+
import {
4+
faDiscord,
5+
faGithub,
6+
faYoutube,
7+
} from '@fortawesome/free-brands-svg-icons';
8+
import Image from 'next/image';
29

310
export default function Footer() {
411
return (
5-
<footer className="m-0">
6-
<FooterLinks />
12+
<footer className="w-full bg-gradient-to-t from-blue-900 via-blue-800 to-blue-700 border-t border-blue-600 py-10 px-6 flex flex-col gap-8">
13+
<div className="flex flex-col md:flex-row items-center justify-between gap-6">
14+
<div className="flex items-center gap-3">
15+
<Image
16+
src="/icon.png"
17+
alt="ClickCrystals"
18+
width={40}
19+
height={40}
20+
className="rounded-lg shadow"
21+
/>
22+
<span className="text-white font-extrabold text-xl tracking-tight">
23+
ClickCrystals
24+
</span>
25+
</div>
26+
<div className="flex items-center gap-4">
27+
{[
28+
{
29+
icon: faDiscord,
30+
url: 'https://discord.gg/zg3ge9VTgr',
31+
label: 'Discord',
32+
color: 'blue-600',
33+
},
34+
{
35+
icon: faYoutube,
36+
url: 'https://www.youtube.com/@itzispyder',
37+
label: 'YouTube',
38+
color: 'red-600',
39+
},
40+
{
41+
icon: faGithub,
42+
url: 'https://github.com/clickcrystals-development/ClickCrystals',
43+
label: 'GitHub',
44+
color: 'slate-800',
45+
},
46+
].map(({ icon, url, label, color }) => (
47+
<Link
48+
key={label}
49+
href={url}
50+
target="_blank"
51+
aria-label={label}
52+
className={`text-${color} bg-white w-9 h-9 flex items-center justify-center rounded-full hover:opacity-80 shadow transition`}
53+
>
54+
<FontAwesomeIcon icon={icon} size="lg" />
55+
</Link>
56+
))}
57+
{[
58+
{
59+
color: '[#f16436]',
60+
label: 'CurseForge',
61+
link: 'https://www.curseforge.com/minecraft/mc-mods/clickcrystals',
62+
icon: '/icons/curseforge.svg',
63+
},
64+
{
65+
color: '[#1f86a0]',
66+
label: 'PlanetMC',
67+
link: 'https://www.planetminecraft.com/mod/clickcrystal/',
68+
icon: '/icons/planetmc.svg',
69+
},
70+
{
71+
color: '[#39a822]',
72+
label: 'Modrinth',
73+
link: 'https://modrinth.com/mod/clickcrystals',
74+
icon: '/icons/modrinth.svg',
75+
},
76+
].map(({ color, label, link, icon }) => (
77+
<Link
78+
key={label}
79+
href={link}
80+
target="_blank"
81+
aria-label={label}
82+
className={`text-white bg-${color} w-9 h-9 flex items-center justify-center rounded-full hover:opacity-80 shadow transition`}
83+
>
84+
<Image
85+
src={icon}
86+
alt={label}
87+
width={24}
88+
height={24}
89+
className="size-6 md:size-5"
90+
/>
91+
</Link>
92+
))}
93+
</div>
94+
</div>
95+
<div className="flex flex-col md:flex-row md:items-center md:justify-center gap-1 md:gap-3 text-blue-200 text-xs text-center md:text-left">
96+
<span>
97+
Website made by{' '}
98+
<Link
99+
target="_blank"
100+
href="https://ashish.top"
101+
className="text-white"
102+
>
103+
Ashish Agarwal
104+
</Link>
105+
</span>
106+
<span className="hidden md:inline">|</span>
107+
<span>
108+
&copy; {new Date().getFullYear()} ClickCrystals. Not affiliated with
109+
Mojang or Microsoft.
110+
</span>
111+
</div>
7112
</footer>
8113
);
9114
}

lib/getDownloads.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function getPlanetMCDownloads(): Promise<number> {
6464
).text();
6565
const downloads = parseInt(downloadText.replace(/,/g, ''), 10);
6666

67-
return Number.isNaN(downloads) ? 10020 : downloads; // hardcoded
67+
return Number.isNaN(downloads) ? 10429 : downloads; // hardcoded
6868
}
6969

7070
export async function getTotalDownloads(): Promise<number> {

lib/getLatest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Make sure this is the latest supported minecraft version by ClickCrystals
22
// Like 1.21.1, however remove the dots.
3-
const latestMc = '1211';
3+
const latestMc = '1218';
44

55
import { getParsedReleases } from '@/lib/getReleases';
66

77
export async function getLatestLink() {
88
try {
99
const resp = await getParsedReleases();
10-
const link = resp[0][latestMc];
10+
const link = resp[0]['latestMc'];
1111

1212
return link;
1313
} catch (err) {

0 commit comments

Comments
 (0)