Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

477 righe
18 KiB

  1. (function() {
  2. var exports = {};
  3. exports.id = 6950;
  4. exports.ids = [6950];
  5. exports.modules = {
  6. /***/ 1288:
  7. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5282);
  10. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
  11. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9297);
  12. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
  13. const PageBanner = ({
  14. pageTitle
  15. }) => {
  16. return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
  17. className: "page-title-area",
  18. children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
  19. className: "d-table",
  20. children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
  21. className: "d-table-cell",
  22. children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
  23. className: "container",
  24. children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h2", {
  25. children: pageTitle
  26. })
  27. })
  28. })
  29. })
  30. });
  31. };
  32. /* harmony default export */ __webpack_exports__["Z"] = (PageBanner);
  33. /***/ }),
  34. /***/ 9838:
  35. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  36. "use strict";
  37. // ESM COMPAT FLAG
  38. __webpack_require__.r(__webpack_exports__);
  39. // EXPORTS
  40. __webpack_require__.d(__webpack_exports__, {
  41. "default": function() { return /* binding */ yamaha_LatestNews; },
  42. "getServerSideProps": function() { return /* binding */ getServerSideProps; }
  43. });
  44. // EXTERNAL MODULE: external "react/jsx-runtime"
  45. var jsx_runtime_ = __webpack_require__(5282);
  46. // EXTERNAL MODULE: external "react"
  47. var external_react_ = __webpack_require__(9297);
  48. // EXTERNAL MODULE: ./components/_App/NavbarYamaha.js
  49. var NavbarYamaha = __webpack_require__(2478);
  50. // EXTERNAL MODULE: ./components/_App/FooterYamaha.js
  51. var FooterYamaha = __webpack_require__(362);
  52. // EXTERNAL MODULE: ./components/Common/PageBanner.js
  53. var PageBanner = __webpack_require__(1288);
  54. // EXTERNAL MODULE: external "react-feather"
  55. var external_react_feather_ = __webpack_require__(9337);
  56. // EXTERNAL MODULE: ./node_modules/next/link.js
  57. var next_link = __webpack_require__(1664);
  58. ;// CONCATENATED MODULE: ./components/Yamaha/LatestNews/LatestNews.js
  59. function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
  60. function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  61. const News = function (_ref) {
  62. let {
  63. backend,
  64. news,
  65. othernews
  66. } = _ref,
  67. props = _objectWithoutProperties(_ref, ["backend", "news", "othernews"]);
  68. const NewsList = news.map(data => {
  69. return /*#__PURE__*/jsx_runtime_.jsx(jsx_runtime_.Fragment, {
  70. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  71. className: "col-lg-6 col-md-6",
  72. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  73. className: "single-blog-post",
  74. children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  75. className: "blog-image",
  76. children: [/*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  77. href: "/blog-details",
  78. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  79. children: /*#__PURE__*/jsx_runtime_.jsx("img", {
  80. src: `${backend}${data.img[0]["url"]}`
  81. })
  82. })
  83. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  84. className: "date",
  85. children: [/*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Calendar, {}), " ", data.published_at]
  86. })]
  87. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  88. className: "blog-post-content",
  89. children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
  90. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  91. href: "/yamaha/LatestNews/LatestNewsDetail?s=" + data.id,
  92. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  93. children: data.title
  94. })
  95. })
  96. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("span", {
  97. children: ["By ", /*#__PURE__*/jsx_runtime_.jsx("a", {
  98. href: "#",
  99. children: "Admin"
  100. })]
  101. }), /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  102. href: "/yamaha/LatestNews/LatestNewsDetail?s=" + data.id,
  103. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
  104. className: "read-more-btn",
  105. children: ["Read More ", /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.ArrowRight, {})]
  106. })
  107. })]
  108. })]
  109. })
  110. })
  111. });
  112. });
  113. const PopularNews = othernews.map(data => {
  114. return /*#__PURE__*/(0,jsx_runtime_.jsxs)("article", {
  115. className: "item",
  116. children: [/*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  117. href: "/blog-details",
  118. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  119. className: "thumb",
  120. children: /*#__PURE__*/jsx_runtime_.jsx("span", {
  121. className: "fullimage cover bg1",
  122. role: "img"
  123. })
  124. })
  125. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  126. className: "info",
  127. children: [/*#__PURE__*/jsx_runtime_.jsx("img", {
  128. src: `${backend}${data.img[0]["url"]}`,
  129. style: {
  130. width: "100px"
  131. }
  132. }), /*#__PURE__*/jsx_runtime_.jsx("time", {
  133. children: data.published_at
  134. }), /*#__PURE__*/jsx_runtime_.jsx("h4", {
  135. className: "title usmall",
  136. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  137. href: "/blog-details",
  138. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  139. style: {
  140. fontSize: "15px"
  141. },
  142. children: data.title
  143. })
  144. })
  145. })]
  146. }), /*#__PURE__*/jsx_runtime_.jsx("div", {
  147. className: "clear"
  148. })]
  149. });
  150. });
  151. return /*#__PURE__*/jsx_runtime_.jsx("div", {
  152. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  153. className: "blog-area ptb-80",
  154. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  155. className: "container",
  156. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  157. className: "row",
  158. children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
  159. className: "col-lg-8 col-md-12",
  160. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  161. className: "row justify-content-center",
  162. children: [NewsList, /*#__PURE__*/jsx_runtime_.jsx("div", {
  163. className: "col-lg-12 col-md-12",
  164. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  165. className: "pagination-area",
  166. children: /*#__PURE__*/jsx_runtime_.jsx("nav", {
  167. "aria-label": "Page navigation",
  168. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  169. className: "pagination justify-content-center",
  170. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  171. className: "page-item",
  172. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  173. className: "page-link",
  174. href: "#",
  175. children: "Prev"
  176. })
  177. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  178. className: "page-item active",
  179. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  180. className: "page-link",
  181. href: "#",
  182. children: "1"
  183. })
  184. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  185. className: "page-item",
  186. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  187. className: "page-link",
  188. href: "#",
  189. children: "2"
  190. })
  191. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  192. className: "page-item",
  193. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  194. className: "page-link",
  195. href: "#",
  196. children: "3"
  197. })
  198. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  199. className: "page-item",
  200. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  201. className: "page-link",
  202. href: "#",
  203. children: "Next"
  204. })
  205. })]
  206. })
  207. })
  208. })
  209. })]
  210. })
  211. }), /*#__PURE__*/jsx_runtime_.jsx("div", {
  212. className: "col-lg-4 col-md-12",
  213. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  214. className: "widget-area",
  215. id: "secondary",
  216. children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
  217. className: "widget widget_search",
  218. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("form", {
  219. className: "search-form",
  220. children: [/*#__PURE__*/jsx_runtime_.jsx("label", {
  221. children: /*#__PURE__*/jsx_runtime_.jsx("input", {
  222. type: "search",
  223. className: "search-field",
  224. placeholder: "Search..."
  225. })
  226. }), /*#__PURE__*/jsx_runtime_.jsx("button", {
  227. type: "submit",
  228. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Search, {})
  229. })]
  230. })
  231. }), PopularNews, /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  232. className: "widget widget_categories",
  233. children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
  234. className: "widget-title",
  235. children: "Categories"
  236. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  237. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  238. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  239. href: "#",
  240. children: "Business"
  241. })
  242. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  243. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  244. href: "#",
  245. children: "Privacy"
  246. })
  247. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  248. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  249. href: "#",
  250. children: "Technology"
  251. })
  252. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  253. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  254. href: "#",
  255. children: "Tips"
  256. })
  257. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  258. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  259. href: "#",
  260. children: "Uncategorized"
  261. })
  262. })]
  263. })]
  264. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  265. className: "widget widget_tag_cloud",
  266. children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
  267. className: "widget-title",
  268. children: "Tags"
  269. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  270. className: "tagcloud",
  271. children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
  272. href: "#",
  273. children: ["Motor ", /*#__PURE__*/jsx_runtime_.jsx("span", {
  274. className: "tag-link-count",
  275. children: "(3)"
  276. })]
  277. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
  278. href: "#",
  279. children: ["Services ", /*#__PURE__*/jsx_runtime_.jsx("span", {
  280. className: "tag-link-count",
  281. children: "(3)"
  282. })]
  283. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
  284. href: "#",
  285. children: ["Sparepart ", /*#__PURE__*/jsx_runtime_.jsx("span", {
  286. className: "tag-link-count",
  287. children: "(2)"
  288. })]
  289. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
  290. href: "#",
  291. children: ["Promo ", /*#__PURE__*/jsx_runtime_.jsx("span", {
  292. className: "tag-link-count",
  293. children: "(2)"
  294. })]
  295. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
  296. href: "#",
  297. children: ["Event ", /*#__PURE__*/jsx_runtime_.jsx("span", {
  298. className: "tag-link-count",
  299. children: "(1)"
  300. })]
  301. })]
  302. })]
  303. })]
  304. })
  305. })]
  306. })
  307. })
  308. })
  309. });
  310. };
  311. /* harmony default export */ var LatestNews = (News);
  312. // EXTERNAL MODULE: ./api/latest_news/news.js
  313. var latest_news_news = __webpack_require__(8888);
  314. var news_default = /*#__PURE__*/__webpack_require__.n(latest_news_news);
  315. ;// CONCATENATED MODULE: ./pages/yamaha/LatestNews/index.js
  316. function LatestNews_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = LatestNews_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
  317. function LatestNews_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  318. const LatestNews_News = function (_ref) {
  319. let {
  320. backend,
  321. news,
  322. othernews
  323. } = _ref,
  324. props = LatestNews_objectWithoutProperties(_ref, ["backend", "news", "othernews"]);
  325. return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
  326. children: [/*#__PURE__*/jsx_runtime_.jsx(NavbarYamaha/* default */.Z, {}), /*#__PURE__*/jsx_runtime_.jsx(PageBanner/* default */.Z, {
  327. pageTitle: "Latest News"
  328. }), /*#__PURE__*/jsx_runtime_.jsx(LatestNews, {
  329. news: news,
  330. othernews: othernews,
  331. backend: backend
  332. }), /*#__PURE__*/jsx_runtime_.jsx(FooterYamaha/* default */.Z, {})]
  333. });
  334. };
  335. /* harmony default export */ var yamaha_LatestNews = (LatestNews_News);
  336. async function getServerSideProps(context) {
  337. var news = [];
  338. var othernews = [];
  339. const backend = process.env.BACKEND_SERVER_URI;
  340. var res = await news_default().GetNewsYamaha();
  341. if (res["STATUS"] === 1) {
  342. news = res["DATA"]["latestNews"];
  343. }
  344. var res = await news_default().GetOtherNewsYamaha();
  345. if (res["STATUS"] === 1) {
  346. othernews = res["DATA"]["latestNews"];
  347. }
  348. console.log(othernews);
  349. return {
  350. props: {
  351. news,
  352. othernews,
  353. backend
  354. } // will be passed to the page component as props
  355. };
  356. }
  357. /***/ }),
  358. /***/ 8074:
  359. /***/ (function(module) {
  360. "use strict";
  361. module.exports = require("@apollo/client");;
  362. /***/ }),
  363. /***/ 1683:
  364. /***/ (function(module) {
  365. "use strict";
  366. module.exports = require("cross-fetch");;
  367. /***/ }),
  368. /***/ 8417:
  369. /***/ (function(module) {
  370. "use strict";
  371. module.exports = require("next/dist/next-server/lib/router-context.js");;
  372. /***/ }),
  373. /***/ 2238:
  374. /***/ (function(module) {
  375. "use strict";
  376. module.exports = require("next/dist/next-server/lib/router/utils/get-asset-path-from-route.js");;
  377. /***/ }),
  378. /***/ 6731:
  379. /***/ (function(module) {
  380. "use strict";
  381. module.exports = require("next/router");;
  382. /***/ }),
  383. /***/ 9297:
  384. /***/ (function(module) {
  385. "use strict";
  386. module.exports = require("react");;
  387. /***/ }),
  388. /***/ 9337:
  389. /***/ (function(module) {
  390. "use strict";
  391. module.exports = require("react-feather");;
  392. /***/ }),
  393. /***/ 5282:
  394. /***/ (function(module) {
  395. "use strict";
  396. module.exports = require("react/jsx-runtime");;
  397. /***/ })
  398. };
  399. ;
  400. // load runtime
  401. var __webpack_require__ = require("../../webpack-runtime.js");
  402. __webpack_require__.C(exports);
  403. var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
  404. var __webpack_exports__ = __webpack_require__.X(0, [1664,4755,6371,7798,8888], function() { return __webpack_exec__(9838); });
  405. module.exports = __webpack_exports__;
  406. })();