@fecommunity/reactpress-template-hello-world 1.0.0-beta.1 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/cache/.tsbuildinfo +1 -0
- package/.next/cache/webpack/client-development/0.pack +0 -0
- package/.next/cache/webpack/client-development/index.pack +0 -0
- package/.next/cache/webpack/client-development-fallback/0.pack +0 -0
- package/.next/cache/webpack/client-development-fallback/index.pack +0 -0
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-development/0.pack +0 -0
- package/.next/cache/webpack/server-development/1.pack +0 -0
- package/.next/cache/webpack/server-development/index.pack +0 -0
- package/.next/cache/webpack/server-development/index.pack.old +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/1.pack +0 -0
- package/.next/cache/webpack/server-production/2.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/.next/package.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/chunks/402.js +67 -0
- package/.next/server/chunks/415.js +32 -0
- package/.next/server/chunks/843.js +2759 -0
- package/.next/server/chunks/990.js +134 -0
- package/.next/server/chunks/font-manifest.json +1 -0
- package/.next/server/font-manifest.json +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/pages/404.js +309 -0
- package/.next/server/pages/404.js.nft.json +1 -0
- package/.next/server/pages/_app.js +91 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +800 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +148 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages/about.js +450 -0
- package/.next/server/pages/about.js.nft.json +1 -0
- package/.next/server/pages/index.js +453 -0
- package/.next/server/pages/index.js.nft.json +1 -0
- package/.next/server/pages/toolkit-demo.js +574 -0
- package/.next/server/pages/toolkit-demo.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +9 -0
- package/.next/server/webpack-runtime.js +160 -0
- package/README.md +4 -4
- package/next-env.d.ts +1 -1
- package/package.json +2 -2
- package/pages/about.tsx +2 -2
- package/pages/index.tsx +2 -2
- package/pages/toolkit-demo.tsx +4 -4
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
var exports = {};
|
|
4
|
+
exports.id = 405;
|
|
5
|
+
exports.ids = [405];
|
|
6
|
+
exports.modules = {
|
|
7
|
+
|
|
8
|
+
/***/ 7609:
|
|
9
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10
|
+
|
|
11
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13
|
+
/* harmony export */ "default": () => (/* binding */ Home),
|
|
14
|
+
/* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
|
|
15
|
+
/* harmony export */ });
|
|
16
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997);
|
|
17
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
|
|
18
|
+
/* harmony import */ var styled_jsx_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9816);
|
|
19
|
+
/* harmony import */ var styled_jsx_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_jsx_style__WEBPACK_IMPORTED_MODULE_1__);
|
|
20
|
+
/* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(968);
|
|
21
|
+
/* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_head__WEBPACK_IMPORTED_MODULE_2__);
|
|
22
|
+
/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6843);
|
|
23
|
+
/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__);
|
|
24
|
+
Object(function webpackMissingModule() { var e = new Error("Cannot find module '@fecommunity/reactpress-toolkit/dist/api/instance'"); e.code = 'MODULE_NOT_FOUND'; throw e; }());
|
|
25
|
+
Object(function webpackMissingModule() { var e = new Error("Cannot find module '@fecommunity/reactpress-toolkit/dist/utils'"); e.code = 'MODULE_NOT_FOUND'; throw e; }());
|
|
26
|
+
/* harmony import */ var _components_Header__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9503);
|
|
27
|
+
/* harmony import */ var _components_Footer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9845);
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
// Create a custom API instance with the desired baseURL
|
|
37
|
+
const customApi = Object(function webpackMissingModule() { var e = new Error("Cannot find module '@fecommunity/reactpress-toolkit/dist/api/instance'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())({
|
|
38
|
+
baseURL: "https://api.gaoredu.com/"
|
|
39
|
+
});
|
|
40
|
+
// Group utilities under a utils object to match the existing code
|
|
41
|
+
const utils = {
|
|
42
|
+
formatDate: Object(function webpackMissingModule() { var e = new Error("Cannot find module '@fecommunity/reactpress-toolkit/dist/utils'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()),
|
|
43
|
+
ApiError: Object(function webpackMissingModule() { var e = new Error("Cannot find module '@fecommunity/reactpress-toolkit/dist/utils'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()),
|
|
44
|
+
isApiError: Object(function webpackMissingModule() { var e = new Error("Cannot find module '@fecommunity/reactpress-toolkit/dist/utils'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()),
|
|
45
|
+
deepClone: Object(function webpackMissingModule() { var e = new Error("Cannot find module '@fecommunity/reactpress-toolkit/dist/utils'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())
|
|
46
|
+
};
|
|
47
|
+
function Home({ greeting , articles , categories , tags }) {
|
|
48
|
+
// Example usage of utils
|
|
49
|
+
const formatDate = (dateString)=>{
|
|
50
|
+
try {
|
|
51
|
+
const date = new Date(dateString);
|
|
52
|
+
return utils.formatDate(date, "YYYY-MM-DD");
|
|
53
|
+
} catch (error) {
|
|
54
|
+
return "Unknown date";
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
58
|
+
className: "jsx-ef481b1a19d056c4" + " " + "container",
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((next_head__WEBPACK_IMPORTED_MODULE_2___default()), {
|
|
61
|
+
children: [
|
|
62
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("title", {
|
|
63
|
+
className: "jsx-ef481b1a19d056c4",
|
|
64
|
+
children: "Hello World Template"
|
|
65
|
+
}),
|
|
66
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("meta", {
|
|
67
|
+
name: "description",
|
|
68
|
+
content: "A minimal hello-world template for ReactPress",
|
|
69
|
+
className: "jsx-ef481b1a19d056c4"
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("link", {
|
|
72
|
+
rel: "icon",
|
|
73
|
+
href: "/favicon.ico",
|
|
74
|
+
className: "jsx-ef481b1a19d056c4"
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_Header__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
|
|
79
|
+
currentPage: "home"
|
|
80
|
+
}),
|
|
81
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("main", {
|
|
82
|
+
className: "jsx-ef481b1a19d056c4" + " " + "main",
|
|
83
|
+
children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
84
|
+
className: "jsx-ef481b1a19d056c4" + " " + "content-wrapper",
|
|
85
|
+
children: [
|
|
86
|
+
/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
87
|
+
className: "jsx-ef481b1a19d056c4" + " " + "hero",
|
|
88
|
+
children: [
|
|
89
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h1", {
|
|
90
|
+
className: "jsx-ef481b1a19d056c4" + " " + "hero-title",
|
|
91
|
+
children: greeting
|
|
92
|
+
}),
|
|
93
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
|
|
94
|
+
className: "jsx-ef481b1a19d056c4" + " " + "hero-description",
|
|
95
|
+
children: "Welcome to your new ReactPress site! This is a minimal template to get you started quickly."
|
|
96
|
+
}),
|
|
97
|
+
/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
98
|
+
className: "jsx-ef481b1a19d056c4" + " " + "cta-buttons",
|
|
99
|
+
children: [
|
|
100
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_link__WEBPACK_IMPORTED_MODULE_3___default()), {
|
|
101
|
+
href: "/about",
|
|
102
|
+
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("a", {
|
|
103
|
+
className: "jsx-ef481b1a19d056c4" + " " + "cta-button primary",
|
|
104
|
+
children: "Learn More"
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_link__WEBPACK_IMPORTED_MODULE_3___default()), {
|
|
108
|
+
href: "/toolkit-demo",
|
|
109
|
+
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("a", {
|
|
110
|
+
className: "jsx-ef481b1a19d056c4" + " " + "cta-button secondary",
|
|
111
|
+
children: "Toolkit Demo"
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
}),
|
|
118
|
+
/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
119
|
+
className: "jsx-ef481b1a19d056c4" + " " + "content-section",
|
|
120
|
+
children: [
|
|
121
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h2", {
|
|
122
|
+
className: "jsx-ef481b1a19d056c4" + " " + "section-title",
|
|
123
|
+
children: "Latest Articles"
|
|
124
|
+
}),
|
|
125
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
|
|
126
|
+
className: "jsx-ef481b1a19d056c4" + " " + "articles-grid",
|
|
127
|
+
children: articles.slice(0, 3).map((article)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
128
|
+
className: "jsx-ef481b1a19d056c4" + " " + "article-card",
|
|
129
|
+
children: [
|
|
130
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h3", {
|
|
131
|
+
className: "jsx-ef481b1a19d056c4" + " " + "article-title",
|
|
132
|
+
children: article.title
|
|
133
|
+
}),
|
|
134
|
+
article.summary && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
|
|
135
|
+
className: "jsx-ef481b1a19d056c4" + " " + "article-summary",
|
|
136
|
+
children: article.summary
|
|
137
|
+
}),
|
|
138
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
|
|
139
|
+
className: "jsx-ef481b1a19d056c4" + " " + "article-meta",
|
|
140
|
+
children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
|
|
141
|
+
className: "jsx-ef481b1a19d056c4" + " " + "publish-date",
|
|
142
|
+
children: formatDate(article.publishAt)
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
}, article.id))
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
}),
|
|
150
|
+
/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
151
|
+
className: "jsx-ef481b1a19d056c4" + " " + "content-section",
|
|
152
|
+
children: [
|
|
153
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h2", {
|
|
154
|
+
className: "jsx-ef481b1a19d056c4" + " " + "section-title",
|
|
155
|
+
children: "Categories"
|
|
156
|
+
}),
|
|
157
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
|
|
158
|
+
className: "jsx-ef481b1a19d056c4" + " " + "categories-list",
|
|
159
|
+
children: categories.slice(0, 5).map((category)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", {
|
|
160
|
+
className: "jsx-ef481b1a19d056c4" + " " + "category-tag",
|
|
161
|
+
children: [
|
|
162
|
+
category.label,
|
|
163
|
+
" (",
|
|
164
|
+
category.articleCount || 0,
|
|
165
|
+
")"
|
|
166
|
+
]
|
|
167
|
+
}, category.value))
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
}),
|
|
171
|
+
/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
172
|
+
className: "jsx-ef481b1a19d056c4" + " " + "content-section",
|
|
173
|
+
children: [
|
|
174
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h2", {
|
|
175
|
+
className: "jsx-ef481b1a19d056c4" + " " + "section-title",
|
|
176
|
+
children: "Popular Tags"
|
|
177
|
+
}),
|
|
178
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
|
|
179
|
+
className: "jsx-ef481b1a19d056c4" + " " + "tags-list",
|
|
180
|
+
children: tags.slice(0, 10).map((tag)=>/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
|
|
181
|
+
className: "jsx-ef481b1a19d056c4" + " " + "tag-item",
|
|
182
|
+
children: tag.label
|
|
183
|
+
}, tag.value))
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
})
|
|
189
|
+
}),
|
|
190
|
+
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_Footer__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {}),
|
|
191
|
+
react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((styled_jsx_style__WEBPACK_IMPORTED_MODULE_1___default()), {
|
|
192
|
+
id: "bf4e35a4ee2c4036",
|
|
193
|
+
children: ".container.jsx-ef481b1a19d056c4{min-height:100vh;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background-color:#f8f9fa}.main.jsx-ef481b1a19d056c4{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;padding:3rem 0}.content-wrapper.jsx-ef481b1a19d056c4{max-width:1200px;margin:0 auto;padding:0 2rem}.hero.jsx-ef481b1a19d056c4{text-align:center;padding:4rem 0;margin-bottom:3rem;background:#fff;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;-webkit-box-shadow:0 4px 12px rgba(0,0,0,.05);-moz-box-shadow:0 4px 12px rgba(0,0,0,.05);box-shadow:0 4px 12px rgba(0,0,0,.05)}.hero-title.jsx-ef481b1a19d056c4{font-size:3rem;font-weight:800;color:#111827;margin:0 0 1.5rem 0;letter-spacing:-.025em}.hero-description.jsx-ef481b1a19d056c4{color:#6b7280;font-size:1.25rem;max-width:600px;margin:0 auto 2.5rem;line-height:1.7}.cta-buttons.jsx-ef481b1a19d056c4{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:1rem}.cta-button.jsx-ef481b1a19d056c4{display:inline-block;color:#fff;text-decoration:none;font-weight:600;padding:.875rem 1.75rem;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;-webkit-transition:all.3s cubic-bezier(.4,0,.2,1);-moz-transition:all.3s cubic-bezier(.4,0,.2,1);-o-transition:all.3s cubic-bezier(.4,0,.2,1);transition:all.3s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.cta-button.jsx-ef481b1a19d056c4:hover{-webkit-transform:translateY(-3px);-moz-transform:translateY(-3px);-ms-transform:translateY(-3px);-o-transform:translateY(-3px);transform:translateY(-3px);-webkit-box-shadow:0 6px 15px rgba(59,130,246,.3);-moz-box-shadow:0 6px 15px rgba(59,130,246,.3);box-shadow:0 6px 15px rgba(59,130,246,.3)}.cta-button.primary.jsx-ef481b1a19d056c4{background:-webkit-linear-gradient(315deg,#3b82f6,#8b5cf6);background:-moz-linear-gradient(315deg,#3b82f6,#8b5cf6);background:-o-linear-gradient(315deg,#3b82f6,#8b5cf6);background:linear-gradient(135deg,#3b82f6,#8b5cf6);border:none}.cta-button.secondary.jsx-ef481b1a19d056c4{background:transparent;color:#3b82f6;border:2px solid#3b82f6}.content-section.jsx-ef481b1a19d056c4{margin-bottom:3rem}.section-title.jsx-ef481b1a19d056c4{font-size:1.75rem;font-weight:700;color:#111827;margin:0 0 1.5rem 0;padding-bottom:.75rem;border-bottom:2px solid#e5e7eb}.articles-grid.jsx-ef481b1a19d056c4{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.5rem}.article-card.jsx-ef481b1a19d056c4{background:#fff;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;padding:1.5rem;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.05);-moz-box-shadow:0 2px 8px rgba(0,0,0,.05);box-shadow:0 2px 8px rgba(0,0,0,.05);-webkit-transition:all.3s ease;-moz-transition:all.3s ease;-o-transition:all.3s ease;transition:all.3s ease}.article-card.jsx-ef481b1a19d056c4:hover{-webkit-box-shadow:0 6px 16px rgba(0,0,0,.1);-moz-box-shadow:0 6px 16px rgba(0,0,0,.1);box-shadow:0 6px 16px rgba(0,0,0,.1);-webkit-transform:translateY(-2px);-moz-transform:translateY(-2px);-ms-transform:translateY(-2px);-o-transform:translateY(-2px);transform:translateY(-2px)}.article-title.jsx-ef481b1a19d056c4{font-size:1.25rem;font-weight:600;color:#111827;margin:0 0 .75rem 0}.article-summary.jsx-ef481b1a19d056c4{color:#6b7280;line-height:1.6;margin:0 0 1rem 0}.article-meta.jsx-ef481b1a19d056c4{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;font-size:.9rem;color:#9ca3af}.publish-date.jsx-ef481b1a19d056c4{font-style:italic}.categories-list.jsx-ef481b1a19d056c4{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:.75rem}.category-tag.jsx-ef481b1a19d056c4{background:#eff6ff;color:#3b82f6;padding:.5rem 1rem;-webkit-border-radius:9999px;-moz-border-radius:9999px;border-radius:9999px;font-size:.9rem;font-weight:500}.tags-list.jsx-ef481b1a19d056c4{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:.5rem}.tag-item.jsx-ef481b1a19d056c4{background:#f3f4f6;color:#4b5563;padding:.4rem .8rem;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;font-size:.875rem}@media(max-width:768px){.hero-title.jsx-ef481b1a19d056c4{font-size:2.2rem}.hero-description.jsx-ef481b1a19d056c4{font-size:1.1rem}.cta-buttons.jsx-ef481b1a19d056c4{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.articles-grid.jsx-ef481b1a19d056c4{grid-template-columns:1fr}}"
|
|
194
|
+
}),
|
|
195
|
+
react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((styled_jsx_style__WEBPACK_IMPORTED_MODULE_1___default()), {
|
|
196
|
+
id: "a48b555c08a5e98b",
|
|
197
|
+
children: 'html,body{padding:0;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;background-color:#f8f9fa}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}'
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
const getStaticProps = async ()=>{
|
|
203
|
+
try {
|
|
204
|
+
// Fetch data using the ReactPress toolkit
|
|
205
|
+
// Cast to any to access the actual response data
|
|
206
|
+
const [articlesResponse, categoriesResponse, tagsResponse] = await Promise.all([
|
|
207
|
+
customApi.article.findAll(),
|
|
208
|
+
customApi.category.findAll(),
|
|
209
|
+
customApi.tag.findAll(),
|
|
210
|
+
]);
|
|
211
|
+
// Extract the actual data from the responses
|
|
212
|
+
// The API response is wrapped in { statusCode, msg, success, data }
|
|
213
|
+
// For paginated responses, data is [items, total]
|
|
214
|
+
const articles = articlesResponse?.data?.data?.[0] || [];
|
|
215
|
+
const categories = categoriesResponse?.data?.data || [];
|
|
216
|
+
const tags = tagsResponse?.data?.data || [];
|
|
217
|
+
return {
|
|
218
|
+
props: {
|
|
219
|
+
greeting: "Hello, World!",
|
|
220
|
+
articles,
|
|
221
|
+
categories,
|
|
222
|
+
tags
|
|
223
|
+
},
|
|
224
|
+
revalidate: 60
|
|
225
|
+
};
|
|
226
|
+
} catch (error) {
|
|
227
|
+
console.error("Failed to fetch data:", error);
|
|
228
|
+
// Example of using utils.ApiError
|
|
229
|
+
if (utils.ApiError.isInstance(error)) {
|
|
230
|
+
console.error(`API Error ${error.code}: ${error.message}`);
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
props: {
|
|
234
|
+
greeting: "Hello, World!",
|
|
235
|
+
articles: [],
|
|
236
|
+
categories: [],
|
|
237
|
+
tags: []
|
|
238
|
+
},
|
|
239
|
+
revalidate: 60
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
/***/ }),
|
|
246
|
+
|
|
247
|
+
/***/ 3280:
|
|
248
|
+
/***/ ((module) => {
|
|
249
|
+
|
|
250
|
+
module.exports = require("next/dist/shared/lib/app-router-context.js");
|
|
251
|
+
|
|
252
|
+
/***/ }),
|
|
253
|
+
|
|
254
|
+
/***/ 2796:
|
|
255
|
+
/***/ ((module) => {
|
|
256
|
+
|
|
257
|
+
module.exports = require("next/dist/shared/lib/head-manager-context.js");
|
|
258
|
+
|
|
259
|
+
/***/ }),
|
|
260
|
+
|
|
261
|
+
/***/ 4014:
|
|
262
|
+
/***/ ((module) => {
|
|
263
|
+
|
|
264
|
+
module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");
|
|
265
|
+
|
|
266
|
+
/***/ }),
|
|
267
|
+
|
|
268
|
+
/***/ 8524:
|
|
269
|
+
/***/ ((module) => {
|
|
270
|
+
|
|
271
|
+
module.exports = require("next/dist/shared/lib/is-plain-object.js");
|
|
272
|
+
|
|
273
|
+
/***/ }),
|
|
274
|
+
|
|
275
|
+
/***/ 8020:
|
|
276
|
+
/***/ ((module) => {
|
|
277
|
+
|
|
278
|
+
module.exports = require("next/dist/shared/lib/mitt.js");
|
|
279
|
+
|
|
280
|
+
/***/ }),
|
|
281
|
+
|
|
282
|
+
/***/ 4406:
|
|
283
|
+
/***/ ((module) => {
|
|
284
|
+
|
|
285
|
+
module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");
|
|
286
|
+
|
|
287
|
+
/***/ }),
|
|
288
|
+
|
|
289
|
+
/***/ 4964:
|
|
290
|
+
/***/ ((module) => {
|
|
291
|
+
|
|
292
|
+
module.exports = require("next/dist/shared/lib/router-context.js");
|
|
293
|
+
|
|
294
|
+
/***/ }),
|
|
295
|
+
|
|
296
|
+
/***/ 1751:
|
|
297
|
+
/***/ ((module) => {
|
|
298
|
+
|
|
299
|
+
module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");
|
|
300
|
+
|
|
301
|
+
/***/ }),
|
|
302
|
+
|
|
303
|
+
/***/ 6220:
|
|
304
|
+
/***/ ((module) => {
|
|
305
|
+
|
|
306
|
+
module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");
|
|
307
|
+
|
|
308
|
+
/***/ }),
|
|
309
|
+
|
|
310
|
+
/***/ 299:
|
|
311
|
+
/***/ ((module) => {
|
|
312
|
+
|
|
313
|
+
module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");
|
|
314
|
+
|
|
315
|
+
/***/ }),
|
|
316
|
+
|
|
317
|
+
/***/ 3938:
|
|
318
|
+
/***/ ((module) => {
|
|
319
|
+
|
|
320
|
+
module.exports = require("next/dist/shared/lib/router/utils/format-url.js");
|
|
321
|
+
|
|
322
|
+
/***/ }),
|
|
323
|
+
|
|
324
|
+
/***/ 9565:
|
|
325
|
+
/***/ ((module) => {
|
|
326
|
+
|
|
327
|
+
module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");
|
|
328
|
+
|
|
329
|
+
/***/ }),
|
|
330
|
+
|
|
331
|
+
/***/ 5789:
|
|
332
|
+
/***/ ((module) => {
|
|
333
|
+
|
|
334
|
+
module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");
|
|
335
|
+
|
|
336
|
+
/***/ }),
|
|
337
|
+
|
|
338
|
+
/***/ 1897:
|
|
339
|
+
/***/ ((module) => {
|
|
340
|
+
|
|
341
|
+
module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");
|
|
342
|
+
|
|
343
|
+
/***/ }),
|
|
344
|
+
|
|
345
|
+
/***/ 1428:
|
|
346
|
+
/***/ ((module) => {
|
|
347
|
+
|
|
348
|
+
module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");
|
|
349
|
+
|
|
350
|
+
/***/ }),
|
|
351
|
+
|
|
352
|
+
/***/ 8854:
|
|
353
|
+
/***/ ((module) => {
|
|
354
|
+
|
|
355
|
+
module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");
|
|
356
|
+
|
|
357
|
+
/***/ }),
|
|
358
|
+
|
|
359
|
+
/***/ 1292:
|
|
360
|
+
/***/ ((module) => {
|
|
361
|
+
|
|
362
|
+
module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");
|
|
363
|
+
|
|
364
|
+
/***/ }),
|
|
365
|
+
|
|
366
|
+
/***/ 4567:
|
|
367
|
+
/***/ ((module) => {
|
|
368
|
+
|
|
369
|
+
module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");
|
|
370
|
+
|
|
371
|
+
/***/ }),
|
|
372
|
+
|
|
373
|
+
/***/ 979:
|
|
374
|
+
/***/ ((module) => {
|
|
375
|
+
|
|
376
|
+
module.exports = require("next/dist/shared/lib/router/utils/querystring.js");
|
|
377
|
+
|
|
378
|
+
/***/ }),
|
|
379
|
+
|
|
380
|
+
/***/ 3297:
|
|
381
|
+
/***/ ((module) => {
|
|
382
|
+
|
|
383
|
+
module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");
|
|
384
|
+
|
|
385
|
+
/***/ }),
|
|
386
|
+
|
|
387
|
+
/***/ 6052:
|
|
388
|
+
/***/ ((module) => {
|
|
389
|
+
|
|
390
|
+
module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");
|
|
391
|
+
|
|
392
|
+
/***/ }),
|
|
393
|
+
|
|
394
|
+
/***/ 4226:
|
|
395
|
+
/***/ ((module) => {
|
|
396
|
+
|
|
397
|
+
module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");
|
|
398
|
+
|
|
399
|
+
/***/ }),
|
|
400
|
+
|
|
401
|
+
/***/ 5052:
|
|
402
|
+
/***/ ((module) => {
|
|
403
|
+
|
|
404
|
+
module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");
|
|
405
|
+
|
|
406
|
+
/***/ }),
|
|
407
|
+
|
|
408
|
+
/***/ 9232:
|
|
409
|
+
/***/ ((module) => {
|
|
410
|
+
|
|
411
|
+
module.exports = require("next/dist/shared/lib/utils.js");
|
|
412
|
+
|
|
413
|
+
/***/ }),
|
|
414
|
+
|
|
415
|
+
/***/ 968:
|
|
416
|
+
/***/ ((module) => {
|
|
417
|
+
|
|
418
|
+
module.exports = require("next/head");
|
|
419
|
+
|
|
420
|
+
/***/ }),
|
|
421
|
+
|
|
422
|
+
/***/ 6689:
|
|
423
|
+
/***/ ((module) => {
|
|
424
|
+
|
|
425
|
+
module.exports = require("react");
|
|
426
|
+
|
|
427
|
+
/***/ }),
|
|
428
|
+
|
|
429
|
+
/***/ 997:
|
|
430
|
+
/***/ ((module) => {
|
|
431
|
+
|
|
432
|
+
module.exports = require("react/jsx-runtime");
|
|
433
|
+
|
|
434
|
+
/***/ }),
|
|
435
|
+
|
|
436
|
+
/***/ 9816:
|
|
437
|
+
/***/ ((module) => {
|
|
438
|
+
|
|
439
|
+
module.exports = require("styled-jsx/style");
|
|
440
|
+
|
|
441
|
+
/***/ })
|
|
442
|
+
|
|
443
|
+
};
|
|
444
|
+
;
|
|
445
|
+
|
|
446
|
+
// load runtime
|
|
447
|
+
var __webpack_require__ = require("../webpack-runtime.js");
|
|
448
|
+
__webpack_require__.C(exports);
|
|
449
|
+
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
450
|
+
var __webpack_exports__ = __webpack_require__.X(0, [402,415,843,990], () => (__webpack_exec__(7609)));
|
|
451
|
+
module.exports = __webpack_exports__;
|
|
452
|
+
|
|
453
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1,"files":["../webpack-runtime.js","../chunks/402.js","../chunks/415.js","../chunks/843.js","../chunks/990.js","../../package.json","../../../node_modules/react","../../../node_modules/next","../../../package.json"]}
|