2020-12-15 23:46:05 +01:00
import PropTypes from 'prop-types'
import Head from 'next/head'
import Navigasyon from './navigasyon'
2020-12-24 13:40:04 +01:00
const siteUrl = process . env . NEXT _PUBLIC _SITE _URL || 'http://localhost:3000'
2021-05-28 18:29:15 +02:00
const apiUrl = process . env . NEXT _PUBLIC _API _URL || 'http://localhost:1337'
2020-12-24 13:40:04 +01:00
2020-12-15 23:46:05 +01:00
export default function HeadLayout ( {
children ,
2021-05-28 18:29:15 +02:00
imageUrl ,
imageWidth ,
imageHeight ,
2021-05-28 20:15:26 +02:00
imageMime ,
2020-12-15 23:46:05 +01:00
title ,
2020-12-24 13:39:07 +01:00
tab ,
slug
2020-12-15 23:46:05 +01:00
} ) {
return (
< div >
< Head >
2021-03-07 15:46:30 +01:00
< title > # OKi | { title ? title : 'Organisation KA Internationale' } < / t i t l e >
2020-12-24 13:40:04 +01:00
< link rel = 'canonical' href = { ` ${ slug ? ` ${ siteUrl } / ${ slug } ` : siteUrl } ` } / >
2020-12-23 00:08:43 +01:00
< link rel = 'manifest' href = '/manifest.json' / >
2020-12-24 14:01:15 +01:00
< link rel = 'icon' type = 'image/x-icon' sizes = '128x128' href = '/favicon.ico' / >
< link rel = 'apple-touch-icon' href = '/favicon.ico' / >
2021-03-07 15:26:41 +01:00
< meta name = 'application-name' content = '#OKi | Organisation KA Internationale' / >
2020-12-23 23:39:20 +01:00
< meta name = 'twitter:card' content = 'summary' / >
2020-12-24 13:40:04 +01:00
< meta name = 'twitter:url' content = { ` ${ slug ? ` ${ siteUrl } / ${ slug } ` : siteUrl } ` } / >
2021-03-07 15:26:41 +01:00
< meta name = 'twitter:title' content = { ` #OKi | ${ title ? title : 'Organisation KA Internationale' } ` } / >
2022-01-27 23:18:54 +04:00
< meta name = 'twitter:description' content = 'Organisation KA Internationale. Musiques et actualités.' / >
2022-01-26 18:45:43 +04:00
< meta name = 'twitter:image' content = { ` ${ imageUrl ? ` ${ apiUrl } ${ imageUrl } ` : ` ${ siteUrl } /oki-logo-192x192.png ` } ` } / >
2021-09-28 23:16:54 +02:00
< meta name = 'twitter:creator' content = '@OrganisationKA' / >
< meta name = 'twitter:site' content = '@OrganisationKA' / >
2020-12-23 00:08:43 +01:00
< meta name = 'theme-color' content = '#303030' / >
< meta name = 'apple-mobile-web-app-status-bar' content = '#303030' / >
2020-12-15 23:46:05 +01:00
< meta charSet = 'utf-8' / >
2022-01-27 23:18:54 +04:00
< meta name = 'description' content = '#OKi (Organisation KA Internationale) a pour but de promouvoir les langues et les productions afro-diasporiques. Nous traitons de l’ actualité via #OKi Nouvèl' / >
2021-05-28 18:38:54 +02:00
< meta name = 'author' content = '#OKi' / >
2020-12-15 23:46:05 +01:00
< meta name = 'viewport' content = 'minimum-scale=1, initial-scale=1, width=device-width' / >
2020-12-24 13:40:04 +01:00
< meta property = 'og:url' content = { ` ${ slug ? ` ${ siteUrl } / ${ slug } ` : siteUrl } ` } / >
2020-12-15 23:46:05 +01:00
< meta property = 'og:type' content = 'website' / >
2021-03-07 15:26:41 +01:00
< meta property = 'og:site_name' content = { ` #OKi | ${ title ? title : 'Organisation KA Internationale' } ` } / >
< meta property = 'og:title' content = { ` #OKi | ${ title ? title : 'Organisation KA Internationale' } ` } / >
2022-01-27 23:18:54 +04:00
< meta property = 'og:description' content = '#OKi (Organisation KA Internationale) a pour but de promouvoir les langues et les productions afro-diasporiques. Nous traitons de l’ actualité via #OKi Nouvèl' / >
2020-12-15 23:46:05 +01:00
< meta property = 'og:locale' content = 'fr_FR' / >
2022-01-26 18:45:43 +04:00
< meta property = 'og:image' content = { ` ${ imageUrl ? ` ${ apiUrl } ${ imageUrl } ` : ` ${ siteUrl } /oki-logo-72x72.png ` } ` } / >
< meta property = 'og:image:secure_url' content = { ` ${ imageUrl ? ` ${ apiUrl } ${ imageUrl } ` : ` ${ siteUrl } /oki-logo-72x72.png ` } ` } / >
2021-05-28 20:15:26 +02:00
< meta property = 'og:image:type' content = { imageMime ? imageMime : 'image/png' } / >
2021-05-28 18:29:15 +02:00
< meta property = 'og:image:width' content = { imageWidth ? imageWidth : '72' } / >
< meta property = 'og:image:height' content = { imageHeight ? imageHeight : '72' } / >
< meta property = 'og:image:alt' content = { ` ${ title && imageUrl ? title : '#OKi Logo' } | Organisation KA Internationale ` } / >
2020-12-15 23:46:05 +01:00
< / H e a d >
< Navigasyon selectedTab = { tab } / >
{ children }
< / d i v >
)
}
HeadLayout . propTypes = {
children : PropTypes . node . isRequired ,
2021-05-28 18:29:15 +02:00
imageUrl : PropTypes . string ,
imageWidth : PropTypes . number ,
imageHeight : PropTypes . number ,
2021-05-28 20:15:26 +02:00
imageMime : PropTypes . string ,
2020-12-15 23:46:05 +01:00
title : PropTypes . string ,
2020-12-24 13:39:07 +01:00
tab : PropTypes . number . isRequired ,
slug : PropTypes . string
2020-12-15 23:46:05 +01:00
}
HeadLayout . defaultProps = {
2021-05-28 18:29:15 +02:00
imageUrl : null ,
imageWidth : null ,
imageHeight : null ,
2021-05-28 20:15:26 +02:00
imageMime : null ,
2020-12-24 13:39:07 +01:00
title : null ,
slug : null
2020-12-15 23:46:05 +01:00
}