Skip to content

Commit

Permalink
Merge pull request #65 from nfdi4plants/improve-dictionary
Browse files Browse the repository at this point in the history
improve dictionary pages with specific layout
  • Loading branch information
kMutagene authored Sep 20, 2024
2 parents 8c33af4 + c4f8493 commit d78b817
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 13 deletions.
33 changes: 33 additions & 0 deletions src/layouts/DictionaryPageLayout.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
import MarkdownLayout from "./MarkdownLayout.astro";
import {type Heading} from "./MarkdownLayout.astro";
interface DictionaryPageProps {
title: string;
pubDate: string;
description: string;
author: string;
tags: string[];
keywords: string[];
url: string;
}
const { frontmatter, headings, title } = Astro.props;
const dictProps = frontmatter as DictionaryPageProps
---

<MarkdownLayout frontmatter={frontmatter} headings={headings}>
<p>by <i>{dictProps.author}</i>, last updated at <i>{new Date(dictProps.pubDate).toISOString().slice(0, 10)}</i></p>
<aside class="starlight-aside starlight-aside--note" aria-label="Did you know?">
<p class="starlight-aside__title" aria-hidden="true">
<svg viewBox ='0 0 24 24' width = '16' height="16" fill='currentColor' class='starlight-aside__icon'>
<path d='M12 11C11.7348 11 11.4804 11.1054 11.2929 11.2929C11.1054 11.4804 11 11.7348 11 12V16C11 16.2652 11.1054 16.5196 11.2929 16.7071C11.4804 16.8946 11.7348 17 12 17C12.2652 17 12.5196 16.8946 12.7071 16.7071C12.8946 16.5196 13 16.2652 13 16V12C13 11.7348 12.8946 11.4804 12.7071 11.2929C12.5196 11.1054 12.2652 11 12 11ZM12.38 7.08C12.1365 6.97998 11.8635 6.97998 11.62 7.08C11.4973 7.12759 11.3851 7.19896 11.29 7.29C11.2017 7.3872 11.1306 7.49882 11.08 7.62C11.024 7.73868 10.9966 7.86882 11 8C10.9992 8.13161 11.0245 8.26207 11.0742 8.38391C11.124 8.50574 11.1973 8.61656 11.29 8.71C11.3872 8.79833 11.4988 8.86936 11.62 8.92C11.7715 8.98224 11.936 9.00632 12.099 8.99011C12.2619 8.97391 12.4184 8.91792 12.5547 8.82707C12.691 8.73622 12.8029 8.61328 12.8805 8.46907C12.9582 8.32486 12.9992 8.16378 13 8C12.9963 7.73523 12.8927 7.48163 12.71 7.29C12.6149 7.19896 12.5028 7.12759 12.38 7.08ZM12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z'></path>
</svg>
{dictProps.title}:
</p>
<section class="starlight-aside__content">
{dictProps.description}
</section>
</aside>
<slot />
</MarkdownLayout>
2 changes: 1 addition & 1 deletion src/pages/dictionary/DataPLANT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'DataPLANT'
pubDate: 2024-09-18
description: 'Consortium for digitization of plant research data. more at nfdi4plants.org'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/bioschemas.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'bioschemas'
pubDate: 2024-09-16
description: 'A collection of types, relationships and schemas specific to life sciences. Extends Schema.org for understanding life sciences entities the Semantic Web applications.'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/ci-cd.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'CI/CD'
pubDate: 2024-09-17
description: 'Predefined actions that run on a data or code repository when defined requirements are met.'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/cwl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'CWL'
pubDate: 2024-09-17
description: 'Common Workflow Language'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/doi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'DOI'
pubDate: 2024-09-19
description: 'Digital Object Identifier'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/fair.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'FAIR Principles'
pubDate: 2024-09-17
description: 'Findable – Accessible - Interoperable - Reusable'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/git-lfs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'Git LFS'
pubDate: 2024-09-18
description: 'Extension of git version control system, which allows handling of large files.'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/git.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'Git'
pubDate: 2024-09-18
description: 'Version control system, which keeps track of repositories by saving comparable snapshots called commits.'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/isa.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'ISA'
pubDate: 2024-09-16
description: 'A specification for annotation of biological experiments. A research cycle is called investigation and the subdivisions are called studies and assays.'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/json-ld.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'JSON-LD'
pubDate: 2024-09-16
description: 'Based on JSON file format, but with additional rules and capabilities encouraging recycling of shared types and web resources.'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/rdm.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'RDM'
pubDate: 2024-09-12
description: 'Research Data Management'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dictionary/ro-crate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: ../../layouts/MarkdownLayout.astro
layout: ../../layouts/DictionaryPageLayout.astro
title: 'ro-crate'
pubDate: 2024-09-16
description: 'An implementation of a FDO. Zip archive containing containing a full research cycle, including data and a single metadata file in JSON-LD format.'
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/remark-asides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function s(el: string, attrs: Properties = {}, children: any[] = []): P {
* <section class="starlight-aside__content">
* <p>Astro helps you build faster websites with “Islands Architecture”.</p>
* </section>
* </Aside>
* </aside>
* ```
*/
export function remarkAsides(): Plugin<[], Root> {
Expand Down

0 comments on commit d78b817

Please sign in to comment.