Skip to content

Commit

Permalink
Merge pull request #17 from nfdi4plants/fixCardURLs
Browse files Browse the repository at this point in the history
Fix relative urls in Cards
  • Loading branch information
Freymaurer authored Sep 16, 2024
2 parents a5adfd3 + 25cbcd0 commit bf34187
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 55 deletions.
5 changes: 3 additions & 2 deletions src/components/Home/CommunityCards.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import { URLS } from "../../statics";
import Card from '../Card.astro'
---

Expand All @@ -12,8 +13,8 @@ import Card from '../Card.astro'
</div>
<ul role="list" class="link-card-grid">
<Card
href="https://docs.astro.build/"
title="Minimal Organization Principal"
href= {URLS.INTERNAL_COM_DATA_MANAGEMENT}
title="Data Management Principal"
body="Get started to organize your research data using the ARC."
/>
<Card
Expand Down
4 changes: 2 additions & 2 deletions src/components/Home/DeveloperCards.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import Card from '../Card.astro'
</div>
<ul role="list" class="link-card-grid">
<Card
href= "/details/arc-data-model"
href= {URLS.INTERNAL_DEV_DATA_MODEL}
title="ARC data model"
body="Learn how ARC data model is a FAIR Digital Object implementation"
/>
<Card
href="https://astro.build/integrations/"
href= {URLS.INTERNAL_DEV_REPRESENTATION}
title="ARC representation"
body="Understand how the ARC is both a data scaffold and a JSON manifest"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Home/RDMGraphNavigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import GraphNavigation from "../GraphNavigation.astro";
import { Color } from "../GraphNavigation.astro";
const circles = [
{ id: 1, cx: 8, cy: 25, r: 5, href: URLS.Internal_Home + "/details/arc-fdo", text: 'FAIR Digital Object', angle: 20 },
{ id: 1, cx: 8, cy: 25, r: 5, href: URLS.INTERNAL_DEV_FDO, text: 'FAIR Digital Object', angle: 20 },
{ id: 2, cx: 30, cy: 40, r: 5, href: '#link4', text: 'validation', angle: 180 },
{ id: 3, cx: 60, cy: 8, r: 5, href: '#link3', text: 'continuous Integration', angle: 80 },
{ id: 4, cx: 90, cy: 40, r: 5, href: '#link2', text: 'versioning', angle: 250 },
{ id: 5, cx: 140, cy: 10, r: 5, href: URLS.Internal_Home + "/details/documentation-principle", text: 'libraries', angle: 180 },
{ id: 5, cx: 140, cy: 10, r: 5, href: '#link5', text: 'libraries', angle: 180 },
];
---

Expand Down
6 changes: 3 additions & 3 deletions src/components/Home/ResearchGraphNavigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import GraphNavigation from "../GraphNavigation.astro";
import { Color } from "../GraphNavigation.astro";
const circles = [
{ id: 1, cx: 8, cy: 10, r: 5, href: URLS.Internal_Home + "/details/documentation-principle", text: 'documentation principle', angle: 80 },
{ id: 2, cx: 30, cy: 40, r: 5, href: URLS.Internal_Home + "/details/organization-principle", text: 'organization principle', angle: 200 },
{ id: 1, cx: 8, cy: 10, r: 5, href: URLS.INTERNAL_COM_DOCUMENTATION, text: 'documentation principle', angle: 80 },
{ id: 2, cx: 30, cy: 40, r: 5, href: URLS.INTERNAL_COM_ORGANIZATION, text: 'organization principle', angle: 200 },
{ id: 3, cx: 60, cy: 35, r: 5, href: '#link3', text: 'quality control', angle: 130 },
{ id: 4, cx: 90, cy: 15, r: 5, href: '#link4', text: 'exchange & publication', angle: 10 },
{ id: 5, cx: 140, cy: 25, r: 5, href: URLS.Internal_Home + "/details/fairness-and-rdm", text: 'RDM & FAIRness', angle: 210 },
{ id: 5, cx: 140, cy: 25, r: 5, href: URLS.INTERNAL_COM_FAIRNESS, text: 'RDM & FAIRness', angle: 210 },
];
---

