From 466c4eb51d10b1efc0d4639dc144f11addcfe5c9 Mon Sep 17 00:00:00 2001
From: log101
Date: Sun, 28 Jul 2024 21:54:37 +0300
Subject: [PATCH] style: mobile styling
---
src/lib/domUtils.ts | 3 ++-
src/pages/[id].astro | 3 ---
src/pages/index.astro | 27 +++++++++++++++------------
3 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/src/lib/domUtils.ts b/src/lib/domUtils.ts
index eca0596..5aec002 100644
--- a/src/lib/domUtils.ts
+++ b/src/lib/domUtils.ts
@@ -30,9 +30,10 @@ function addClasses(elemId: string, ...inputs: string[]) {
else console.error("Element could not be found!")
}
-function removeElement(elemId: string) {
+function removeElement(elemId: string, silent = false) {
const elem = document.getElementById(elemId)
if (elem) elem.remove()
+ else if (silent) return
else console.error("Element could not be found!")
}
diff --git a/src/pages/[id].astro b/src/pages/[id].astro
index 4ed5e3f..0fd9988 100644
--- a/src/pages/[id].astro
+++ b/src/pages/[id].astro
@@ -15,7 +15,6 @@ import {
CardTitle,
} from "@/components/ui/card"
import { CalendarIcon } from "@radix-ui/react-icons"
-import { Separator } from "@/components/ui/separator"
import type { ContentTable } from "@/lib/db"
// Dayjs
@@ -51,8 +50,6 @@ const dateFromNow = dayjs.utc(data?.created_at).from(dayjs.utc())
-
-
{data?.author}
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 436b4d9..dfd955f 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -11,7 +11,7 @@ import { Loader2 } from "lucide-react"