-
{item.label}
-
- {posts && posts.map((post: {data: {project: {title: string, logo: string}}}) => (
-
- ))}
-
-
\ No newline at end of file
+
+
+
+
{item.label}
+
+ {
+ posts &&
+ posts.map(
+ (post: { data: { project: { title: string; logo: string } } }) => (
+
+ ),
+ )
+ }
+
+
diff --git a/src/components/projects/ProjectListing.astro b/src/components/projects/ProjectListing.astro
index 6bbc542..a86ba47 100644
--- a/src/components/projects/ProjectListing.astro
+++ b/src/components/projects/ProjectListing.astro
@@ -1,15 +1,19 @@
---
import { Image } from "astro:assets";
-const {post} = Astro.props;
+import type { CollectionEntry } from "astro:content";
// import logo from `${post.data.project.logo}`;
+const { post } = Astro.props;
+const logoUrl = post.data.project.logo;
-const logoUrl = post.data.project.logo
+console.log("listing post", Astro.props.post);
---
-
-
-
+
diff --git a/src/components/search/NavSearch/NavResults.tsx b/src/components/search/NavSearch/NavResults.tsx
deleted file mode 100644
index 1e68e97..0000000
--- a/src/components/search/NavSearch/NavResults.tsx
+++ /dev/null
@@ -1,132 +0,0 @@
-import dayjs from "dayjs";
-import {
- createEffect,
- createResource,
- createSignal,
- For,
- Match,
- Switch,
- type Resource,
-} from "solid-js";
-
-const isDev = import.meta.env.DEV;
-
-const PAGE_SIZE = 5;
-
-const getArticle = async (result: any) => {
- return await result.data();
-};
-
-const getType = (type: "blogs" | "news" | "events" | "page") => {
- switch (type) {
- case "blogs":
- return "Blog";
- case "news":
- return "Newsroom";
- case "events":
- return "Event";
- case "page":
- return "Page";
- }
-};
-
-const NavResult = ({ result }: { result: any }) => {
- const [article] = createResource(result, getArticle);
- return (
-
-
-
-
-
-
-
- {article()?.meta.title}
- {" | Linaro"}
-
-
- {/*
{article()?.meta.summary}
*/}
-
-
-
-
-
-
-
- {article()?.meta.title}
- {" | "}
- {getType(article().filters.type[0])}
- {" | "}
- {article()?.meta.author}
-
-
-
-
-
-
-
-
-
- {article()?.meta.title}
- {" | "}
- {getType(article().filters.type[0])}
- {" | "}
- {article()?.meta.dates}
- {" | "}
- {article()?.meta.location}
-
-
-
-
-
-
-
- );
-};
-
-const NavResults = ({
- results,
-}: {
- results: Resource
;
- onClearSearch: (e: Event) => void;
-}) => {
- const [page, setPage] = createSignal(1);
- const [paginatedResults, setPaginatedResults] = createSignal([]);
-
- createEffect(() => {
- setPaginatedResults(results()?.results.slice(0, page() * PAGE_SIZE) ?? []);
- });
-
- return (
-
-
-
- Loading results...
-
- 0}>
-
-
- Showing {paginatedResults().length} of {results().results.length}{" "}
- results
-
-
-
- {results().results.length} results
-
-
-
- );
-};
-
-export default NavResults;
diff --git a/src/components/search/NavSearch/NavSearch.tsx b/src/components/search/NavSearch/NavSearch.tsx
deleted file mode 100644
index 5af1e03..0000000
--- a/src/components/search/NavSearch/NavSearch.tsx
+++ /dev/null
@@ -1,99 +0,0 @@
-import {
- createEffect,
- createResource,
- createSignal,
- Show,
- type JSX,
- type ResourceFetcher,
-} from "solid-js";
-import NavResults from "./NavResults";
-import { FaSolidXmark } from "solid-icons/fa";
-
-const bundlePath = `${import.meta.env.BASE_URL}pagefind/`;
-const pagefind = await import(/* @vite-ignore */ `${bundlePath}pagefind.js`);
-pagefind.preload("");
-export type Filters = Record;
-
-export type SearchQuery = { query: string | null } | null;
-
-const fetchResults: ResourceFetcher = async (
- search
-) => {
- if (!search) return null;
- return await pagefind.debouncedSearch(search.query, {
- // filters: { type: ["page"] },
- });
-};
-
-const NavSearch = () => {
- const [search, setSearch] = createSignal(null);
- const [results, { mutate }] = createResource(search, fetchResults);
-
- const onClearSearch = (e: Event) => {
- e.preventDefault();
- setSearch(null);
- mutate(null);
- };
-
- const onSubmit: JSX.EventHandler = (e) => {
- e.preventDefault();
- if (e.target) {
- const query = (e.target as any)[0].value;
- const url = new URL(window.location.href);
- url.pathname = "/search";
- if (query) {
- url.searchParams.append("query", query);
- }
- window.location.href = url.href;
- }
- };
-
- const onInput: JSX.InputEventHandler = (e) => {
- if (!e.target.value || e.target.value === "") {
- setSearch(null);
- mutate(null);
- return;
- }
-
- setSearch({
- ...search(),
- query: e.target.value ?? null,
- });
- };
-
- return (
-
- );
-};
-
-export default NavSearch;
diff --git a/src/components/search/NavSearch/SearchModal.astro b/src/components/search/NavSearch/SearchModal.astro
deleted file mode 100644
index fd6fe63..0000000
--- a/src/components/search/NavSearch/SearchModal.astro
+++ /dev/null
@@ -1,71 +0,0 @@
----
-import { Icon } from "astro-icon/components";
-import NavSearch from "./NavSearch";
-
-const { id } = Astro.props;
----
-
-
-
-
-
-
-
diff --git a/src/components/search/SiteResults.tsx b/src/components/search/SiteResults.tsx
deleted file mode 100644
index 25d0ba8..0000000
--- a/src/components/search/SiteResults.tsx
+++ /dev/null
@@ -1,198 +0,0 @@
-import type { CollectionEntry } from "astro:content";
-import dayjs from "dayjs";
-import {
- createEffect,
- createResource,
- createSignal,
- For,
- Match,
- Show,
- Switch,
- type Resource,
-} from "solid-js";
-
-const isDev = import.meta.env.DEV;
-const isSsr = import.meta.env.SSR;
-
-const PAGE_SIZE = 12;
-
-const getArticle = async (result: any) => {
- return await result.data();
-};
-
-const getType = (type: "blogs" | "news" | "events" | "page") => {
- switch (type) {
- case "blogs":
- return "Blog";
- case "news":
- return "Newsroom";
- case "events":
- return "Event";
- case "page":
- return "Page";
- }
-};
-
-const SiteResult = ({
- result,
- tags,
- isSsr,
-}: {
- result: any;
- tags: CollectionEntry<"tags">[];
- isSsr: boolean;
-}) => {
- const [article] = createResource(result, getArticle);
-
- return (
-
-
-
-
-
-
-
-
-
-
-
- {article()?.meta.title}
- {" | Linaro"}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {article()?.meta.title}
- {" | "}
- {getType(article().filters.type[0])}
- {" | "}
- {article()?.meta.author}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {article()?.meta.title}
- {" | "}
- {getType(article().filters.type[0])}
- {" | "}
- {article()?.meta.dates}
- {" | "}
- {article()?.meta.location}
-
-
-
-
-
-
-
-
- );
-};
-
-const BlogResults = ({
- results,
- onClearSearch,
- tags,
- isSsr,
-}: {
- results: Resource;
- onClearSearch: () => void;
- tags: CollectionEntry<"tags">[];
- isSsr: boolean;
-}) => {
- const [page, setPage] = createSignal(1);
- const [paginatedResults, setPaginatedResults] = createSignal([]);
-
- createEffect(() => {
- setPaginatedResults(results()?.results.slice(0, page() * PAGE_SIZE) ?? []);
- });
-
- const onClickMore = () => {
- setPage((prev) => prev + 1);
- };
-
- return (
-
-
-
- Loading results...
-
- 0}>
- {results()?.results.length} results
-
-
- {(result) => (
-
- )}
-
-
-
- Showing {paginatedResults().length} of {results().results.length}{" "}
- results
-
-
-
-
-
-
-
- {results().results.length} results
-
-
-
-
-
- );
-};
-
-export default BlogResults;
diff --git a/src/components/search/SiteSearch.tsx b/src/components/search/SiteSearch.tsx
deleted file mode 100644
index 199f712..0000000
--- a/src/components/search/SiteSearch.tsx
+++ /dev/null
@@ -1,141 +0,0 @@
-import "solid-js";
-import {
- Show,
- createEffect,
- createMemo,
- createResource,
- createSignal,
- type JSX,
-} from "solid-js";
-import SiteResults from "./SiteResults";
-import { FaSolidChevronRight, FaSolidXmark } from "solid-icons/fa";
-import { AiFillTags } from "solid-icons/ai";
-import type { CollectionEntry } from "astro:content";
-
-const bundlePath = `${import.meta.env.BASE_URL}pagefind/`;
-const pagefind = await import(/* @vite-ignore */ `${bundlePath}pagefind.js`);
-
-export type Filters = Record;
-
-export type SearchQuery = { query: string | null; filters: Filters };
-
-const fetchResults = async ({
- query,
- filters,
-}: {
- query: string | null;
- filters: Filters;
-}) => {
- return await pagefind.debouncedSearch(query, {
- filters,
- });
-};
-
-const getQueryParams = ({ filters, query }: SearchQuery) => {
- const url = new URL(window.location.origin + window.location.pathname);
- if (query) url.searchParams.append("query", query);
- if (filters.tags?.length > 0) {
- url.searchParams.append("tags", filters.tags.join(","));
- }
-
- return url;
-};
-
-const SiteSearch = ({
- tags,
- isSsr,
-}: {
- tags: CollectionEntry<"tags">[];
- isSsr: boolean;
-}) => {
- const pathParams = createMemo(() => {
- const url_string = window.location.href;
- const url = new URL(url_string);
- return {
- query: url.searchParams.get("query"),
- };
- });
-
- const [search, setSearch] = createSignal<{
- query: string | null;
- filters: Filters;
- }>({
- query: pathParams().query ?? null,
- filters: {
- type: [],
- },
- });
-
- const updateSearch = (newSearch: SearchQuery) => {
- setSearch(newSearch);
- const url = getQueryParams(newSearch);
- window.history.pushState({}, "", url.toString());
- };
-
- const onClearSearch = () => {
- setSearch({
- query: null,
- filters: {
- type: [],
- },
- });
- window.history.pushState(
- {},
- "",
- window.location.origin + window.location.pathname
- );
- };
-
- const onClearQuery = () => {
- const newSearch = {
- ...search(),
- query: null,
- };
- updateSearch(newSearch);
- };
-
- const [results] = createResource(search, fetchResults);
-
- return (
-
- );
-};
-
-export default SiteSearch;
diff --git a/src/components/sections/Projects.astro b/src/components/sections/Projects.astro
index 47db87a..fe7b9f5 100644
--- a/src/components/sections/Projects.astro
+++ b/src/components/sections/Projects.astro
@@ -3,39 +3,63 @@ import { getEntry } from "astro:content";
import Categories from "../projects/Categories.astro";
import { getCollection } from "astro:content";
-const {data: categories} = await getEntry("data", "categories");
+const { data: categories } = await getEntry("data", "categories");
// const allPosts = await getCollection('posts');
-const osPosts = await getCollection('posts', ({data}) => { return data.category === 'os'});
-const librariesPosts = await getCollection('posts', ({data}) => { return data.category === 'libraries'});
-const middlewarePosts = await getCollection('posts', ({data}) => { return data.category === 'middleware'});
-const bigDataPosts = await getCollection('posts', ({data}) => { return data.category === 'bigdata'});
-const webPosts = await getCollection('posts', ({data}) => { return data.category === 'web'});
-const hpcPosts = await getCollection('posts', ({data}) => { return data.category === 'hpc'});
-const aiPosts = await getCollection('posts', ({data}) => { return data.category === 'ai'});
-const cloudPosts = await getCollection('posts', ({data}) => { return data.category === 'cloud'});
-const databasePosts = await getCollection('posts', ({data}) => { return data.category === 'database'});
-const storagePosts = await getCollection('posts', ({data}) => { return data.category === 'storage'});
+const osPosts = await getCollection("posts", ({ data }) => {
+ return data.category === "os";
+});
+const librariesPosts = await getCollection("posts", ({ data }) => {
+ return data.category === "libraries";
+});
+const middlewarePosts = await getCollection("posts", ({ data }) => {
+ return data.category === "middleware";
+});
+const bigDataPosts = await getCollection("posts", ({ data }) => {
+ return data.category === "bigdata";
+});
+const webPosts = await getCollection("posts", ({ data }) => {
+ return data.category === "web";
+});
+const hpcPosts = await getCollection("posts", ({ data }) => {
+ return data.category === "hpc";
+});
+const aiPosts = await getCollection("posts", ({ data }) => {
+ return data.category === "ai";
+});
+const cloudPosts = await getCollection("posts", ({ data }) => {
+ return data.category === "cloud";
+});
+const databasePosts = await getCollection("posts", ({ data }) => {
+ return data.category === "database";
+});
+const storagePosts = await getCollection("posts", ({ data }) => {
+ return data.category === "storage";
+});
// try by mapping all posts and see which is faster
const postsByCategory = {
- os: osPosts,
- middleware:middlewarePosts,
- libraries: librariesPosts,
- bigdata: bigDataPosts,
- web: webPosts,
- hpc: hpcPosts,
- ai: aiPosts,
- cloud: cloudPosts,
- database: databasePosts,
- storage: storagePosts
-}
-
+ os: osPosts,
+ middleware: middlewarePosts,
+ libraries: librariesPosts,
+ bigdata: bigDataPosts,
+ web: webPosts,
+ hpc: hpcPosts,
+ ai: aiPosts,
+ cloud: cloudPosts,
+ database: databasePosts,
+ storage: storagePosts,
+};
---
-
- { categories.map((item: {name: string, label: string}) => (
-
- ))}
-
-
\ No newline at end of file
+
+ {
+ categories.map((item: { name: string; label: string }) => (
+
+ ))
+ }
+
+
diff --git a/src/components/sections/Text.astro b/src/components/sections/Text.astro
index d8613fb..8c6f817 100644
--- a/src/components/sections/Text.astro
+++ b/src/components/sections/Text.astro
@@ -4,6 +4,4 @@ import * as marked from "marked";
const markdown = marked.parse(text_content.text);
---
-
+
diff --git a/src/content/config.ts b/src/content/config.ts
index f18b4ff..4d764f2 100644
--- a/src/content/config.ts
+++ b/src/content/config.ts
@@ -28,9 +28,9 @@ const pages = defineCollection({
.object({
component: reference("sections"),
})
- .catchall(z.any())
+ .catchall(z.any()),
),
- })
+ }),
)
.optional(),
}),
@@ -56,9 +56,9 @@ const data = defineCollection({
});
const posts = defineCollection({
- type: 'content',
- schema: z.any()
-})
+ type: "content",
+ schema: z.any(),
+});
// Expose your defined collection to Astro
// with the `collections` export
@@ -67,5 +67,5 @@ export const collections = {
rows,
sections,
data,
- posts
+ posts,
};
diff --git a/src/content/data/categories.yml b/src/content/data/categories.yml
index c2aa404..c6528e6 100644
--- a/src/content/data/categories.yml
+++ b/src/content/data/categories.yml
@@ -17,7 +17,7 @@
label: Big Data
image: /assets/images/content/DataCenter.jpg
- name: ai
- Label: Artificial Intelligence
+ label: Artificial Intelligence
image: /assets/images/content/AI.png
- name: libraries
label: Programming Language, Libraries & Toolchain
diff --git a/src/content/data/footer.yaml b/src/content/data/footer.yaml
index 290979b..49d5d66 100644
--- a/src/content/data/footer.yaml
+++ b/src/content/data/footer.yaml
@@ -13,5 +13,8 @@ footer_brand:
social_media_icons: false
# These links are displayed at the very bottom of the footer.
company_links:
- - name: Contact
+ - label: Contact
url: https://www.linaro.org/contact/
+ - label: Legal
+ url: https://www.linaro.org/legal
+nav_links:
\ No newline at end of file
diff --git a/src/content/data/hero.yml b/src/content/data/hero.yml
new file mode 100644
index 0000000..87ecf7b
--- /dev/null
+++ b/src/content/data/hero.yml
@@ -0,0 +1,6 @@
+inner_image:
+ src: "../../assets/images/linaro-logo-white.svg"
+ alt: Linaro logo
+style: text-center text-linaro-yellow bg-linaro-gradient flex flex-col items-center justify-center px-5 h-128
+title: Ecosystem Dashboard
+background_image: ../../assets/images/hero-background.png
diff --git a/src/content/data/socials.yaml b/src/content/data/socials.yaml
new file mode 100644
index 0000000..92e2e27
--- /dev/null
+++ b/src/content/data/socials.yaml
@@ -0,0 +1,12 @@
+- label: X
+ icon: X
+ url: https://x.com/linaroorg
+- label: Facebook
+ icon: facebook
+ url: https://www.facebook.com/LinaroOrg
+- label: LinkedIn
+ icon: linkedin
+ url: https://www.linkedin.com/company/linaro
+- label: YouTube
+ icon: youtube
+ url: https://www.youtube.com/linaroorg
\ No newline at end of file
diff --git a/src/content/pages/homepage.md b/src/content/pages/homepage.md
index 349a7bf..edb7bd7 100644
--- a/src/content/pages/homepage.md
+++ b/src/content/pages/homepage.md
@@ -4,41 +4,22 @@ slug: ""
title: Linaro Ecosystem Dashboard
description: >
The Linaro Ecosystem Dashboard has been created to provide a centralized information hub for Arm developers across the world.
-hero:
- # title: Homepage Hero Text
- # background_image: "../../assets/images/hero.jpg"
- # inner_image:
- # src: "../../assets/images/linaro-logo-white.svg"
- # alt: Linaro logo
- # style: text-center uppercase
-
- style: text-center font-weight-bold
- title: Ecosystem Dashboard
- background_image: ../../assets/images/content/Mesadetrabajo13.png
flow:
- row: container_row
- style:
sections:
- # - component: title
- # style: text-center
- # title_content:
- # style: font-bold
- # size: h2
- # text: Welcome to linaro-astro-template
- component: text
- style: text-center text-color-white
text_content:
- text: |-
- The hub for all Arm developers across the world
-
- Click the projects' logos to check Arm support details
-
- Want to submit a project?
-
- Click here for guidelines and instructions first
+ text: The hub for all Arm developers across the world
+ style: text-center text-5xl mt-16
+ - component: text
+ text_content:
+ text: Click the projects' logos to check Arm support details
+ style: text-center text-2xl mt-16
+ - component: text
+ text_content:
+ text: Want to submit a project?
[Click here](https://github.com/Linaro/ecosystemlandscape#project-details-structure) for guidelines and instructions first
+ style: text-center text-2xl mb-0 mt-8
- row: container_row
sections:
- component: projects
---
-
-12
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
index 5e1a1a0..d79d588 100644
--- a/src/layouts/BaseLayout.astro
+++ b/src/layouts/BaseLayout.astro
@@ -2,6 +2,7 @@
import BaseHead from "@/components/head/BaseHead.astro";
import NavBar from "@/components/nav/NavBar.astro";
import Footer from "@/components/footer/Footer.astro";
+import Hero from "@/components/hero/Hero.astro";
interface Props {
title: string;
@@ -16,9 +17,8 @@ const { title, description, type = "website" } = Astro.props;
+
-