-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now the base template is cleaner and it's easier to manipulate the page meta.
- Loading branch information
Showing
10 changed files
with
516 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from "react"; | ||
import Helmet from "react-helmet-async"; | ||
import PropTypes from "prop-types"; | ||
|
||
const Meta = ({ siteName, title, description, keywords = [] }) => ( | ||
<Helmet> | ||
<link rel="canonical" href="https://react-finland.fi/" /> | ||
<link rel="icon" type="image/png" href="/favicon.png" /> | ||
|
||
<title> | ||
{siteName} - {title} | ||
</title> | ||
<meta property="og:site_name" content={siteName} /> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, maximum-scale=1, minimal-ui" | ||
/> | ||
<meta name="description" content={description} /> | ||
<meta name="keywords" content={keywords.join(", ")} /> | ||
|
||
<meta property="og:title" content={title} /> | ||
<meta property="og:description" content={description} /> | ||
<meta property="og:image" content="/meta-image.png" /> | ||
<meta name="twitter:title" content={title} /> | ||
<meta name="twitter:description" content={description} /> | ||
<meta name="twitter:site" content="@ReactFinland" /> | ||
<meta name="twitter:image" content="./meta-image.png" /> | ||
</Helmet> | ||
); | ||
Meta.propTypes = { | ||
siteName: PropTypes.string, | ||
title: PropTypes.string, | ||
description: PropTypes.string, | ||
keywords: PropTypes.array, | ||
}; | ||
|
||
export default Meta; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
function tweakSilverSponsors(sponsors) { | ||
// Tweak Nitor | ||
return sponsors.map(sponsor => { | ||
if (sponsor.name === "Nitor") { | ||
return { | ||
...sponsor, | ||
logoProps: { | ||
style: { | ||
background: "black", | ||
padding: "1.5em", | ||
}, | ||
}, | ||
}; | ||
} | ||
|
||
return sponsor; | ||
}); | ||
} | ||
|
||
function tweakBronzeSponsors(sponsors) { | ||
// Tweak Rohea | ||
return sponsors.map(sponsor => { | ||
if (sponsor.name === "Rohea") { | ||
return { | ||
...sponsor, | ||
logoProps: { | ||
style: { | ||
background: "black", | ||
padding: "1em", | ||
}, | ||
}, | ||
}; | ||
} | ||
|
||
return sponsor; | ||
}); | ||
} | ||
|
||
export { tweakSilverSponsors as silver, tweakBronzeSponsors as bronze }; |
Oops, something went wrong.