@k34a/blog 0.0.4 → 0.0.6
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/dist/components/articles/banner-image.d.ts +9 -0
- package/dist/components/articles/banner-image.js +27 -0
- package/dist/components/articles/description.d.ts +8 -0
- package/dist/components/articles/description.js +18 -0
- package/dist/components/articles/index.d.ts +11 -0
- package/dist/components/articles/index.js +49 -0
- package/dist/components/filter-search-sort.d.ts +1 -1
- package/dist/components/types.d.ts +4 -0
- package/dist/components/types.js +1 -0
- package/dist/components/utils.d.ts +2 -0
- package/dist/components/utils.js +1560 -0
- package/dist/main.d.ts +5 -3
- package/dist/main.js +8 -4
- package/package.json +6 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Box as r, Image as o } from "@mantine/core";
|
|
4
|
+
import { resolveImageForArticle as a } from "../utils.js";
|
|
5
|
+
const c = (e) => {
|
|
6
|
+
const i = a(
|
|
7
|
+
e.config.supabaseHost,
|
|
8
|
+
e.id,
|
|
9
|
+
e.src
|
|
10
|
+
);
|
|
11
|
+
return /* @__PURE__ */ t(r, { pos: "relative", h: { base: 260, lg: "100%" }, children: /* @__PURE__ */ t(
|
|
12
|
+
o,
|
|
13
|
+
{
|
|
14
|
+
src: i,
|
|
15
|
+
alt: e.title,
|
|
16
|
+
width: 1e3,
|
|
17
|
+
height: 1e3,
|
|
18
|
+
style: {
|
|
19
|
+
maxWidth: "100%",
|
|
20
|
+
height: "auto"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
c as BannerImage
|
|
27
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Typography as l } from "@mantine/core";
|
|
4
|
+
import { applyImageFullPaths as i, resolveImageForArticle as n } from "../utils.js";
|
|
5
|
+
function s(t) {
|
|
6
|
+
const r = i(
|
|
7
|
+
t.html,
|
|
8
|
+
(o) => n(
|
|
9
|
+
t.config.supabaseHost,
|
|
10
|
+
t.articleId,
|
|
11
|
+
`content/${o}`
|
|
12
|
+
)
|
|
13
|
+
);
|
|
14
|
+
return /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: r } }) });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
s as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentsConfig } from '../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
config: ComponentsConfig;
|
|
4
|
+
title: string;
|
|
5
|
+
banner_image?: string;
|
|
6
|
+
id: string;
|
|
7
|
+
description: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default function Article(props: Props): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import { Box as r, Stack as c, Title as a, Flex as l, Anchor as m, Badge as o } from "@mantine/core";
|
|
4
|
+
import { IconHash as g } from "@tabler/icons-react";
|
|
5
|
+
import { BannerImage as d } from "./banner-image.js";
|
|
6
|
+
import f from "./description.js";
|
|
7
|
+
async function b(i) {
|
|
8
|
+
return /* @__PURE__ */ e(r, { maw: 800, mx: "auto", px: "sm", py: "lg", children: /* @__PURE__ */ t(c, { gap: "md", children: [
|
|
9
|
+
/* @__PURE__ */ e(a, { order: 1, children: i.title }),
|
|
10
|
+
i.banner_image && /* @__PURE__ */ e(
|
|
11
|
+
d,
|
|
12
|
+
{
|
|
13
|
+
id: i.id,
|
|
14
|
+
src: i.banner_image,
|
|
15
|
+
title: i.title,
|
|
16
|
+
config: i.config
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
/* @__PURE__ */ e(
|
|
20
|
+
f,
|
|
21
|
+
{
|
|
22
|
+
articleId: i.id,
|
|
23
|
+
html: i.description,
|
|
24
|
+
config: i.config
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ e(l, { wrap: "wrap", gap: "md", align: "center", mb: "lg", children: i.tags.map((n) => /* @__PURE__ */ e(
|
|
28
|
+
m,
|
|
29
|
+
{
|
|
30
|
+
href: `/${i.config.listingPage}?tags=${n}`,
|
|
31
|
+
children: /* @__PURE__ */ e(
|
|
32
|
+
o,
|
|
33
|
+
{
|
|
34
|
+
size: "md",
|
|
35
|
+
color: "sky.5",
|
|
36
|
+
variant: "outline",
|
|
37
|
+
leftSection: /* @__PURE__ */ e(g, { size: 14 }),
|
|
38
|
+
style: { cursor: "pointer" },
|
|
39
|
+
children: n
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
},
|
|
43
|
+
n
|
|
44
|
+
)) })
|
|
45
|
+
] }) });
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
b as default
|
|
49
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { articleQuerySchema } from '../services/search-params';
|
|
3
3
|
type FilterProps = z.infer<typeof articleQuerySchema>;
|
|
4
|
-
interface Props extends FilterProps {
|
|
4
|
+
export interface Props extends FilterProps {
|
|
5
5
|
availableTags: string[];
|
|
6
6
|
navigate: (query: string) => void;
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|