Skip to content

Commit 5977c0e

Browse files
feat andronix-docs-v3 (powered by fumadocs)
1 parent 6e5d58b commit 5977c0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4661
-7251
lines changed

components/badge.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
export default function Badge({children}) {
2-
3-
return (
4-
<div className={"rounded-full inline-flex text-sm bg-orange-700 bg-opacity-10 w-fit text-orange-400 px-2 py-0.5"}>
5-
<p>{children}</p>
6-
</div>
7-
)
1+
export default function Badge({ children }: { children: React.ReactNode }) {
2+
return (
3+
<span
4+
className={
5+
"rounded-full inline-flex items-center text-sm dark:bg-orange-500/20 bg-opacity-10 dark:text-orange-400 px-2 py-0.5 ml-2 bg-orange-500/10 text-orange-600"
6+
}
7+
>
8+
{children}
9+
</span>
10+
);
811
}

components/blog_index.tsx

Lines changed: 67 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,71 @@
1-
import { getPagesUnderRoute } from "nextra/context";
21
import Link from "next/link";
32

4-
export default function BlogIndex({ more = "Read more" }) {
5-
return getPagesUnderRoute("/blog").reverse().map((page) => {
3+
interface BlogPost {
4+
title: string;
5+
slug: string;
6+
description?: string;
7+
date?: string;
8+
}
69

7-
return (
8-
<div key={page.route} className="mb-10">
9-
<h3>
10-
<Link
11-
href={page.route}
12-
style={{ color: "inherit", textDecoration: "none" }}
13-
className="block font-semibold mt-8 text-2xl "
14-
>
15-
{/*@ts-ignore*/}
16-
{page.meta?.title || page.frontMatter?.title || page.name}
17-
</Link>
18-
</h3>
19-
<p className="opacity-80 mt-6 leading-7">
20-
{/*@ts-ignore*/}
21-
{page.frontMatter?.description}{" "}
22-
<span className="inline-block">
23-
<Link
24-
href={page.route}
25-
className="text-[color:hsl(var(--nextra-primary-hue),100%,50%)] underline underline-offset-2 decoration-from-font"
26-
>
27-
{more + " →"}
28-
</Link>
29-
</span>
30-
</p>
31-
{/*@ts-ignore*/}
32-
{page.frontMatter?.date ? (
33-
<p className="opacity-50 text-sm mt-6 leading-7">
34-
{/*@ts-ignore*/}
35-
{page.frontMatter.date}
10+
const blogPosts: BlogPost[] = [
11+
{
12+
title: "Calling for Andronix Maintainers",
13+
slug: "andronix-maintainers",
14+
description: "We are looking for maintainers for Andronix. If you are interested, please read this blog.",
15+
date: "December 26, 2023"
16+
},
17+
{
18+
title: "Andronix 7.0 - Refresh",
19+
slug: "v7-0",
20+
description: "Long time no-see, and here we are again. Andronix is getting updated to version 7.0.",
21+
date: "January 17, 2023"
22+
},
23+
{
24+
title: "Andronix 6.0 - A new beginning...",
25+
slug: "v6-0",
26+
description: "Andronix 6.0 is here. A new beginning for Andronix. Read more about the changes in this blog.",
27+
date: "August 11, 2021"
28+
},
29+
{
30+
title: "Andronix, Termux and F-Droid",
31+
slug: "andronix-termux-and-f-droid",
32+
description: "Information about migrating Termux from Google Play Store to F-Droid after the shut-down of Bintray, a package hosting service from Jfrog.",
33+
date: "July 14, 2021"
34+
}
35+
];
36+
37+
export default function BlogIndex({ more = "Read more" }: { more?: string }) {
38+
return (
39+
<>
40+
{blogPosts.map((post) => (
41+
<div key={post.slug} className="mb-10">
42+
<h3>
43+
<Link
44+
href={`/blog/${post.slug}`}
45+
style={{ color: "inherit", textDecoration: "none" }}
46+
className="block font-semibold mt-8 text-2xl "
47+
>
48+
{post.title}
49+
</Link>
50+
</h3>
51+
<p className="opacity-80 mt-6 leading-7">
52+
{post.description}{" "}
53+
<span className="inline-block">
54+
<Link
55+
href={`/blog/${post.slug}`}
56+
className="text-primary underline underline-offset-2 decoration-from-font"
57+
>
58+
{more + " →"}
59+
</Link>
60+
</span>
3661
</p>
37-
) : null}
38-
</div>
39-
);
40-
});
41-
}
62+
{post.date && (
63+
<p className="opacity-50 text-sm mt-6 leading-7">
64+
{post.date}
65+
</p>
66+
)}
67+
</div>
68+
))}
69+
</>
70+
);
71+
}

components/button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export default function AndronixButton({
88
}: { link: string, children?: any, className?: string }) {
99
return (
1010
<Link href={link}
11-
className={`${className} px-3 flex space-x-2 my-4 items-center justify-center py-2 bg-orange-500 rounded-md w-fit cursor-pointer hover:scale-105 transform transition duration-200`}>
12-
<span className={'text-bold text-white'}>{children}</span>
13-
<FiChevronRight/>
11+
className={`${className} inline-flex items-center gap-1 text-sm font-medium text-orange-600 dark:text-orange-400 hover:text-orange-700 dark:hover:text-orange-300 underline decoration-orange-600/30 dark:decoration-orange-400/30 underline-offset-4 hover:decoration-orange-600 dark:hover:decoration-orange-400 transition-colors`}>
12+
<span>{children}</span>
13+
<FiChevronRight className="w-4 h-4"/>
1414
</Link>
1515
)
1616
}

components/imagera.tsx

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
11
import React from "react";
2+
import { ImageZoom } from "fumadocs-ui/components/image-zoom";
23
import Image from "next/image";
34

45
export default function Imagera({
5-
src,
6-
height = 400,
7-
alt = "image"
8-
}: { src: string, height?: number, alt?: string }) {
9-
10-
return (
11-
<div>
12-
<br/>
13-
{!src.includes(".gif") ?
14-
<Image className={"mt-4"} src={src} unoptimized={src.includes(".gif")} alt={alt} width={200}
15-
height={height}/> :
16-
<img className={"mt-4"} src={src} alt={alt} width={200} height={height}/>
17-
}
18-
</div>
19-
)
6+
src,
7+
height = 400,
8+
alt = "image",
9+
}: {
10+
src: string;
11+
height?: number;
12+
alt?: string;
13+
}) {
14+
return (
15+
<div>
16+
<br />
17+
{!src.includes(".gif") ? (
18+
<ImageZoom
19+
className={"mt-4"}
20+
src={src}
21+
unoptimized={src.includes(".gif")}
22+
alt={alt}
23+
width={200}
24+
height={height}
25+
/>
26+
) : (
27+
<img
28+
className={"mt-4"}
29+
src={src}
30+
alt={alt}
31+
width={200}
32+
height={height}
33+
/>
34+
)}
35+
</div>
36+
);
2037
}

