1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

Opening blog post link in new tab (#1526)

* Opening link in new tab

* Adding styling to link

* Updating button font size
This commit is contained in:
Jamie Hewitt 2022-06-20 15:46:13 +01:00 committed by GitHub
parent 33edc3f5f4
commit f20a6a5a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 7 deletions

View File

@ -14,7 +14,7 @@
"link": "/profile" "link": "/profile"
} }
], ],
"announcement": "Data NFTs, One-Sided Staking and more. [Explore OceanONDA V4](https://blog.oceanprotocol.com/oceanonda-v4-production-has-arrived-cb4fe8faaf39).", "announcement": "Data NFTs, One-Sided Staking and more.",
"warning": { "warning": {
"ctd": "Compute-to-Data is still in a testing phase, please use it only on test networks." "ctd": "Compute-to-Data is still in a testing phase, please use it only on test networks."
} }

View File

@ -24,10 +24,6 @@
display: inline-block; display: inline-block;
} }
.banner button {
font-size: calc(var(--font-size-small) / 1.1);
}
.text { .text {
font-size: var(--font-size-small); font-size: var(--font-size-small);
font-weight: var(--font-weight-bold); font-weight: var(--font-weight-bold);
@ -41,6 +37,13 @@
text-decoration: underline; text-decoration: underline;
} }
.link {
color: inherit;
text-decoration: underline;
text-transform: inherit;
font-size: var(--font-size-small);
}
.text p:last-child { .text p:last-child {
margin-bottom: 0; margin-bottom: 0;
} }

View File

@ -35,7 +35,12 @@ export default function AnnouncementBanner({
<div className={styleClasses}> <div className={styleClasses}>
{text && <Markdown className={styles.text} text={text} />} {text && <Markdown className={styles.text} text={text} />}
{action && ( {action && (
<Button style="text" size="small" onClick={action.handleAction}> <Button
style="text"
size="small"
className={styles.link}
onClick={action.handleAction}
>
{action.name} {action.name}
</Button> </Button>
)} )}

View File

@ -19,11 +19,26 @@ export default function App({
const { siteContent, appConfig } = useMarketMetadata() const { siteContent, appConfig } = useMarketMetadata()
const { accountId } = useWeb3() const { accountId } = useWeb3()
const { isInPurgatory, purgatoryData } = useAccountPurgatory(accountId) const { isInPurgatory, purgatoryData } = useAccountPurgatory(accountId)
function openInNewTab() {
window
.open(
'https://blog.oceanprotocol.com/how-to-publish-a-data-nft-f58ad2a622a9',
'_blank'
)
.focus()
}
return ( return (
<div className={styles.app}> <div className={styles.app}>
{siteContent?.announcement !== '' && ( {siteContent?.announcement !== '' && (
<AnnouncementBanner text={siteContent?.announcement} /> <AnnouncementBanner
text={siteContent?.announcement}
action={{
name: 'Explore OceanONDA V4.',
style: 'link',
handleAction: openInNewTab
}}
/>
)} )}
<Header /> <Header />