Merge branch 'master' into portal-latest
This commit is contained in:
commit
3f0fe4a102
|
@ -0,0 +1 @@
|
||||||
|
- fixed the latest news link redirect in the news header
|
|
@ -10,9 +10,9 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/metropolis": "4.5.0",
|
"@fontsource/metropolis": "4.5.0",
|
||||||
"@ory/kratos-client": "0.5.4-alpha.1",
|
"@ory/kratos-client": "0.5.4-alpha.1",
|
||||||
"@stripe/react-stripe-js": "1.4.1",
|
"@stripe/react-stripe-js": "1.5.0",
|
||||||
"@stripe/stripe-js": "1.18.0",
|
"@stripe/stripe-js": "1.19.0",
|
||||||
"@tailwindcss/forms": "0.3.3",
|
"@tailwindcss/forms": "0.3.4",
|
||||||
"autoprefixer": "10.3.6",
|
"autoprefixer": "10.3.6",
|
||||||
"classnames": "2.3.1",
|
"classnames": "2.3.1",
|
||||||
"clipboardy": "2.3.0",
|
"clipboardy": "2.3.0",
|
||||||
|
@ -29,9 +29,9 @@
|
||||||
"pretty-bytes": "5.6.0",
|
"pretty-bytes": "5.6.0",
|
||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2",
|
"react-dom": "17.0.2",
|
||||||
"react-toastify": "8.0.2",
|
"react-toastify": "8.0.3",
|
||||||
"skynet-js": "3.0.2",
|
"skynet-js": "3.0.2",
|
||||||
"stripe": "8.176.0",
|
"stripe": "8.178.0",
|
||||||
"superagent": "6.1.0",
|
"superagent": "6.1.0",
|
||||||
"swr": "1.0.1",
|
"swr": "1.0.1",
|
||||||
"tailwindcss": "2.2.16",
|
"tailwindcss": "2.2.16",
|
||||||
|
|
|
@ -181,22 +181,22 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
axios "^0.19.2"
|
axios "^0.19.2"
|
||||||
|
|
||||||
"@stripe/react-stripe-js@1.4.1":
|
"@stripe/react-stripe-js@1.5.0":
|
||||||
version "1.4.1"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-1.4.1.tgz#884d59286fff00ba77389b32c045516f65d7a340"
|
resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-1.5.0.tgz#7e4d80077e88e1f2c1f10ac255f2838d7c9488c2"
|
||||||
integrity sha512-FjcVrhf72+9fUL3Lz3xi02ni9tzH1A1x6elXlr6tvBDgSD55oPJuodoP8eC7xTnBIKq0olF5uJvgtkJyDCdzjA==
|
integrity sha512-A7+bNeb0O/kw3JdtMeiB6frokPcks5obi+TIjuFRXUMZ5o/o1Qe7eLgLnsb0KOO/g3KJqNCpHiYcKCLESZJJbQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
prop-types "^15.7.2"
|
prop-types "^15.7.2"
|
||||||
|
|
||||||
"@stripe/stripe-js@1.18.0":
|
"@stripe/stripe-js@1.19.0":
|
||||||
version "1.18.0"
|
version "1.19.0"
|
||||||
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-1.18.0.tgz#687268d7cd68b44b92b86300d7c7f2a6e4df0b98"
|
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-1.19.0.tgz#2704adeabcca4ac64d3a5168b2705b165b89e633"
|
||||||
integrity sha512-yBRHAMKHnF3kbzv0tpKB82kSow43wW5qXLK8ofg3V9NaaCyObSTO7wJfktWAtG/NBgkJOdUL+pV8dHBj0qvDkQ==
|
integrity sha512-HycB9mnCCaontVCH9tnRoGVofp4H2c+m518e3g5vLVGmmHVI7qOSI71TGbJ0XoHdfFf2EN2HUAGMCNT5IiiuNQ==
|
||||||
|
|
||||||
"@tailwindcss/forms@0.3.3":
|
"@tailwindcss/forms@0.3.4":
|
||||||
version "0.3.3"
|
version "0.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.3.3.tgz#a29d22668804f3dae293dcadbef1aa6315c45b64"
|
resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.3.4.tgz#e4939dc16450eccf4fd2029770096f38cbb556d4"
|
||||||
integrity sha512-U8Fi/gq4mSuaLyLtFISwuDYzPB73YzgozjxOIHsK6NXgg/IWD1FLaHbFlWmurAMyy98O+ao74ksdQefsquBV1Q==
|
integrity sha512-vlAoBifNJUkagB+PAdW4aHMe4pKmSLroH398UPgIogBFc91D2VlHUxe4pjxQhiJl0Nfw53sHSJSQBSTQBZP3vA==
|
||||||
dependencies:
|
dependencies:
|
||||||
mini-svg-data-uri "^1.2.3"
|
mini-svg-data-uri "^1.2.3"
|
||||||
|
|
||||||
|
@ -2533,10 +2533,10 @@ react-refresh@0.8.3:
|
||||||
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f"
|
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f"
|
||||||
integrity sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==
|
integrity sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==
|
||||||
|
|
||||||
react-toastify@8.0.2:
|
react-toastify@8.0.3:
|
||||||
version "8.0.2"
|
version "8.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/react-toastify/-/react-toastify-8.0.2.tgz#11f73b3a847fcffeb47b1823e8974e9895f98fae"
|
resolved "https://registry.yarnpkg.com/react-toastify/-/react-toastify-8.0.3.tgz#7fbf65f69ec357aab8dd03c1496f9177aa92409a"
|
||||||
integrity sha512-0Nud2d0VD4LIevgkB4L8NYoQ5plTpfqgj2CRVxs58SGA/TTO+2Ojz4C1bLUdGUWsw0zuWqd4GJqxNuMIv0cXMw==
|
integrity sha512-rv3koC7f9lKKSkdpYgo/TGzgWlrB/aaiUInF1DyV7BpiM4kyTs+uhu6/r8XDMtBY2FOIHK+FlK3Iv7OzpA/tCA==
|
||||||
dependencies:
|
dependencies:
|
||||||
clsx "^1.1.1"
|
clsx "^1.1.1"
|
||||||
|
|
||||||
|
@ -2902,10 +2902,10 @@ strip-eof@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
|
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
|
||||||
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
|
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
|
||||||
|
|
||||||
stripe@8.176.0:
|
stripe@8.178.0:
|
||||||
version "8.176.0"
|
version "8.178.0"
|
||||||
resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.176.0.tgz#2f4980ab49acbfe6d67ecaddd54c05e20de9532c"
|
resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.178.0.tgz#89506b27501174eef12cb8ad57cc7d21c98b086a"
|
||||||
integrity sha512-0KCDo8TWFgeNWU7cPaqdjO2u2OSth0cmWYZmA7xsuxRCk7/lgWbJ/UbeSphx74cCIjFCmGuzDoNuNxqon9lEbg==
|
integrity sha512-Yk31NdIKf+MKTOdS2CTUIAHzUHOQwayoJFHBkrKGo7bJAlkPFzrIeOORH8SpduoXPZF8mq0JA7qNcFuFPBqabA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" ">=8.1.0"
|
"@types/node" ">=8.1.0"
|
||||||
qs "^6.6.0"
|
qs "^6.6.0"
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"copy-text-to-clipboard": "^3.0.1",
|
"copy-text-to-clipboard": "^3.0.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"framer-motion": "^4.1.17",
|
"framer-motion": "^4.1.17",
|
||||||
"gatsby": "^3.14.0",
|
"gatsby": "^3.14.1",
|
||||||
"gatsby-background-image": "^1.5.3",
|
"gatsby-background-image": "^1.5.3",
|
||||||
"gatsby-image": "^3.11.0",
|
"gatsby-image": "^3.11.0",
|
||||||
"gatsby-plugin-image": "^1.14.0",
|
"gatsby-plugin-image": "^1.14.0",
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"cypress": "^8.4.1",
|
"cypress": "^8.5.0",
|
||||||
"cypress-file-upload": "^5.0.8",
|
"cypress-file-upload": "^5.0.8",
|
||||||
"prettier": "^2.4.1"
|
"prettier": "^2.4.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,6 +12,7 @@ const NewsHeader = () => {
|
||||||
id
|
id
|
||||||
frontmatter {
|
frontmatter {
|
||||||
title
|
title
|
||||||
|
external
|
||||||
}
|
}
|
||||||
fields {
|
fields {
|
||||||
slug
|
slug
|
||||||
|
@ -26,8 +27,9 @@ const NewsHeader = () => {
|
||||||
|
|
||||||
if (!latestNews) return null; // no news
|
if (!latestNews) return null; // no news
|
||||||
|
|
||||||
const title = latestNews.node.frontmatter.title;
|
const { frontmatter, fields } = latestNews.node;
|
||||||
const link = { to: latestNews.node.fields.slug };
|
const { title, external } = frontmatter;
|
||||||
|
const link = external ? { href: external } : { to: fields.slug };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-palette-500 px-8 p-3">
|
<div className="bg-palette-500 px-8 p-3">
|
||||||
|
|
|
@ -6,39 +6,36 @@ import { NewsSummary } from "../components/News";
|
||||||
import Link from "../components/Link";
|
import Link from "../components/Link";
|
||||||
import Seo from "../components/seo";
|
import Seo from "../components/seo";
|
||||||
|
|
||||||
const NewsCard = ({ ...props }) => {
|
const NewsCard = ({ frontmatter, fields }) => {
|
||||||
const linkProps = { to: !props.frontmatter.external && props.fields.slug, href: props.frontmatter.external };
|
const { title, external, categories, description, thumbnail, avatar, author, date } = frontmatter;
|
||||||
|
const link = external ? { href: external } : { to: fields.slug };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<Link {...linkProps} className="flex items-center">
|
<Link {...link} className="flex items-center">
|
||||||
<GatsbyImage image={getImage(props.frontmatter.thumbnail)} alt={props.frontmatter.title} />
|
<GatsbyImage image={getImage(thumbnail)} alt={title} />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
{props.frontmatter.categories && (
|
{categories && (
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
{props.frontmatter.categories.map((category) => (
|
{categories.map((category) => (
|
||||||
<Label key={category}>{category}</Label>
|
<Label key={category}>{category}</Label>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Link {...linkProps} className="text-xl mt-6">
|
<Link {...link} className="text-xl mt-6">
|
||||||
{props.frontmatter.title}
|
{title}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
{props.frontmatter.description && (
|
{description && (
|
||||||
<Link {...linkProps} className="font-content text-palette-400 mt-4">
|
<Link {...link} className="font-content text-palette-400 mt-4">
|
||||||
{props.frontmatter.description}
|
{description}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<NewsSummary
|
<NewsSummary avatar={avatar} author={author} date={date} />
|
||||||
avatar={props.frontmatter.avatar}
|
|
||||||
author={props.frontmatter.author}
|
|
||||||
date={props.frontmatter.date}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -4360,10 +4360,10 @@ cypress-file-upload@^5.0.8:
|
||||||
resolved "https://registry.yarnpkg.com/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz#d8824cbeaab798e44be8009769f9a6c9daa1b4a1"
|
resolved "https://registry.yarnpkg.com/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz#d8824cbeaab798e44be8009769f9a6c9daa1b4a1"
|
||||||
integrity sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==
|
integrity sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==
|
||||||
|
|
||||||
cypress@^8.4.1:
|
cypress@^8.5.0:
|
||||||
version "8.4.1"
|
version "8.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.4.1.tgz#8b5898bf49359cadc28f02ba05d51f63b8e3a717"
|
resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.5.0.tgz#5712ca170913f8344bf167301205c4217c1eb9bd"
|
||||||
integrity sha512-itJXq0Vx3sXCUrDyBi2IUrkxVu/gTTp1VhjB5tzGgkeCR8Ae+/T8WV63rsZ7fS8Tpq7LPPXiyoM/sEdOX7cR6A==
|
integrity sha512-MMkXIS+Ro2KETn4gAlG3tIc/7FiljuuCZP0zpd9QsRG6MZSyZW/l1J3D4iQM6WHsVxuX4rFChn5jPFlC2tNSvQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cypress/request" "^2.88.6"
|
"@cypress/request" "^2.88.6"
|
||||||
"@cypress/xvfb" "^1.2.4"
|
"@cypress/xvfb" "^1.2.4"
|
||||||
|
@ -4399,6 +4399,7 @@ cypress@^8.4.1:
|
||||||
minimist "^1.2.5"
|
minimist "^1.2.5"
|
||||||
ospath "^1.2.2"
|
ospath "^1.2.2"
|
||||||
pretty-bytes "^5.6.0"
|
pretty-bytes "^5.6.0"
|
||||||
|
proxy-from-env "1.0.0"
|
||||||
ramda "~0.27.1"
|
ramda "~0.27.1"
|
||||||
request-progress "^3.0.0"
|
request-progress "^3.0.0"
|
||||||
supports-color "^8.1.1"
|
supports-color "^8.1.1"
|
||||||
|
@ -6460,10 +6461,10 @@ gatsby-worker@^0.5.0:
|
||||||
"@babel/core" "^7.15.5"
|
"@babel/core" "^7.15.5"
|
||||||
"@babel/runtime" "^7.15.4"
|
"@babel/runtime" "^7.15.4"
|
||||||
|
|
||||||
gatsby@^3.14.0:
|
gatsby@^3.14.1:
|
||||||
version "3.14.0"
|
version "3.14.1"
|
||||||
resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-3.14.0.tgz#06c27464f1a9d044169ec910d0c9d7ef44e0b1d8"
|
resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-3.14.1.tgz#0b0edde45bedd18845ec338ca65b1e88d4de3384"
|
||||||
integrity sha512-ikXoVZ9LQO9lZBxVvQxrYkjhX1zz9/7/Iv/6WCt/UPdgYCWCKc6GWOqlbLKmjShM0fBxJHfjmiahNxuTzJIZsw==
|
integrity sha512-6wt1MDMOfm6Zm8yiS8zDwjkth5spX7RorKKnYNNfZFyD0lztdql9jgAXFCxO0FxRDagDKxxfxj3cYyHHzPlalg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/code-frame" "^7.14.0"
|
"@babel/code-frame" "^7.14.0"
|
||||||
"@babel/core" "^7.15.5"
|
"@babel/core" "^7.15.5"
|
||||||
|
@ -10785,6 +10786,11 @@ proxy-addr@~2.0.5:
|
||||||
forwarded "0.2.0"
|
forwarded "0.2.0"
|
||||||
ipaddr.js "1.9.1"
|
ipaddr.js "1.9.1"
|
||||||
|
|
||||||
|
proxy-from-env@1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
|
||||||
|
integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=
|
||||||
|
|
||||||
pseudomap@^1.0.1, pseudomap@^1.0.2:
|
pseudomap@^1.0.1, pseudomap@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
|
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
|
||||||
|
|
Reference in New Issue