UNPKG

infinity-forge

Version:
81 lines 5.38 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.PostPage = PostPage; var jsx_runtime_1 = require("react/jsx-runtime"); var ui_1 = require("../../../../../../ui/index.js"); var moment_1 = __importDefault(require("moment")); var box_post_1 = require("./box-post/index.js"); var box_tags_1 = require("./box-tags/index.js"); var box_carousel_1 = require("./box-carousel/index.js"); var components_1 = require("../blog/components/index.js"); var S = __importStar(require("./styles.js")); function PostPage(props) { var header = (0, ui_1.useElementId)({ id: 'header' }); var page = (0, ui_1.useSection)({ ref: 'page' }).page; return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ui_1.HeadComponent, { headContent: { pageTitle: (page === null || page === void 0 ? void 0 : page.pageTitle) || (page === null || page === void 0 ? void 0 : page.titulo), metaDescription: page === null || page === void 0 ? void 0 : page.metaDescription, imageOpenGraph: page === null || page === void 0 ? void 0 : page.imagem, } }), (0, jsx_runtime_1.jsx)(S.Post, { className: 'post', style: { marginTop: "".concat(header === null || header === void 0 ? void 0 : header.offsetHeight, "px") }, children: (0, jsx_runtime_1.jsxs)(ui_1.Container, { children: [(page === null || page === void 0 ? void 0 : page.titulo) && ((0, jsx_runtime_1.jsxs)("div", { className: 'titles', children: [(0, jsx_runtime_1.jsx)("h2", { className: 'font-48-bold', children: page === null || page === void 0 ? void 0 : page.titulo }), (0, jsx_runtime_1.jsxs)("div", { className: 'container-breadcrumb', children: [(0, jsx_runtime_1.jsx)(ui_1.Breadcrumb, { links: [ { text: ((0, jsx_runtime_1.jsx)(ui_1.Translate, { translationId: 'breadcrumb.home', defaultTranslate: 'In\u00EDcio' })), href: '/', }, { text: ((0, jsx_runtime_1.jsx)(ui_1.Translate, { translationId: 'breadcrumb.blog', defaultTranslate: 'Blog' })), href: '/blog', }, { text: page === null || page === void 0 ? void 0 : page.titulo, href: '#', }, ] }), (0, jsx_runtime_1.jsx)("span", { className: 'font-14', children: (0, moment_1.default)(page === null || page === void 0 ? void 0 : page.dataCriacao).format('DD/MM/YYYY - HH:mm') })] })] })), (0, jsx_runtime_1.jsxs)("div", { className: 'posts-box', children: [(0, jsx_runtime_1.jsx)(box_post_1.BoxPost, {}), (0, jsx_runtime_1.jsx)(box_carousel_1.BoxCarousel, {}), (0, jsx_runtime_1.jsx)(box_tags_1.BoxTags, {})] }), (0, jsx_runtime_1.jsxs)("div", { className: 'box-actions', children: [(0, jsx_runtime_1.jsx)(components_1.SearchBlog, {}), (0, jsx_runtime_1.jsx)(components_1.NewsLetterBlog, {}), (0, jsx_runtime_1.jsx)(components_1.FeaturedBlogList, __assign({}, props))] })] }) })] })); } //# sourceMappingURL=component.js.map