Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/Sections/download/DownloadTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export default function DownloadTable() {

useEffect(() => {
const versionColumns = [
{ field: '1218', headerName: '1.21.8' },
{ field: '1217', headerName: '1.21.7' },
{ field: '1216', headerName: '1.21.6' },
{ field: '1215', headerName: '1.21.5' },
{ field: '1211', headerName: '1.21.1' },
Expand Down
13 changes: 0 additions & 13 deletions components/ui/Footer/Content.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions components/ui/Footer/FooterInfo.tsx

This file was deleted.

80 changes: 0 additions & 80 deletions components/ui/Footer/FooterLinks.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions components/ui/Footer/Info.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions components/ui/Footer/Social.tsx

This file was deleted.

30 changes: 0 additions & 30 deletions components/ui/Footer/Socials.tsx

This file was deleted.

111 changes: 108 additions & 3 deletions components/ui/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,114 @@
import FooterLinks from './FooterLinks';
import Link from 'next/link';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
faDiscord,
faGithub,
faYoutube,
} from '@fortawesome/free-brands-svg-icons';
import Image from 'next/image';

export default function Footer() {
return (
<footer className="m-0">
<FooterLinks />
<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">
<div className="flex flex-col md:flex-row items-center justify-between gap-6">
<div className="flex items-center gap-3">
<Image
src="/icon.png"
alt="ClickCrystals"
width={40}
height={40}
className="rounded-lg shadow"
/>
<span className="text-white font-extrabold text-xl tracking-tight">
ClickCrystals
</span>
</div>
<div className="flex items-center gap-4">
{[
{
icon: faDiscord,
url: 'https://discord.gg/zg3ge9VTgr',
label: 'Discord',
color: 'blue-600',
},
{
icon: faYoutube,
url: 'https://www.youtube.com/@itzispyder',
label: 'YouTube',
color: 'red-600',
},
{
icon: faGithub,
url: 'https://github.com/clickcrystals-development/ClickCrystals',
label: 'GitHub',
color: 'slate-800',
},
].map(({ icon, url, label, color }) => (
<Link
key={label}
href={url}
target="_blank"
aria-label={label}
className={`text-${color} bg-white w-9 h-9 flex items-center justify-center rounded-full hover:opacity-80 shadow transition`}
>
<FontAwesomeIcon icon={icon} size="lg" />
</Link>
))}
{[
{
color: '[#f16436]',
label: 'CurseForge',
link: 'https://www.curseforge.com/minecraft/mc-mods/clickcrystals',
icon: '/icons/curseforge.svg',
},
{
color: '[#1f86a0]',
label: 'PlanetMC',
link: 'https://www.planetminecraft.com/mod/clickcrystal/',
icon: '/icons/planetmc.svg',
},
{
color: '[#39a822]',
label: 'Modrinth',
link: 'https://modrinth.com/mod/clickcrystals',
icon: '/icons/modrinth.svg',
},
].map(({ color, label, link, icon }) => (
<Link
key={label}
href={link}
target="_blank"
aria-label={label}
className={`text-white bg-${color} w-9 h-9 flex items-center justify-center rounded-full hover:opacity-80 shadow transition`}
>
<Image
src={icon}
alt={label}
width={24}
height={24}
className="size-6 md:size-5"
/>
</Link>
))}
</div>
</div>
<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">
<span>
Website made by{' '}
<Link
target="_blank"
href="https://ashish.top"
className="text-white"
>
Ashish Agarwal
</Link>
</span>
<span className="hidden md:inline">|</span>
<span>
&copy; {new Date().getFullYear()} ClickCrystals. Not affiliated with
Mojang or Microsoft.
</span>
</div>
</footer>
);
}
2 changes: 1 addition & 1 deletion lib/getDownloads.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export async function getPlanetMCDownloads(): Promise<number> {
).text();
const downloads = parseInt(downloadText.replace(/,/g, ''), 10);

return Number.isNaN(downloads) ? 10020 : downloads; // hardcoded
return Number.isNaN(downloads) ? 10429 : downloads; // hardcoded
}

export async function getTotalDownloads(): Promise<number> {
Expand Down
4 changes: 2 additions & 2 deletions lib/getLatest.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Make sure this is the latest supported minecraft version by ClickCrystals
// Like 1.21.1, however remove the dots.
const latestMc = '1211';
const latestMc = '1218';

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

export async function getLatestLink() {
try {
const resp = await getParsedReleases();
const link = resp[0][latestMc];
const link = resp[0]['latestMc'];

return link;
} catch (err) {
Expand Down
4 changes: 4 additions & 0 deletions lib/getReleases.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use server';

type Assets = {
'1218': null | React.ReactElement;
'1217': null | React.ReactElement;
'1216': null | React.ReactElement;
'1215': null | React.ReactElement;
'1211': null | React.ReactElement;
Expand Down Expand Up @@ -85,6 +87,8 @@ export async function getParsedReleases() {

let downloads = 0;
let assetsData: Assets = {
'1218': null,
'1217': null,
'1216': null,
'1215': null,
'1211': null,
Expand Down
Loading