Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/upateInfrastrukturinitia…
Browse files Browse the repository at this point in the history
…tive' into 507-fix-accessibility-issues-reported
  • Loading branch information
Phu2 committed Jan 23, 2024
2 parents e302fe1 + 3f2a361 commit 92b81b4
Show file tree
Hide file tree
Showing 31 changed files with 7,712 additions and 3,516 deletions.
12 changes: 12 additions & 0 deletions gatsby/lobid/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ module.exports = {
path: `${__dirname}/static/project/`,
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/static/pages/`,
}
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [`gatsby-remark-autolink-headers`],
}
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`
],
Expand Down
36 changes: 36 additions & 0 deletions gatsby/lobid/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,42 @@ exports.createPages = async ({ graphql, actions }) => {
console.log("Creating project pages: ", shortProjectIds);
addPages(shortProjectIds, "project", "./src/templates/project.js", createPage);

// Create pages from markdown files

const result = await graphql(`
{
allMarkdownRemark {
edges {
node {
html
tableOfContents
frontmatter {
slug
title
}
}
}
}
}
`)

// Handle errors
if (result.errors) {
reporter.panicOnBuild(`Error while running GraphQL query.`)
return
}

result.data.allMarkdownRemark.edges.forEach(({ node }) => {
createPage({
path: node.frontmatter.slug,
component: path.resolve(`./src/templates/markdown.js`),
context: {
slug: node.frontmatter.slug,
lang: "de"
},
})
})

};

