mirror of
https://github.com/anotherhadi/blog.git
synced 2026-05-20 13:32:33 +02:00
remove dead code and unify patterns
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import { ArrowUp } from "lucide-astro";
|
||||
import { ArrowUp } from "@lucide/astro";
|
||||
---
|
||||
|
||||
<button
|
||||
|
||||
@@ -2,21 +2,13 @@
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
import TagBadge from "./TagBadge.astro";
|
||||
import { Image } from "astro:assets";
|
||||
import { formatDate } from "../utils/notes";
|
||||
|
||||
interface Props {
|
||||
post: CollectionEntry<"blog">;
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
|
||||
function formatDate(date: Date) {
|
||||
const options: Intl.DateTimeFormatOptions = {
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
};
|
||||
return date.toLocaleDateString("en-US", options);
|
||||
}
|
||||
---
|
||||
|
||||
<article
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
import { ArrowRight, FolderCode, Key, Rss } from "@lucide/astro";
|
||||
import { Image } from "astro:assets";
|
||||
import type { SocialLinks } from "../config";
|
||||
|
||||
interface Props {
|
||||
name: string;
|
||||
@@ -8,19 +9,7 @@ interface Props {
|
||||
description: string;
|
||||
avatar: any;
|
||||
location?: string;
|
||||
socialLinks?: {
|
||||
github?: string;
|
||||
gitlab?: string;
|
||||
gitea?: string;
|
||||
linkedin?: string;
|
||||
twitter?: string;
|
||||
bluesky?: string;
|
||||
instagram?: string;
|
||||
youTube?: string;
|
||||
medium?: string;
|
||||
kofi?: string;
|
||||
codetips?: string;
|
||||
};
|
||||
socialLinks?: SocialLinks;
|
||||
gpgKey?: string;
|
||||
rssFeed?: string;
|
||||
}
|
||||
@@ -205,10 +194,10 @@ const {
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
{socialLinks.youTube && (
|
||||
{socialLinks.youtube && (
|
||||
<div class="tooltip" data-tip="Youtube">
|
||||
<a
|
||||
href={socialLinks.youTube}
|
||||
href={socialLinks.youtube}
|
||||
class="btn btn-circle btn-ghost"
|
||||
aria-label="YouTube"
|
||||
target="_blank"
|
||||
|
||||
@@ -110,8 +110,6 @@ function isActive(href: string) {
|
||||
if (!btn || !menu) return;
|
||||
const lines = btn.querySelectorAll<HTMLElement>(".hamburger-line");
|
||||
let open = false;
|
||||
|
||||
open = false;
|
||||
menu.style.display = "none";
|
||||
lines[0].style.transform = "";
|
||||
lines[1].style.opacity = "";
|
||||
|
||||
Reference in New Issue
Block a user