1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-11-16 01:55:15 +01:00

meta titles

This commit is contained in:
Matthias Kretschmann 2018-04-03 23:17:16 +02:00
parent 76e8c6e779
commit 11e68fc662
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 27 additions and 8 deletions

View File

@ -7,6 +7,7 @@
"npm-run-all": "^4.1.2", "npm-run-all": "^4.1.2",
"react": "^16.3.0", "react": "^16.3.0",
"react-dom": "^16.3.0", "react-dom": "^16.3.0",
"react-helmet": "^5.2.0",
"react-lazyload": "^2.3.0", "react-lazyload": "^2.3.0",
"react-router-dom": "^4.2.2", "react-router-dom": "^4.2.2",
"react-scripts": "1.1.1", "react-scripts": "1.1.1",

View File

@ -9,7 +9,7 @@
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link rel="stylesheet" href="https://use.typekit.net/dtg3zui.css"> <link rel="stylesheet" href="https://use.typekit.net/dtg3zui.css">
<title>Portfolio</title> <title>matthias kretschmann { designer & developer }</title>
</head> </head>
<body> <body>
<noscript> <noscript>

View File

@ -1,15 +1,27 @@
import React from 'react' import React, { Fragment } from 'react'
import FadeIn from './components/atoms/FadeIn' import FadeIn from './components/atoms/FadeIn'
import Routes from './Routes' import Routes from './Routes'
import Footer from './components/molecules/Footer' import Footer from './components/molecules/Footer'
import Helmet from 'react-helmet/es/Helmet'
import meta from './data/meta.json'
const Head = () => (
<Helmet
defaultTitle={`${meta.title.toLowerCase()} { ${meta.tagline.toLowerCase()} }`}
titleTemplate={`%s // ${meta.title.toLowerCase()} { ${meta.tagline.toLowerCase()} }`}
/>
)
const App = () => ( const App = () => (
<Fragment>
<Head />
<FadeIn> <FadeIn>
<div className="app"> <div className="app">
<Routes /> <Routes />
<Footer /> <Footer />
</div> </div>
</FadeIn> </FadeIn>
</Fragment>
) )
export default App export default App

View File

@ -1,5 +1,6 @@
import React, { Fragment } from 'react' import React, { Fragment } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Helmet from 'react-helmet/es/Helmet'
import Header from '../molecules/Header' import Header from '../molecules/Header'
import Content from '../atoms/Content' import Content from '../atoms/Content'
import FullWidth from '../atoms/FullWidth' import FullWidth from '../atoms/FullWidth'
@ -14,7 +15,12 @@ const Project = ({ project }) => {
return ( return (
<Fragment> <Fragment>
<Helmet>
<title>{title}</title>
</Helmet>
<Header minimal /> <Header minimal />
<main className="screen screen--project"> <main className="screen screen--project">
<article className="project"> <article className="project">
<Content> <Content>