Skip to content

Commit 4c120c6

Browse files
committed
Add libraries section to linwood website
1 parent dba2224 commit 4c120c6

File tree

11 files changed

+149
-9
lines changed

11 files changed

+149
-9
lines changed

src/blog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const getProjects = async (
1616
force?: boolean
1717
): Promise<CollectionEntry<"projects">[]> => {
1818
const projects = await getCollection("projects");
19-
return projects.filter((project) => !project.data.unlisted || force);
19+
return projects.filter((project) => !project.data.unlisted || force).sort((a, b) => (a.data.order ?? 0) - (b.data.order ?? 0));
2020
};
2121

2222
export const getProject = async (

src/components/ProjectHero.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const current = project && await getProject(project);
1515
<div class="row gap-md pv-sm align-center justify-stretch">
1616
<img
1717
class="thumbnail-image"
18-
src={`/logos/${current.id}.svg`}
18+
src={`/logos/${current.data.logo ?? current.id}.svg`}
1919
alt={current.data.title}
2020
/>
2121
<div class="col gap-md">

src/content/config.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { file } from "astro/loaders";
12
import { defineCollection, reference, z } from "astro:content";
23

34
const blog = defineCollection({
@@ -24,6 +25,8 @@ const projects = defineCollection({
2425
website: z.string().url().optional(),
2526
translation: z.string().optional(),
2627
unlisted: z.boolean().default(false),
28+
logo: z.string().optional(),
29+
order: z.number().optional(),
2730
}),
2831
});
2932
const authors = defineCollection({
@@ -35,4 +38,14 @@ const authors = defineCollection({
3538
}),
3639
});
3740

38-
export const collections = { blog, projects, authors };
41+
const libraries = defineCollection({
42+
loader: file("src/content/libraries.json", {
43+
}),
44+
schema: z.object({
45+
id: z.string(),
46+
description: z.string(),
47+
url: z.string().url(),
48+
}),
49+
});
50+
51+
export const collections = { blog, projects, authors, libraries };

src/content/libraries.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[
2+
{
3+
"id": "Linwood Launch",
4+
"description": "Launcher website for linwood apps",
5+
"url": "https://github.com/LinwoodDev/Launch"
6+
},
7+
{
8+
"id": "Linwood Style",
9+
"description": "A minimal modern gui css framework",
10+
"url": "https://github.com/LinwoodDev/Style"
11+
},
12+
{
13+
"id": "networker",
14+
"description": "Universal Networking library for dart/flutter",
15+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/networker/networker"
16+
},
17+
{
18+
"id": "networker_crypto",
19+
"description": "Useful crypto utilities for the networker package for dart/flutter",
20+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/networker_crypto"
21+
},
22+
{
23+
"id": "networker_socket",
24+
"description": "A web socket implementation of the networker API for dart/flutter",
25+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/networker_socket"
26+
},
27+
{
28+
"id": "lw_sysapi",
29+
"description": "Get system information, access to system api",
30+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/lw_sysapi"
31+
},
32+
{
33+
"id": "dart_leap",
34+
"description": "Helper library for dart",
35+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/dart_leap"
36+
},
37+
{
38+
"id": "material_leap",
39+
"description": "Additional material design widgets and helpers for flutter",
40+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/material_leap"
41+
},
42+
{
43+
"id": "generate_leap",
44+
"description": "Helper functions for generate functions",
45+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/generate_leap"
46+
},
47+
{
48+
"id": "lw_file_system",
49+
"description": "Cross platform file system for flutter",
50+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/lw_file_system"
51+
},
52+
{
53+
"id": "lw_file_system_api",
54+
"description": "Pure dart api for lw_file_system",
55+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/lw_file_system_api"
56+
},
57+
{
58+
"id": "consoler",
59+
"description": "Dart console system",
60+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/consoler"
61+
},
62+
{
63+
"id": "Localizer",
64+
"description": "Easy localization framework for Dart",
65+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/localizer"
66+
},
67+
{
68+
"id": "flutter_localizer",
69+
"description": "Flutter localization framework based on localizer",
70+
"url": "https://github.com/LinwoodDev/dart_pkgs/blob/main/packages/flutter_localizer"
71+
}
72+
]

src/content/projects/butterfly.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"source": "https://github.com/LinwoodDev/butterfly",
44
"description": "🎨 Powerful, minimalistic, cross-platform, opensource note-taking app",
55
"website": "https://docs.butterfly.linwood.dev",
6-
"translation": "https://translate.linwood.dev/butterfly/"
6+
"translation": "https://translate.linwood.dev/butterfly/",
7+
"order": 1
78
}

src/content/projects/flow.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"title": "Linwood Flow",
33
"source": "https://github.com/LinwoodDev/Flow",
44
"description": "WIP: Feature rich event, group and time managment system",
5-
"website": "https://docs.flow.linwood.dev"
5+
"website": "https://docs.flow.linwood.dev",
6+
"order": 2
67
}

src/content/projects/luna.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"title": "Linwood Luna",
3+
"source": "https://github.com/LinwoodDev/Luna",
4+
"description": "WIP: Library for Universal Networking Assets",
5+
"website": "https://luna.linwood.dev",
6+
"logo": "logo",
7+
"order": 5
8+
}

src/content/projects/setonix.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"title": "Linwood Setonix",
33
"source": "https://github.com/LinwoodDev/Setonix",
44
"description": "WIP: Powerful, customizable, cross-platform, opensource table sandbox game",
5-
"website": "https://setonix.world"
5+
"website": "https://setonix.world",
6+
"order": 3
67
}

src/content/projects/swamp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"title": "Linwood Swamp",
3+
"source": "https://github.com/LinwoodDev/Swamp",
4+
"description": "WIP: Universal Secure Web-Socket Application Messaging Proxy for Linwood Apps",
5+
"website": "https://swamp.linwood.dev",
6+
"logo": "logo",
7+
"order": 4
8+
}

src/pages/[project]/[...page].astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import DefaultLayout from "../../layouts/DefaultLayout.astro";
55
import ProjectHero from "@components/ProjectHero.astro";
66
import { PAGE_SIZE } from "../blog/[...page].astro";
77
import type { PaginateFunction } from "astro";
8-
import type { CollectionEntry } from "astro:content";
98
109
export async function getStaticPaths({
1110
paginate,

0 commit comments

Comments
 (0)