diff --git a/package-lock.json b/package-lock.json index 588139d..8e8459c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "license": "ISC", "dependencies": { - "@nfdi4plants/web-components": "^0.4.0-beta06", + "@nfdi4plants/web-components": "^0.5.2", "bulma": "^0.9.2" }, "devDependencies": { @@ -23,9 +23,9 @@ "integrity": "sha512-A2e18XzPMrIh35nhIdE4uoqRzoIpEU5vZYuQN4S3Ee1zkGdYC27DP12pewbw/RLgPHzaE4kx/YqxMzebOpm0dA==" }, "node_modules/@nfdi4plants/web-components": { - "version": "0.4.0-beta06", - "resolved": "https://registry.npmjs.org/@nfdi4plants/web-components/-/web-components-0.4.0-beta06.tgz", - "integrity": "sha512-cG1ZDXkD8zGbumaWVKkm/nnu5BwPGJUwNfPakuEDR0DEEka+rkAfOIy6xnZ8D24Sq5JriUfQJ1TU5YZsgO//Eg==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nfdi4plants/web-components/-/web-components-0.5.2.tgz", + "integrity": "sha512-x/0UD7lxfJxWQLlKughEzHHa0j8vbBBHTt4Ligxy3lxjwZ+3E2wfmzJwjC9nZCcO3FlibDO3nbohF8SgjznriA==", "dependencies": { "lit": "^2.0.2" } @@ -284,9 +284,9 @@ "integrity": "sha512-A2e18XzPMrIh35nhIdE4uoqRzoIpEU5vZYuQN4S3Ee1zkGdYC27DP12pewbw/RLgPHzaE4kx/YqxMzebOpm0dA==" }, "@nfdi4plants/web-components": { - "version": "0.4.0-beta06", - "resolved": "https://registry.npmjs.org/@nfdi4plants/web-components/-/web-components-0.4.0-beta06.tgz", - "integrity": "sha512-cG1ZDXkD8zGbumaWVKkm/nnu5BwPGJUwNfPakuEDR0DEEka+rkAfOIy6xnZ8D24Sq5JriUfQJ1TU5YZsgO//Eg==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nfdi4plants/web-components/-/web-components-0.5.2.tgz", + "integrity": "sha512-x/0UD7lxfJxWQLlKughEzHHa0j8vbBBHTt4Ligxy3lxjwZ+3E2wfmzJwjC9nZCcO3FlibDO3nbohF8SgjznriA==", "requires": { "lit": "^2.0.2" } diff --git a/package.json b/package.json index 2e3707e..8569a70 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "homepage": "https://github.com/Freymaurer/nfdi4plants-fornax-template#readme", "dependencies": { - "@nfdi4plants/web-components": "^0.4.0-beta06", + "@nfdi4plants/web-components": "^0.5.2", "bulma": "^0.9.2" }, "devDependencies": { diff --git a/src/docs/DataManagementPlan.md b/src/docs/DataManagementPlan.md index ff344bb..46bea78 100644 --- a/src/docs/DataManagementPlan.md +++ b/src/docs/DataManagementPlan.md @@ -14,7 +14,6 @@ Article Status: Publishable - [Elements of a DMP](#Elements-of-a-DMP) - [DataPLANT's Data Management Plan Generator](#DataPLANT's-Data-Management-Plan-Generator) - A data management plan (DMP) structures the handling of research data in a scientific project and describes how you are planning to deal with the data during and after the end of the project. Many third-party funders, such as DFG, Horizon Europe, or BMBF expect you to provide information on the handling of research data as part of your funding application. While a formal DMP is only required in rare cases, a DMP is almost exclusively beneficial for your work on a research project. ## Advantages of a DMP diff --git a/src/docs/sidebars/mainSidebar.md b/src/docs/sidebars/mainSidebar.md index f51c115..0e3cfc6 100644 --- a/src/docs/sidebars/mainSidebar.md +++ b/src/docs/sidebars/mainSidebar.md @@ -7,20 +7,20 @@ To-Dos: ```Metadata # Metadata:/docs/metadata.html -# What is metadata?:/docs/metadata.html#what-is-metadata -# Where does metadata come from?:/docs/metadata.html#where-does-metadata-come-from -# Why do I benefit from metadata?:/docs/metadata.html#why-do-i-benefit-from-metadata -# What tasks are important for rich metadata?:/docs/metadata.html#what-tasks-are-important-for-rich-metadata -## Collection:/docs/metadata.html#collection -## Structuring:/docs/metadata.html#structuring -## Sharing and curation:/docs/metadata.html#sharing-and-curation -# How does DataPLANT support me in metadata annotation:/docs/metadata.html#how-does-dataplant-support-me-in-metadata-annotation -# DataPLANT Support:/docs/metadata.html#dataplant-support +## What is metadata?:/docs/metadata.html#what-is-metadata +## Where does metadata come from?:/docs/metadata.html#where-does-metadata-come-from +## Why do I benefit from metadata?:/docs/metadata.html#why-do-i-benefit-from-metadata +## What tasks are important for rich metadata?:/docs/metadata.html#what-tasks-are-important-for-rich-metadata +### Collection:/docs/metadata.html#collection +### Structuring:/docs/metadata.html#structuring +### Sharing and curation:/docs/metadata.html#sharing-and-curation +## How does DataPLANT support me in metadata annotation:/docs/metadata.html#how-does-dataplant-support-me-in-metadata-annotation +## DataPLANT Support:/docs/metadata.html#dataplant-support ``` ```Data Management Plan # Data Management Plan:/docs/DataManagementPlan.html -# Advantages of a DMP:/docs/DataManagementPlan.html#advantages-of-a-dmp -# Elements of a DMP?:/docs/DataManagementPlan.html#elements-of-a-dmp -# DataPLANT's Data Management Plan Generator:/docs/DataManagementPlan.html#dataplants-data-management-plan-generator +## Advantages of a DMP:/docs/DataManagementPlan.html#advantages-of-a-dmp +## Elements of a DMP:/docs/DataManagementPlan.html#elements-of-a-dmp +## DataPLANT's Data Management Plan Generator:/docs/DataManagementPlan.html#dataplants-data-management-plan-generator ``` \ No newline at end of file diff --git a/src/generators/about.fsx b/src/generators/about.fsx deleted file mode 100644 index f0d789f..0000000 --- a/src/generators/about.fsx +++ /dev/null @@ -1,40 +0,0 @@ -#r "../_lib/Fornax.Core.dll" -#load "layout.fsx" - -open Html - -let about = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi nisi diam, vehicula quis blandit id, suscipit sed libero. Proin at diam dolor. In hac habitasse platea dictumst. Donec quis dui vitae quam eleifend dignissim non sed libero. In hac habitasse platea dictumst. In ullamcorper mollis risus, a vulputate quam accumsan at. Donec sed felis sodales, blandit orci id, vulputate orci." - -let generate' (ctx : SiteContents) (_: string) = - let siteInfo = ctx.TryGetValue () - let desc = - siteInfo - |> Option.map (fun si -> si.description) - |> Option.defaultValue "" - - - Layout.layout ctx "About" [ - section [Class "hero is-info is-medium is-bold"] [ - div [Class "hero-body"] [ - div [Class "container has-text-centered"] [ - h1 [Class "title"] [!!desc] - ] - ] - ] - div [Class "container"] [ - section [Class "articles"] [ - div [Class "column is-8 is-offset-2"] [ - div [Class "card article"] [ - div [Class "card-content"] [ - div [Class "content article-body"] [ - !! about - ] - ] - ] - ] - ] - ]] - -let generate (ctx : SiteContents) (projectRoot: string) (page: string) = - generate' ctx page - |> Layout.render ctx diff --git a/src/generators/contact.fsx b/src/generators/contact.fsx deleted file mode 100644 index bd08ac9..0000000 --- a/src/generators/contact.fsx +++ /dev/null @@ -1,40 +0,0 @@ -#r "../_lib/Fornax.Core.dll" -#load "layout.fsx" - -open Html - -let about = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi nisi diam, vehicula quis blandit id, suscipit sed libero. Proin at diam dolor. In hac habitasse platea dictumst. Donec quis dui vitae quam eleifend dignissim non sed libero. In hac habitasse platea dictumst. In ullamcorper mollis risus, a vulputate quam accumsan at. Donec sed felis sodales, blandit orci id, vulputate orci." - -let generate' (ctx : SiteContents) (_: string) = - let siteInfo = ctx.TryGetValue () - let desc = - siteInfo - |> Option.map (fun si -> si.description) - |> Option.defaultValue "" - - - Layout.layout ctx "Home" [ - section [Class "hero is-info is-medium is-bold"] [ - div [Class "hero-body"] [ - div [Class "container has-text-centered"] [ - h1 [Class "title"] [!!desc] - ] - ] - ] - div [Class "container"] [ - section [Class "articles"] [ - div [Class "column is-8 is-offset-2"] [ - div [Class "card article"] [ - div [Class "card-content"] [ - div [Class "content article-body"] [ - !! about - ] - ] - ] - ] - ] - ]] - -let generate (ctx : SiteContents) (projectRoot: string) (page: string) = - generate' ctx page - |> Layout.render ctx \ No newline at end of file diff --git a/src/generators/layout.fsx b/src/generators/layout.fsx index 11ba08a..442de8d 100644 --- a/src/generators/layout.fsx +++ b/src/generators/layout.fsx @@ -53,47 +53,37 @@ let layout (ctx : SiteContents) active bodyCnt = script [ Type "module"; Src "/js/bundle.js"] [] style [] [ !! """ - body { - margin: 0px; - } - - thead tr th, strong { - color: var(--accent-text-color) !important - } - - a { - color: var(--link-color, #4FB3D9) !important; - } - - a:hover { - color: var(--link-hover-color, #3A3A3A) !important; - } - thead { - font-size: 1.2rem; - } - - nfdi-toc, nfdi-body { - --outside-background-color: rgb(240, 243, 246); - --element-background-color: #ffffff; - --element-text-color: #0E1116; - --header-color: rgb(10, 12, 16); - --accent-text-color: rgb(31, 194, 167); - --link-color: #4FB3D9; - --link-hover-color: #8ad3ee; - } - - """ - - // nfdi-navbar, nfdi-footer, nfdi-toc, nfdi-body { - // --element-background-color: black; - // --element-text-color: white; - // --link-color: #4FB3D9; - // --link-hover-color: #84cae4; - // --header-color: white; - // --outside-background-color: #191919; - // --accent-text-color: #1FC2A7 - // } - + body { + margin: 0px; + } + + thead tr th, strong { + color: var(--accent-text-color) !important + } + + a { + color: var(--link-color, #4FB3D9) !important; + } + + a:hover { + color: var(--link-hover-color, #3A3A3A) !important; + } + + thead { + font-size: 1.2rem; + } + + nfdi-toc, nfdi-body { + --outside-background-color: rgb(240, 243, 246); + --header-color: rgb(10, 12, 16) + --element-text-color: #0E1116; + --element-background-color: #fff; + --accent-text-color: rgb(31, 194, 167); + --link-color: #4FB3D9; + --link-hover-color: #8ad3ee; + } + + """ ] ] @@ -112,6 +102,7 @@ let render (ctx : SiteContents) cnt = let docsLayout (docs: Docsloader.Docs) = + let publishedDate = docs.published.Value.ToString("yyyy-MM-dd") custom "nfdi-body" [Class "content"; if Array.isEmpty docs.sidebar |> not then HtmlProperties.Custom("hasSidebar", "true")] [ if Array.isEmpty docs.sidebar |> not then for sidebarEle in docs.sidebar do @@ -119,9 +110,30 @@ let docsLayout (docs: Docsloader.Docs) = div [HtmlProperties.Custom ("slot", "title")] [!! sidebarEle.Title] !! sidebarEle.Content ] - custom "nfdi-h1" [] [!! docs.title] + + h1 [Class "front-header"] [!! docs.title] + i [Class "help" ] [!! $"last updated at {publishedDate}" ] + if docs.add_toc then custom "nfdi-toc" [] [] !! docs.content + + // support contact + h3 [] [!! "Dataplant Support"] + div [] [ + !! "Besides these technical solutions, DataPLANT supports you with community-engaged data stewardship. For further assistance, feel free to reach out via our " + a [Href "https://support.nfdi4plants.org"] [!! "helpdesk"] + !! " or by contacting us " + a [Href "javascript:location='mailto:\u0069\u006e\u0066\u006f\u0040\u006e\u0066\u0064\u0069\u0034\u0070\u006c\u0061\u006e\u0074\u0073\u002e\u006f\u0072\u0067';void 0"] [!! "directly"] + !! "." + ] + + // Edit this page link + div [] [ + a [ + Href $"https://github.com/nfdi4plants/nfdi4plants.github.io/tree/main/src/{docs.file}"; + HtmlProperties.Style [MarginLeft "auto"; Display "block"; CSSProperties.Width "130px"] + ] [!! "✏️ Edit this page"] + ] ] let docsMinimalLayout (docs: Docsloader.Docs) = diff --git a/src/js/bundle.js b/src/js/bundle.js index a65f527..5dc34e0 100644 --- a/src/js/bundle.js +++ b/src/js/bundle.js @@ -10828,9 +10828,6 @@ let Navbar = class extends s$1 { this.navbarIsActive = false; this.url = window.location.href; } - static test() { - console.log(window.location.href); - } render() { return $`