Expand Down
22 changes: 11 additions & 11 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@ import { type Link } from "./RecMenu.astro"
import { URLS } from "../statics"
const links: Link[] = [
{href: URLS.Internal_Home, text: "Home"},
{href: URLS.INTERNAL_HOME, text: "Home"},
{text: "Research Community", children: [
{href: "/", text: "Minimal Organisation Principal 🚧"},
{href: URLS.INTERNAL_COM_DATA_MANAGEMENT, text: "Data Management Principal 🚧"},
{href: "/", text: "Tools and Services 🚧"},
{href: "/", text: "Support 🚧"},
{text: "More", children: [
{href: "/", text: "documentation principle 🚧"},
{href: "/", text: "organization principle 🚧"},
{href: URLS.INTERNAL_COM_DOCUMENTATION, text: "documentation principle 🚧"},
{href: URLS.INTERNAL_COM_ORGANIZATION, text: "organization principle 🚧"},
{href: "/", text: "quality control 🚧"},
{href: "/", text: "exchange & publication 🚧"},
{href: "/", text: "RDM & FAIRness 🚧"},
{href: URLS.INTERNAL_COM_FAIRNESS, text: "RDM & FAIRness 🚧"},
]},
]},
{text: "RDM Community", children: [
{href: "/", text: "ARC data model 🚧"},
{href: "/", text: "ARC representation 🚧"},
{href: URLS.INTERNAL_DEV_DATA_MODEL, text: "ARC data model 🚧"},
{href: URLS.INTERNAL_DEV_REPRESENTATION, text: "ARC representation 🚧"},
{href: "/", text: "ARC (meta)data framework 🚧"},
{text: "More", children: [
{href: "/", text: "FAIR Digital Object 🚧"},
{href: URLS.INTERNAL_DEV_FDO, text: "FAIR Digital Object 🚧"},
{href: "/", text: "validation 🚧"},
{href: "/", text: "continuous Integration 🚧"},
{href: "/", text: "versioning 🚧"},
{href: "/", text: "libraries 🚧"},
]},
]},
{href: URLS.Internal_Tools, text: "Tools"},
{href: "/arc-website/Partners", text: "Partners"},
{href: URLS.INTERNAL_TOOLS, text: "Tools"},
{href: URLS.INTERNAL_PARTNERS, text: "Partners"}
]
---

Expand All @@ -55,7 +55,7 @@ const links: Link[] = [
</div>
<RecMenu className="menu menu-sm dropdown-content bg-base-100 rounded-box z-[1] mt-3 w-52 p-2 shadow" links={links} />
</div>
<a class="btn btn-ghost text-xl" href={URLS.Internal_Home} >
<a class="btn btn-ghost text-xl" href={URLS.INTERNAL_HOME} >
<img src="/arc-website/favicon.svg" alt="logo" class="h-8 w-8" />
</a>
</div>
Expand Down
31 changes: 0 additions & 31 deletions src/pages/details/annotation-principle.md

This file was deleted.

12 changes: 12 additions & 0 deletions src/pages/details/data-management-principle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: ../../layouts/MarkdownLayout.astro
title: 'Data Management Principle '
pubDate: 2024-09-13
description: 'A short summary for ARC related tools and services.'
author: 'Timo Mühlhaus'
image:
url: 'https://docs.astro.build/assets/rose.webp'
alt: 'The Astro logo on a dark background with a pink glow.'
tags: ["tools", "services", "community"]
---
Lorem Ipsum Doro und Ahmet
2 changes: 1 addition & 1 deletion src/pages/details/tools-and-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ image:
tags: ["tools", "services", "community"]
---

[Back home]({{Internal_Home}})
[Back home]({{INTERNAL_HOME}})

Here is some placeholder annotation table content in Markdown format for testing purposes. It includes various Markdown elements to ensure that your styling covers a wide range of formatting options.

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/remark-dictionary-tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function createTooltip(key: string, match?: string): string {
const tt: Frontmatter | undefined = Tooltips.get(key);
if (tt) {
return `<span class="tooltip" data-tip="${tt.description}">
<a href="${URLS.Internal_Home + "/dictionary/" + tt.url}" class="underline decoration-dotted">${match || key}</a>
<a href="${URLS.INTERNAL_HOME + "/dictionary/" + tt.url}" class="underline decoration-dotted">${match || key}</a>
</span>`;
} else {
return key;
Expand Down
16 changes: 14 additions & 2 deletions src/statics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@
const BASE_PATH = "/arc-website"

export enum URLS {
Internal_Home = BASE_PATH,
Internal_Tools = BASE_PATH + "/details/tools-and-services",
INTERNAL_HOME = BASE_PATH,
INTERNAL_TOOLS = BASE_PATH + "/details/tools-and-services",
INTERNAL_PARTNERS = BASE_PATH + "/partners",

INTERNAL_COM_DATA_MANAGEMENT = BASE_PATH + "/details/data-management-principle",
INTERNAL_COM_TOOLS = BASE_PATH + "/details/tools-and-services",
INTERNAL_COM_DOCUMENTATION = BASE_PATH + "/details/documentation-principle",
INTERNAL_COM_ORGANIZATION = BASE_PATH + "/details/organization-principle",
INTERNAL_COM_FAIRNESS = BASE_PATH + "/details/fairness-and-rdm",

INTERNAL_DEV_DATA_MODEL = BASE_PATH + "/details/arc-data-model",
INTERNAL_DEV_REPRESENTATION = BASE_PATH + "/details/arc-representation",
INTERNAL_DEV_FDO = BASE_PATH + "/details/arc-fdo",


GITHUB_REPO = "https://github.com/nfdi4plants/arc-website"
}
Expand Down

0 comments on commit bf34187

Please sign in to comment.