%PDF- %PDF-
Direktori : /var/www/html/.next/server/pages/ |
Current File : /var/www/html/.next/server/pages/news.js |
"use strict"; (() => { var exports = {}; exports.id = 134; exports.ids = [134]; exports.modules = { /***/ 9372: /***/ ((module, __webpack_exports__, __webpack_require__) => { __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_image__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5675); /* harmony import */ var next_image__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_image__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1664); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _src_Components_Backgrounds__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4078); /* harmony import */ var _src_Components_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8777); /* harmony import */ var _src_Components_Contact__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2300); /* harmony import */ var html_react_parser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2905); /* harmony import */ var _src_Components_Global_CustomHead__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(787); var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_src_Components_Contact__WEBPACK_IMPORTED_MODULE_5__, html_react_parser__WEBPACK_IMPORTED_MODULE_6__]); ([_src_Components_Contact__WEBPACK_IMPORTED_MODULE_5__, html_react_parser__WEBPACK_IMPORTED_MODULE_6__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__); function NewsFeed({ data , seo }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_src_Components_Global_CustomHead__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, { data: seo }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "mainNewsFeed", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "intro", children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: "newsBackground", children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_src_Components_Backgrounds__WEBPACK_IMPORTED_MODULE_3__/* .NewsBg */ .UO, {}) }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: "newsDiv", children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h4", { children: data?.small_title }) }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,html_react_parser__WEBPACK_IMPORTED_MODULE_6__["default"])(data?.title) }) ] }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: "feedContent", children: data?.posts.map((post, index)=>{ return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "card", children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: `/news/${post.slug}`, passHref: true, children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("a", { children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_image__WEBPACK_IMPORTED_MODULE_1___default()), { src: post.image, alt: "", width: "504", height: "530", objectFit: "cover" }) }) }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", { children: post.date }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: `/news/${post.slug}`, passHref: true, children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("a", { children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h4", { children: (0,html_react_parser__WEBPACK_IMPORTED_MODULE_6__["default"])(post.title) }) }) }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_link__WEBPACK_IMPORTED_MODULE_2___default()), { href: `/news/${post.slug}`, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("a", { children: [ "Read More ", /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_src_Components_Icons__WEBPACK_IMPORTED_MODULE_4__/* .ArrowRight */ .ol, {}) ] }) }) ] }, index); }) }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_src_Components_Contact__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {}) ] }) ] }); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NewsFeed); async function getServerSideProps(ctx) { const res = await fetch(`https://api.atvbuggy-dubrovnik.com/wp-json/api/v1/news`).then((response)=>response.json()).then((data)=>data); const seo = await fetch(`https://api.atvbuggy-dubrovnik.com/wp-json/wp/v2/pages?slug=news`).then((response)=>response.json()).then((data)=>data[0]); if (!res) { return { notFound: true }; } return { props: { data: res, seo: seo.yoast_head_json } }; } __webpack_async_result__(); } catch(e) { __webpack_async_result__(e); } }); /***/ }), /***/ 2296: /***/ ((module) => { module.exports = require("formik"); /***/ }), /***/ 3280: /***/ ((module) => { module.exports = require("next/dist/shared/lib/app-router-context.js"); /***/ }), /***/ 2796: /***/ ((module) => { module.exports = require("next/dist/shared/lib/head-manager-context.js"); /***/ }), /***/ 4957: /***/ ((module) => { module.exports = require("next/dist/shared/lib/head.js"); /***/ }), /***/ 4014: /***/ ((module) => { module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js"); /***/ }), /***/ 744: /***/ ((module) => { module.exports = require("next/dist/shared/lib/image-config-context.js"); /***/ }), /***/ 5843: /***/ ((module) => { module.exports = require("next/dist/shared/lib/image-config.js"); /***/ }), /***/ 8524: /***/ ((module) => { module.exports = require("next/dist/shared/lib/is-plain-object.js"); /***/ }), /***/ 8020: /***/ ((module) => { module.exports = require("next/dist/shared/lib/mitt.js"); /***/ }), /***/ 4406: /***/ ((module) => { module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js"); /***/ }), /***/ 4964: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router-context.js"); /***/ }), /***/ 1751: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js"); /***/ }), /***/ 6220: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/compare-states.js"); /***/ }), /***/ 299: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js"); /***/ }), /***/ 3938: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/format-url.js"); /***/ }), /***/ 9565: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js"); /***/ }), /***/ 5789: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js"); /***/ }), /***/ 1897: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/is-bot.js"); /***/ }), /***/ 1428: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js"); /***/ }), /***/ 8854: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/parse-path.js"); /***/ }), /***/ 1292: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js"); /***/ }), /***/ 4567: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js"); /***/ }), /***/ 979: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/querystring.js"); /***/ }), /***/ 3297: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js"); /***/ }), /***/ 6052: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js"); /***/ }), /***/ 4226: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js"); /***/ }), /***/ 5052: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/route-regex.js"); /***/ }), /***/ 9232: /***/ ((module) => { module.exports = require("next/dist/shared/lib/utils.js"); /***/ }), /***/ 968: /***/ ((module) => { module.exports = require("next/head"); /***/ }), /***/ 6689: /***/ ((module) => { module.exports = require("react"); /***/ }), /***/ 997: /***/ ((module) => { module.exports = require("react/jsx-runtime"); /***/ }), /***/ 5609: /***/ ((module) => { module.exports = require("yup"); /***/ }), /***/ 2905: /***/ ((module) => { module.exports = import("html-react-parser");; /***/ }), /***/ 5941: /***/ ((module) => { module.exports = import("swr");; /***/ }) }; ; // load runtime var __webpack_require__ = require("../webpack-runtime.js"); __webpack_require__.C(exports); var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [676,61,783,787,300,78], () => (__webpack_exec__(9372))); module.exports = __webpack_exports__; })();