Merge branch 'integration' into ddl-migration

This commit is contained in:
Corbin Crutchley
2019-08-21 21:51:45 -07:00
6 changed files with 42 additions and 2 deletions

View File

@@ -5,7 +5,8 @@
published: '2019-07-11T22:12:03.284Z',
author: 'crutchcorn',
tags: ['angular', 'templates'],
attached: []
attached: [],
license: 'cc-by-nc-sa-4'
}
---

View File

@@ -5,7 +5,8 @@
published: '2019-06-29T22:12:03.284Z',
author: 'crutchcorn',
tags: ['community', 'announcements'],
attached: []
attached: [],
license: 'cc-by-4'
}
---

View File

@@ -240,6 +240,7 @@ module.exports = {
],
mapping: {
"MarkdownRemark.frontmatter.author": `UnicornsJson`,
"MarkdownRemark.frontmatter.license": `LicensesJson`,
"UnicornsJson.pronouns": `PronounsJson`,
"UnicornsJson.roles": `RolesJson`,
},

View File

@@ -81,6 +81,13 @@ export const postFragmentQuery = graphql`
author {
...UnicornInfo
}
license {
licenceType
footerImg
explainLink
name
displayName
}
}
fields {
slug

18
src/data/licenses.json Normal file
View File

@@ -0,0 +1,18 @@
[
{
"id": "cc-by-nc-sa-4",
"footerImg": "https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png",
"licenceType": "Creative Commons License",
"explainLink": "http://creativecommons.org/licenses/by-nc-sa/4.0/",
"name": "Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)",
"displayName": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License"
},
{
"id": "cc-by-4",
"footerImg": "https://i.creativecommons.org/l/by/4.0/88x31.png",
"licenceType": "Creative Commons License",
"explainLink": "http://creativecommons.org/licenses/by/4.0/",
"name": "Attribution 4.0 International (CC BY 4.0)",
"displayName": "Creative Commons Attribution 4.0 International License"
}
]

View File

@@ -43,6 +43,18 @@ const BlogPostTemplate = (props) => {
dangerouslySetInnerHTML={{ __html: post.html }}
/>
<div className="post-lower-area">
<div>
<a
aria-label={`Post licensed with ${post.frontmatter.license.displayName}`}
href={post.frontmatter.license.explainLink}
style={{display: 'table', margin: '0 auto'}}
>
<img
src={post.frontmatter.license.footerImg}
alt={post.frontmatter.license.licenseType}
/>
</a>
</div>
<div
style={{
display: "flex",