feat: fallback to unsplash cover when article contains no image
This commit is contained in:
@@ -21,7 +21,7 @@ const KMenuEntry = (
|
||||
: "text-gray-400"
|
||||
}`}
|
||||
>
|
||||
{entry?.icon && icons[entry.icon]({ class: "w-4 h-4 mr-1" })}
|
||||
{entry?.icon && icons[entry.icon]({ class: "min-w-4 h-4 mr-1" })}
|
||||
{entry.title}
|
||||
</div>
|
||||
);
|
||||
@@ -168,13 +168,15 @@ export const KMenu = (
|
||||
style={{ background: "#2B2930", color: "#818181" }}
|
||||
>
|
||||
<div
|
||||
class={`grid h-12 text-gray-400 ${
|
||||
activeState.value !== "loading" && "border-b"
|
||||
class={`grid min-h-12 text-gray-400 ${
|
||||
(activeState.value === "normal" || activeState.value === "input") &&
|
||||
"border-b"
|
||||
} border-gray-500 `}
|
||||
style={{
|
||||
gridTemplateColumns: activeState.value !== "loading"
|
||||
? "auto 1fr"
|
||||
: "1fr",
|
||||
gridTemplateColumns:
|
||||
(activeState.value === "normal" || activeState.value === "input")
|
||||
? "auto 1fr"
|
||||
: "1fr",
|
||||
}}
|
||||
>
|
||||
{(activeState.value === "normal" || activeState.value === "input") &&
|
||||
@@ -198,12 +200,18 @@ export const KMenu = (
|
||||
)}
|
||||
{activeState.value === "loading" && (
|
||||
<div class="py-3 px-4 flex items-center gap-2">
|
||||
<icons.IconLoader2 class="animate-spin w-4 h-4" />
|
||||
<icons.IconLoader2 class="animate-spin min-w-4 h-4" />
|
||||
{loadingText.value || "Loading..."}
|
||||
</div>
|
||||
)}
|
||||
{activeState.value === "error" && (
|
||||
<div class="py-3 px-4 flex items-center gap-2 text-red-400">
|
||||
<icons.IconAlertCircle class="min-w-4 h-4" />
|
||||
{loadingText.value || "An error occurred"}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{activeState.value === "normal" &&
|
||||
{(activeState.value === "normal" || activeState.value === "input") &&
|
||||
(
|
||||
<div
|
||||
class=""
|
||||
|
||||
Reference in New Issue
Block a user