gomtm 0.0.326 → 0.0.327

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.
@@ -79,37 +79,52 @@ const PostCardListItem = (props) => {
79
79
  const activateItem = useListview((x) => x.activateItem);
80
80
  const setActivateItem = useListview((x) => x.setActivateItem);
81
81
  if (item.layoutVariant == "list") {
82
- return /* @__PURE__ */ jsx("li", { className: "py-12", children: /* @__PURE__ */ jsx("article", { children: /* @__PURE__ */ jsxs("div", { className: "space-y-2 xl:grid xl:grid-cols-4 xl:items-baseline xl:space-y-0", children: [
83
- /* @__PURE__ */ jsxs("dl", { children: [
84
- /* @__PURE__ */ jsx("dt", { className: "sr-only", children: "Published on" }),
85
- /* @__PURE__ */ jsx("dd", { className: "text-base font-medium leading-6 text-gray-500 dark:text-gray-400", children: /* @__PURE__ */ jsx(MtDateView, { date: item.publishDate }) })
86
- ] }),
87
- /* @__PURE__ */ jsxs("div", { className: "space-y-5 xl:col-span-3", children: [
88
- /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
89
- /* @__PURE__ */ jsxs("div", { children: [
90
- /* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold leading-8 tracking-tight", children: /* @__PURE__ */ jsx(
91
- MtLink,
92
- {
93
- href: `/blog/${item.slug}`,
94
- className: "text-gray-900 dark:text-gray-100",
95
- children: item.title
96
- }
97
- ) }),
98
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap", children: item.tags.map((tag) => /* @__PURE__ */ jsx(Tag, { text: tag }, tag)) })
82
+ return /* @__PURE__ */ jsx(
83
+ "li",
84
+ {
85
+ className: cn(
86
+ "relative py-12",
87
+ (activateItem == null ? void 0 : activateItem.id) == (item == null ? void 0 : item.id) && "border "
88
+ ),
89
+ onClick: () => {
90
+ setActivateItem(item);
91
+ },
92
+ children: /* @__PURE__ */ jsxs("article", { children: [
93
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2 xl:grid xl:grid-cols-4 xl:items-baseline xl:space-y-0", children: [
94
+ /* @__PURE__ */ jsxs("dl", { children: [
95
+ /* @__PURE__ */ jsx("dt", { className: "sr-only", children: "Published on" }),
96
+ /* @__PURE__ */ jsx("dd", { className: "text-base font-medium leading-6 text-gray-500 dark:text-gray-400", children: /* @__PURE__ */ jsx(MtDateView, { date: item.publishDate }) })
97
+ ] }),
98
+ /* @__PURE__ */ jsxs("div", { className: "space-y-5 xl:col-span-3", children: [
99
+ /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
100
+ /* @__PURE__ */ jsxs("div", { children: [
101
+ /* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold leading-8 tracking-tight", children: /* @__PURE__ */ jsx(
102
+ MtLink,
103
+ {
104
+ href: `/blog/${item.slug}`,
105
+ className: "text-gray-900 dark:text-gray-100",
106
+ children: item.title
107
+ }
108
+ ) }),
109
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap", children: item.tags.map((tag) => /* @__PURE__ */ jsx(Tag, { text: tag }, tag)) })
110
+ ] }),
111
+ /* @__PURE__ */ jsx("div", { className: "prose max-w-none text-gray-500 dark:text-gray-400", children: item.summary })
112
+ ] }),
113
+ /* @__PURE__ */ jsx("div", { className: "text-base font-medium leading-6", children: /* @__PURE__ */ jsx(
114
+ MtLink,
115
+ {
116
+ href: `/blog/${item.slug}`,
117
+ className: "text-primary-500 hover:text-primary-600 dark:hover:text-primary-400",
118
+ "aria-label": `Read more: "${title}"`,
119
+ children: "Read more \u2192"
120
+ }
121
+ ) })
122
+ ] })
99
123
  ] }),
100
- /* @__PURE__ */ jsx("div", { className: "prose max-w-none text-gray-500 dark:text-gray-400", children: item.summary })
101
- ] }),
102
- /* @__PURE__ */ jsx("div", { className: "text-base font-medium leading-6", children: /* @__PURE__ */ jsx(
103
- MtLink,
104
- {
105
- href: `/blog/${item.slug}`,
106
- className: "text-primary-500 hover:text-primary-600 dark:hover:text-primary-400",
107
- "aria-label": `Read more: "${title}"`,
108
- children: "Read more \u2192"
109
- }
110
- ) })
111
- ] })
112
- ] }) }) });
124
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-2 right-0", children: /* @__PURE__ */ jsx(PostCardItemActions, { id: item.id }) })
125
+ ] })
126
+ }
127
+ );
113
128
  }
114
129
  return /* @__PURE__ */ jsxs(
115
130
  Card,
@@ -158,6 +173,7 @@ const PostCardItemActions = (props) => {
158
173
  const slugPath = useListview((x) => x.slugPath);
159
174
  const [open, setOpen] = useState(false);
160
175
  const setOpenEdit = useListview((x) => x.setOpenEdit);
176
+ const setActivateItem = useListview((x) => x.setActivateItem);
161
177
  return /* @__PURE__ */ jsxs(DropdownMenu, { open, onOpenChange: setOpen, children: [
162
178
  /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
163
179
  MtLink,