next-env.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
6+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

next.config.js

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

package.json

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,26 @@
1010
"author": "Andronix <[email protected]>",
1111
"license": "MIT",
1212
"dependencies": {
13+
"@tailwindcss/postcss": "^4.1.14",
1314
"axios": "^1.4.0",
14-
"next": "^13.0.6",
15-
"nextra": "latest",
16-
"nextra-theme-docs": "latest",
17-
"react": "^18.2.0",
18-
"react-dom": "^18.2.0",
19-
"react-icons": "^4.8.0"
15+
"fumadocs-core": "^15.8.5",
16+
"fumadocs-mdx": "^12.0.3",
17+
"fumadocs-ui": "^15.8.5",
18+
"lucide-react": "^0.545.0",
19+
"next": "^15.1.6",
20+
"react": "^19.0.0",
21+
"react-dom": "^19.0.0",
22+
"react-icons": "^5.5.0"
2023
},
2124
"devDependencies": {
2225
"@cloudflare/next-on-pages": "^1.8.3",
23-
"@tailwindcss/typography": "^0.5.9",
24-
"@types/node": "18.11.10",
25-
"autoprefixer": "^10.4.14",
26-
"postcss": "^8.4.23",
27-
"tailwindcss": "^3.3.2",
28-
"typescript": "^4.9.3"
26+
"@tailwindcss/typography": "^0.5.19",
27+
"@types/node": "^22.10.5",
28+
"@types/react": "^19.0.6",
29+
"@types/react-dom": "^19.0.2",
30+
"autoprefixer": "^10.4.21",
31+
"postcss": "^8.5.6",
32+
"tailwindcss": "^4.1.8",
33+
"typescript": "^5.7.3"
2934
}
3035
}

pages/_app.js

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

pages/_meta.json

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

pages/account/_meta.json

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

0 commit comments

Comments
 (0)