Skip to content

Commit 293fe7c

Browse files
Merge pull request #69 from Gnkalk/main
add nobarcloud
2 parents 55e451f + a4163af commit 293fe7c

4 files changed

Lines changed: 84 additions & 21 deletions

File tree

components/NobarBanner.jsx

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { useTranslation } from "@/utils/translation";
2+
import React from "react";
3+
4+
export default function NobarBanner() {
5+
const { t } = useTranslation();
6+
7+
return (
8+
<div className="flex flex-col md:flex-row items-center justify-center gap-4 px-8 py-4 mt-auto bg-gradient-to-r from-purple-200 to-purple-100 dark:from-fuchsia-950 dark:to-fuchsia-800 [&+*]:mt-0">
9+
<NobarLogoSvg className="w-24 dark:grayscale dark:invert" />
10+
<div className="pt-2 text-center md:text-start">
11+
<h4 className="font-bold text-lg">{t("nobar.title")}</h4>
12+
<p>{t("nobar.description")}</p>
13+
</div>
14+
</div>
15+
);
16+
}
17+
18+
function NobarLogoSvg(props) {
19+
return (
20+
<svg
21+
xmlns="http://www.w3.org/2000/svg"
22+
fill="none"
23+
viewBox="0 0 74 54"
24+
{...props}
25+
>
26+
<path
27+
fill="#4E3983"
28+
d="M56.617 23.373c2.167.283 4.224.337 6.158.843 10.528 2.762 14.606 15.005 8.08 23.987-2.804 3.862-6.367 6.028-11.324 5.777-3.545-.181-7.108-.023-10.662-.041-1.504-.01-2.619-.787-2.987-2-.373-1.233.09-2.645 1.226-3.241.592-.31 1.333-.453 2.012-.462 3.79-.041 7.58-.065 11.368 0 1.818.033 3.246-.59 4.478-1.877 2.152-2.243 3.396-4.862 3.243-7.99-.278-5.667-4.543-9.332-10.486-9.046a22.5 22.5 0 0 0-3.59.483c-2.912.616-4.472-1.064-3.89-3.942.437-2.148.823-4.415.602-6.567-.511-4.957-4.359-8.25-9.458-8.512-3.961-.205-7.336 1.15-10.224 3.832-.553.512-1.235.992-1.94 1.206-1.175.355-2.475-.357-3.046-1.444-.583-1.118-.38-2.435.607-3.427 3.15-3.176 6.929-5.19 11.392-5.714 6.062-.712 11.323.944 15.29 5.75 2.55 3.09 3.381 6.775 3.244 10.714-.021.578-.063 1.156-.093 1.665z"
29+
></path>
30+
<path
31+
fill="#6549AA"
32+
d="M23.77 19.354c7.95.027 15.004 5.557 16.83 13.226.613 2.565-1.126 4.537-3.443 3.89-1.226-.342-1.809-1.23-2.101-2.419-1.184-4.838-4.93-8.187-9.88-8.884-4.941-.694-9.925 2.1-12.008 6.73-2.108 4.678-.858 10.258 2.998 13.5 2.108 1.77 4.508 2.72 7.276 2.815 2.404.08 3.805 2.047 2.909 4.01-.568 1.243-1.609 1.72-2.942 1.714C15.281 53.9 7.85 47.49 6.666 39.489 5.207 29.6 11.637 20.954 21.55 19.503c.732-.107 1.48-.101 2.218-.149zM13.69 21.178s-5.069-4.338-6.214-10.11C6.104 4.135 9.946 0 9.946 0"
33+
></path>
34+
<path
35+
fill="#4E3983"
36+
d="M9.945 0s5.626 4.445 6.23 10.157-2.484 11.017-2.484 11.017"
37+
></path>
38+
<path
39+
fill="#6549AA"
40+
d="M13.368 21.46s-4.068 1.255-7.76-.08C1.916 20.048 0 16.637 0 16.637"
41+
></path>
42+
<path
43+
fill="#4E3983"
44+
d="M0 16.637s4.068-1.254 7.76.08c3.692 1.332 5.605 4.747 5.605 4.747"
45+
></path>
46+
</svg>
47+
);
48+
}

i18n/en.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,10 @@ export default {
9999
title: 'Image Details'
100100
},
101101

102+
nobar: {
103+
title: "Sponsored by NobarCloud",
104+
description: "Nobar 🌱☁️ – Your platform for cloud servers & Kubernetes"
105+
},
106+
102107
error_404: 'Error 404 - Page Not Found'
103108
}

i18n/fa.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,10 @@ export default {
111111
title: 'مشخصات ایمیج'
112112
},
113113

114+
nobar: {
115+
title: "با حمایت نوبرکلاد",
116+
description: "نوبر 🌱☁️ پلتفرم تخصصی ساخت سرورهای ابری و کوبرنتیز "
117+
},
118+
114119
error_404: 'خطای ۴۰۴ — صفحهٔ مورد نظر یافت نشد'
115120
}

pages/index.jsx

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,37 @@ import Image from "next/image";
22
import Link from "next/link";
33
import { Download } from "lucide-react";
44
import { Button } from "@/components/ui/button";
5-
import { useTranslation } from "@/utils/translation"
5+
import { useTranslation } from "@/utils/translation";
6+
import NobarBanner from "@/components/NobarBanner";
67

78
export default function Home() {
89
const { t } = useTranslation();
910
return (
10-
<main className="py-12 md:py-24 lg:py-32 xl:py-48">
11-
<div className="mx-auto container px-4 md:px-6">
12-
<div className="flex flex-col items-center space-y-8 text-center">
13-
<h1 className="text-3xl font-bold sm:text-4xl md:text-5xl lg:text-6xl/none">
14-
{t('home.title')}
15-
</h1>
16-
<p className="mx-auto max-w-[770px] text-muted-foreground md:text-xl">
17-
{t('home.description')}
18-
</p>
19-
<div className="flex gap-4">
20-
<Button asChild>
21-
<Link href="/download">
22-
<Download className="me-2 h-4 w-4" /> {t('home.downloadButton')}
23-
</Link>
24-
</Button>
25-
<Button variant="outline" asChild>
26-
<Link href="/features">{t('home.learnMoreButton')}</Link>
27-
</Button>
11+
<>
12+
<main className="py-12 md:py-24 lg:py-32 xl:py-48">
13+
<div className="mx-auto container px-4 md:px-6">
14+
<div className="flex flex-col items-center space-y-8 text-center">
15+
<h1 className="text-3xl font-bold sm:text-4xl md:text-5xl lg:text-6xl/none">
16+
{t("home.title")}
17+
</h1>
18+
<p className="mx-auto max-w-[770px] text-muted-foreground md:text-xl">
19+
{t("home.description")}
20+
</p>
21+
<div className="flex gap-4">
22+
<Button asChild>
23+
<Link href="/download">
24+
<Download className="me-2 h-4 w-4" />{" "}
25+
{t("home.downloadButton")}
26+
</Link>
27+
</Button>
28+
<Button variant="outline" asChild>
29+
<Link href="/features">{t("home.learnMoreButton")}</Link>
30+
</Button>
31+
</div>
2832
</div>
2933
</div>
30-
</div>
31-
</main>
34+
</main>
35+
<NobarBanner />
36+
</>
3237
);
3338
}

0 commit comments

Comments
 (0)