UNPKG

infinity-forge

Version:
20 lines 5.48 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.HeadComponent = HeadComponent; var jsx_runtime_1 = require("react/jsx-runtime"); var head_1 = __importDefault(require("next/head")); var ui_1 = require("../../../../ui/index.js"); function HeadComponent(_a) { var headContent = _a.headContent; var configs = (0, ui_1.useSite)(); var location = process.browser ? window.location.origin : ''; var title = (headContent === null || headContent === void 0 ? void 0 : headContent.pageTitle) || (configs === null || configs === void 0 ? void 0 : configs.metaTitle); var description = (headContent === null || headContent === void 0 ? void 0 : headContent.metaDescription) || (configs === null || configs === void 0 ? void 0 : configs.metaDescription); var imageOpenGraph = (headContent === null || headContent === void 0 ? void 0 : headContent.imageOpenGraph) || (configs === null || configs === void 0 ? void 0 : configs.metaImage); var author = (headContent === null || headContent === void 0 ? void 0 : headContent.author) || 'Codie'; return ((0, jsx_runtime_1.jsxs)(head_1.default, { children: [(configs === null || configs === void 0 ? void 0 : configs.facebookDomainVerification) && ((0, jsx_runtime_1.jsx)("meta", { name: 'facebook-domain-verification', content: configs === null || configs === void 0 ? void 0 : configs.facebookDomainVerification })), (configs === null || configs === void 0 ? void 0 : configs.aw) || (configs === null || configs === void 0 ? void 0 : configs.gtm) && (0, jsx_runtime_1.jsx)("link", { rel: 'preconnect', href: 'https://www.google-analytics.com' }), (0, jsx_runtime_1.jsx)("link", { rel: 'dns-prefetch', href: 'https://www.google-analytics.com' }), (0, jsx_runtime_1.jsx)("link", { rel: 'icon', href: (configs === null || configs === void 0 ? void 0 : configs.favicon) || '/favicon.ico' }), (0, jsx_runtime_1.jsx)("link", { rel: 'apple-touch-icon', sizes: '180x180', href: (configs === null || configs === void 0 ? void 0 : configs.favicon) || '/favicon.ico' }), (0, jsx_runtime_1.jsx)("link", { rel: 'canonical', href: location }), (0, jsx_runtime_1.jsx)("meta", { name: 'theme-color', content: '#fff' }), (0, jsx_runtime_1.jsx)("meta", { name: 'msapplication-TileColor', content: '#000' }), (0, jsx_runtime_1.jsx)("meta", { name: 'msapplication-TileImage', content: (configs === null || configs === void 0 ? void 0 : configs.favicon) || '/favicon.ico' }), (0, jsx_runtime_1.jsx)("meta", { httpEquiv: 'Content-Type', content: 'text/html; charset=utf-8' }), (0, jsx_runtime_1.jsx)("meta", { name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no, minimum-scale=1' }), (0, jsx_runtime_1.jsx)("meta", { name: 'robots', content: 'index, follow' }), (0, jsx_runtime_1.jsx)("meta", { name: 'googlebot', content: 'index, follow' }), (0, jsx_runtime_1.jsx)("meta", { name: 'referrer', content: 'origin' }), (0, jsx_runtime_1.jsx)("meta", { name: 'mobile-web-app-capable', content: 'yes' }), (0, jsx_runtime_1.jsx)("meta", { name: 'apple-mobile-web-app-capable', content: 'yes' }), (0, jsx_runtime_1.jsx)("meta", { name: 'author', content: author }), (0, jsx_runtime_1.jsx)("meta", { name: 'copyright', content: author }), (0, jsx_runtime_1.jsx)("meta", { name: 'distribution', content: 'global' }), (0, jsx_runtime_1.jsx)("meta", { name: 'language', content: 'portuguese, PT' }), (0, jsx_runtime_1.jsx)("meta", { name: 'content-language', content: 'pt-br' }), (0, jsx_runtime_1.jsx)("meta", { name: 'rating', content: 'general' }), (0, jsx_runtime_1.jsx)("meta", { name: 'keyboard-shortcuts-preference', content: 'all' }), (0, jsx_runtime_1.jsx)("title", { children: title }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:type', content: 'website' }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:locale', content: 'pt_BR' }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:image:width', content: '600' }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:image:height', content: '300' }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:image:type', content: 'image/jpg' }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:title', content: title }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:site_name', content: title }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:url', content: location }), (0, jsx_runtime_1.jsx)("meta", { name: 'description', content: description }), (0, jsx_runtime_1.jsx)("meta", { itemProp: 'description', content: description }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:description', content: description }), imageOpenGraph && (0, jsx_runtime_1.jsx)("meta", { property: 'og:image', content: imageOpenGraph }), (0, jsx_runtime_1.jsx)("meta", { property: 'og:image:alt', content: title }), imageOpenGraph && (0, jsx_runtime_1.jsx)("meta", { name: 'twitter:image', content: imageOpenGraph }), imageOpenGraph && (0, jsx_runtime_1.jsx)("meta", { property: 'og:image:secure_url', content: imageOpenGraph }), (0, jsx_runtime_1.jsx)("meta", { name: 'twitter:title', content: title }), (0, jsx_runtime_1.jsx)("meta", { name: 'twitter:description', content: description }), (0, jsx_runtime_1.jsx)("meta", { property: 'twitter:domain', content: location }), (0, jsx_runtime_1.jsx)("meta", { name: 'twitter:card', content: 'summary_large_image' })] })); } //# sourceMappingURL=component.js.map