// Create `fields.jsonFile` fields to link to static publication JSON files
Expand Down
10,689 changes: 7,214 additions & 3,475 deletions gatsby/lobid/package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions gatsby/lobid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"gatsby-image": "^3.0.0",
"gatsby-plugin-feed": "^5.0.0",
"gatsby-plugin-sharp": "^5.0.0",
"gatsby-remark-autolink-headers": "^6.12.0",
"gatsby-source-filesystem": "^5.0.0",
"gatsby-transformer-json": "^5.0.0",
"gatsby-transformer-remark": "^6.12.3",
"gatsby-transformer-sharp": "^5.0.0",
"md5": "^2.3.0",
"react": "^18.2.0",
Expand Down
18 changes: 11 additions & 7 deletions gatsby/lobid/src/components/footer.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ export default class Footer extends React.Component {
<div className="panel-body">
<span className="pull-left">
<img src={wappenPng} alt="NRW-Wappen" /> &nbsp; lobid |
LOD-Dienste des{" "}
ein Dienst des{" "}
<a href="https://www.hbz-nrw.de/produkte/linked-open-data">
hbz — Hochschulbibliothekszentrum des Landes NRW
hbz
</a>
</span>
<span className="pull-right">
<a href="/warranty">
{this.props.warranty}
</a>
{" | "}
<a href="https://www.hbz-nrw.de/impressum">
{this.props.companyDetails}
</a>
Expand All @@ -24,23 +28,23 @@ export default class Footer extends React.Component {
</a>
{" | "}
<a
href="https://twitter.com/lobidorg"
href="https://openbiblio.social/@lobid"
style={{ marginRight: "12px" }}
>
<i className="fa fa-twitter" aria-hidden="true"></i> Twitter
<i className="fa-brands fa-mastodon" aria-hidden="true"></i> Mastodon
</a>
<a
href="https://github.com/hbz/lobid"
style={{ marginRight: "12px" }}
>
<i className="fa fa-github" aria-hidden="true"></i> GitHub
<i className="fa-brands fa-github" aria-hidden="true"></i> GitHub
</a>
<a href="http://blog.lobid.org" style={{ marginRight: "12px" }}>
<a href="http://blog.lobid.org" style={{ marginRight: "11px" }}>
<i className="fa fa-pencil" aria-hidden="true"></i> Blog
</a>
</span>
</div>
</div>
)
}
}
}
20 changes: 9 additions & 11 deletions gatsby/lobid/src/components/header.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ export default class Header extends React.Component {
<DropdownItem
tag="a"
href={this.props.teamLink}
style={{
paddingLeft: "6px",
color: "black",
textDecoration: "none",
lineHeight: "30px"
}}
>
Team
</DropdownItem>
Expand All @@ -145,14 +139,18 @@ export default class Header extends React.Component {
this.props.contactPointId +
"?subject=Feedback%20zu%20lobid.org"
}
style={{
paddingLeft: "6px",
color: "black",
textDecoration: "none"
}}
>
Feedback
</DropdownItem>
<DropdownItem divider />
<DropdownItem
as="a"
href={
"/usage-policy"
}
>
Richtlinien API-Nutzung
</DropdownItem>
</DropdownMenu>
</UncontrolledDropdown>
</li>
Expand Down
49 changes: 49 additions & 0 deletions gatsby/lobid/src/templates/markdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from "react";
import { graphql } from "gatsby";
import Header from "../components/header.html";
import Footer from "../components/footer.html";
import "../components/css/lobid.css";
import "../components/css/bootstrap.min.css";
import "../components/css/font-awesome.min.css";

export default function Template({ data, pageContext }) {

const { markdownRemark } = data
const { frontmatter, html } = markdownRemark
return (
<div className="container">
<Header
publications={pageContext.lang==="de"?"Publikationen":"Publications"}
language={pageContext.lang==="de"?"English":"Deutsch"}
languageTooltip={pageContext.lang==="de"?"Switch language to English":"Wechsel zur deutschen Version"}
teamLink={pageContext.lang==="de"?"/team-de":"/team-en"}
/>
<div>
<div className="page-header">
<h1>{frontmatter.title}</h1>
</div>
<div className="toc" dangerouslySetInnerHTML={{ __html: data.markdownRemark.tableOfContents }} />
<div dangerouslySetInnerHTML={{ __html: html }} />
</div>
<Footer
companyDetails={pageContext.lang==="de"?"Impressum":"Imprint"}
privacy={pageContext.lang==="de"?"Datenschutz":"Privacy"}
contactPointId="mailto:[email protected]"
warranty={pageContext.lang==="de"?"Gewährleistung":"Warranty"}
/>
</div>
)
}

export const query = graphql`
query($slug: String!) {
markdownRemark(frontmatter: { slug: { eq: $slug } }) {
html
tableOfContents
frontmatter {
slug
title
}
}
}
`
Binary file removed gatsby/lobid/static/images/Twitter_logo_blue.png
Binary file not shown.
9 changes: 5 additions & 4 deletions gatsby/lobid/static/index-de
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<ul class="dropdown-menu">
<li><a href="/team-de/">Team</a></li>
<li><a href="mailto:[email protected]?subject=Feedback%20zu%20lobid.org">Feedback</a></li>
<li><a href="/usage-policy">Richtlinien API-Nutzung</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -87,14 +88,14 @@
<div class="panel-body">
<span class="pull-left">
<img src='/images/wappen.png' alt="NRW-Wappen" /> &nbsp;
lobid | LOD-Dienste des <a href="https://www.hbz-nrw.de/produkte/linked-open-data">hbz —
Hochschulbibliothekszentrum des Landes NRW</a>
lobid | ein Dienst des <a href="https://www.hbz-nrw.de/produkte/linked-open-data">hbz</a>
</span>
<span class="pull-right">
<a href="/warranty">Gewährleistung</a> |
<a href="https://www.hbz-nrw.de/impressum">Impressum</a> |
<a href="https://github.com/hbz/lobid/blob/master/conf/Datenschutzerklaerung_lobid.textile">Datenschutz</a> |
<a href="https://twitter.com/lobidorg"><i class="fa fa-twitter" aria-hidden="true"></i> Twitter</a>&nbsp;
<a href="https://github.com/hbz/lobid"><i class="fa fa-github" aria-hidden="true"></i> GitHub</a>&nbsp;
<a href="https://openbiblio.social/@lobid"><i class="fa-brands fa-mastodon" aria-hidden="true"></i> Mastodon</a>&nbsp;
<a href="https://github.com/hbz/lobid"><i class="fa-brands fa-github" aria-hidden="true"></i> GitHub</a>&nbsp;
<a href="http://blog.lobid.org"><i class="fa fa-pencil" aria-hidden="true"></i> Blog</a>
</span>
</div>
Expand Down
9 changes: 5 additions & 4 deletions gatsby/lobid/static/index-en
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<ul class="dropdown-menu">
<li><a href="team-en">Team</a></li>
<li><a href="mailto:[email protected]?subject=Feedback%20zu%20lobid.org">Feedback</a></li>
<li><a href="/usage-policy">Usage Policy</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -88,14 +89,14 @@
<div class="panel-body">
<span class="pull-left">
<img src='/images/wappen.png' alt="NRW-Wappen" /> &nbsp;
lobid | LOD services by <a href="https://www.hbz-nrw.de/produkte/linked-open-data">hbz —
Hochschulbibliothekszentrum des Landes NRW</a>
lobid | a service by <a href="https://www.hbz-nrw.de/produkte/linked-open-data">hbz</a>
</span>
<span class="pull-right">
<a href="/warranty">Warranty</a> |
<a href="https://www.hbz-nrw.de/impressum">Imprint</a> |
<a href="https://github.com/hbz/lobid/blob/master/conf/Datenschutzerklaerung_lobid.textile">Privacy</a> |
<a href="https://twitter.com/lobidorg"><i class="fa fa-twitter" aria-hidden="true"></i> Twitter</a>&nbsp;
<a href="https://github.com/hbz/lobid"><i class="fa fa-github" aria-hidden="true"></i> GitHub</a>&nbsp;
<a href="https://openbiblio.social/@lobid"><i class="fa-brands fa-mastodon" aria-hidden="true"></i> Mastodon</a>&nbsp;
<a href="https://github.com/hbz/lobid"><i class="fa-brands fa-github" aria-hidden="true"></i> GitHub</a>&nbsp;
<a href="http://blog.lobid.org"><i class="fa fa-pencil" aria-hidden="true"></i> Blog</a>
</span>
</div>
Expand Down
Loading

0 comments on commit 92b81b4

Please sign in to comment.