Button changes
This commit is contained in:
BIN
public/fonts/IndieFlower.woff
Normal file
BIN
public/fonts/IndieFlower.woff
Normal file
Binary file not shown.
BIN
public/fonts/IndieFlower.woff2
Normal file
BIN
public/fonts/IndieFlower.woff2
Normal file
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
import { useComputed, useSignal } from "@preact/signals";
|
import { useComputed, useSignal } from "@preact/signals";
|
||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { navigationItems } from '../config/data';
|
import { navigationItems } from "../config/data";
|
||||||
import type { LucideIcon } from '../types';
|
import type { LucideIcon } from "../types";
|
||||||
|
|
||||||
interface NavigationBarProps {
|
interface NavigationBarProps {
|
||||||
currentPath: string;
|
currentPath: string;
|
||||||
@@ -20,7 +20,9 @@ export default function NavigationBar({ currentPath }: NavigationBarProps) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Filter out disabled navigation items
|
// Filter out disabled navigation items
|
||||||
const enabledNavigationItems = navigationItems.filter(item => item.enabled !== false);
|
const enabledNavigationItems = navigationItems.filter(
|
||||||
|
(item) => item.enabled !== false,
|
||||||
|
);
|
||||||
|
|
||||||
// Update client path when location changes
|
// Update client path when location changes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -92,23 +94,23 @@ export default function NavigationBar({ currentPath }: NavigationBarProps) {
|
|||||||
} ${isVisible.value ? "translate-y-0" : "translate-y-20"}`}
|
} ${isVisible.value ? "translate-y-0" : "translate-y-20"}`}
|
||||||
>
|
>
|
||||||
<div class="overflow-visible">
|
<div class="overflow-visible">
|
||||||
<ul class="menu menu-horizontal bg-base-200 rounded-box p-1.5 sm:p-2 shadow-lg flex flex-nowrap whitespace-nowrap">
|
<ul class="menu menu-horizontal bg-base-200 rounded-box p-1.5 sm:p-2 flex flex-nowrap whitespace-nowrap">
|
||||||
{enabledNavigationItems.map((item) => {
|
{enabledNavigationItems.map((item) => {
|
||||||
const Icon = item.icon as LucideIcon;
|
const Icon = item.icon as LucideIcon;
|
||||||
const isActive = item.isActive
|
const isActive = item.isActive
|
||||||
? item.isActive(normalizedPath)
|
? item.isActive(normalizedPath)
|
||||||
: normalizedPath === item.path;
|
: normalizedPath === item.path;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li key={item.id} class="mx-0.5 sm:mx-1">
|
<li key={item.id} class="mx-0.5 sm:mx-1">
|
||||||
<a
|
<a
|
||||||
href={item.path}
|
href={item.path}
|
||||||
class={`tooltip tooltip-top min-h-[44px] min-w-[44px] inline-flex items-center justify-center ${isActive ? "menu-active" : ""}`}
|
class={`tooltip tooltip-top min-h-[44px] min-w-[44px] inline-flex items-center justify-center ${isActive ? "menu-active" : ""}`}
|
||||||
aria-label={item.tooltip}
|
aria-label={item.tooltip}
|
||||||
data-tip={item.tooltip}
|
data-tip={item.tooltip}
|
||||||
>
|
>
|
||||||
<Icon size={18} class="sm:w-5 sm:h-5" />
|
<Icon size={18} class="sm:w-5 sm:h-5" />
|
||||||
<span class="sr-only">{item.name}</span>
|
<span class="sr-only">{item.name}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
@@ -13,19 +13,19 @@ const { slug } = post;
|
|||||||
<div
|
<div
|
||||||
class="card bg-accent shadow-lg w-full sm:w-[calc(50%-1rem)] md:w-96 min-w-[280px] max-w-sm shrink"
|
class="card bg-accent shadow-lg w-full sm:w-[calc(50%-1rem)] md:w-96 min-w-[280px] max-w-sm shrink"
|
||||||
>
|
>
|
||||||
<div class="card-body p-3 break-words">
|
<div class="card-body p-6 break-words">
|
||||||
<h2
|
<h2
|
||||||
class="card-title text-base-100 justify-center text-center break-words font-bold text-lg mb-2"
|
class="card-title text-xl md:text-2xl font-bold justify-center text-center break-words text-base-100"
|
||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p class="text-center text-base-100 break-words mb-3 text-base">
|
<p class="text-center break-words my-4 text-base-100">
|
||||||
{blurb || "No description available."}
|
{blurb || "No description available."}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex flex-wrap items-center justify-center text-base-100 opacity-75 gap-2 text-sm mb-2"
|
class="flex flex-wrap items-center justify-center text-base-100 opacity-75 gap-2 text-sm mb-4"
|
||||||
>
|
>
|
||||||
<Icon name="mdi:clock" class="text-xl" />
|
<Icon name="mdi:clock" class="text-xl" />
|
||||||
<span>
|
<span>
|
||||||
@@ -41,7 +41,7 @@ const { slug } = post;
|
|||||||
|
|
||||||
{
|
{
|
||||||
post.data.tags && post.data.tags.length > 0 && (
|
post.data.tags && post.data.tags.length > 0 && (
|
||||||
<div class="flex gap-2 flex-wrap mb-2 justify-center">
|
<div class="flex gap-2 flex-wrap mb-4 justify-center">
|
||||||
{post.data.tags.map((tag: string) => (
|
{post.data.tags.map((tag: string) => (
|
||||||
<div class="badge badge-primary">
|
<div class="badge badge-primary">
|
||||||
<Icon name="mdi:tag" class="text-lg" />
|
<Icon name="mdi:tag" class="text-lg" />
|
||||||
@@ -52,10 +52,10 @@ const { slug } = post;
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="card-actions justify-end mt-2">
|
<div class="card-actions justify-end mt-4">
|
||||||
<a
|
<a
|
||||||
href={`/post/${slug}`}
|
href={`/post/${slug}`}
|
||||||
class="btn btn-circle btn-sm bg-base-100 hover:bg-base-200 text-accent"
|
class="btn btn-sm bg-base-100 hover:bg-secondary text-accent"
|
||||||
aria-label={`Read more about ${title}`}
|
aria-label={`Read more about ${title}`}
|
||||||
>
|
>
|
||||||
<Icon name="mdi:arrow-right" class="text-lg" />
|
<Icon name="mdi:arrow-right" class="text-lg" />
|
||||||
|
@@ -28,7 +28,7 @@ const { project } = Astro.props;
|
|||||||
href={project.link}
|
href={project.link}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="btn btn-circle btn-sm bg-base-100 hover:bg-base-200 text-accent"
|
class="btn btn-sm bg-base-100 hover:bg-secondary text-accent"
|
||||||
aria-label={`Visit ${project.name}`}
|
aria-label={`Visit ${project.name}`}
|
||||||
>
|
>
|
||||||
<Icon name="mdi:link" class="text-lg" />
|
<Icon name="mdi:link" class="text-lg" />
|
||||||
|
@@ -162,7 +162,7 @@ export default function ResumeSettingsModal({
|
|||||||
{/* Floating Settings Button */}
|
{/* Floating Settings Button */}
|
||||||
<button
|
<button
|
||||||
onClick={openModal}
|
onClick={openModal}
|
||||||
class={`fixed top-4 right-4 z-20 btn btn-circle btn-secondary hover:bg-primary shadow-lg opacity-100 translate-y-0 min-h-[44px] min-w-[44px] ${className}`}
|
class={`fixed top-4 right-4 z-20 btn btn-square btn-secondary hover:bg-primary opacity-100 translate-y-0 min-h-[44px] min-w-[44px] ${className}`}
|
||||||
aria-label="Resume Settings"
|
aria-label="Resume Settings"
|
||||||
>
|
>
|
||||||
<Settings class="text-lg" />
|
<Settings class="text-lg" />
|
||||||
@@ -207,7 +207,7 @@ export default function ResumeSettingsModal({
|
|||||||
role="tab"
|
role="tab"
|
||||||
class={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${
|
class={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${
|
||||||
activeTab === "upload"
|
activeTab === "upload"
|
||||||
? "bg-primary text-primary-content shadow-sm"
|
? "bg-primary text-primary-content"
|
||||||
: "text-base-content/70 hover:text-base-content hover:bg-base-200"
|
: "text-base-content/70 hover:text-base-content hover:bg-base-200"
|
||||||
}`}
|
}`}
|
||||||
onClick={() => setActiveTab("upload")}
|
onClick={() => setActiveTab("upload")}
|
||||||
@@ -218,7 +218,7 @@ export default function ResumeSettingsModal({
|
|||||||
role="tab"
|
role="tab"
|
||||||
class={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${
|
class={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${
|
||||||
activeTab === "edit"
|
activeTab === "edit"
|
||||||
? "bg-primary text-primary-content shadow-sm"
|
? "bg-primary text-primary-content"
|
||||||
: "text-base-content/70 hover:text-base-content hover:bg-base-200"
|
: "text-base-content/70 hover:text-base-content hover:bg-base-200"
|
||||||
}`}
|
}`}
|
||||||
onClick={() => setActiveTab("edit")}
|
onClick={() => setActiveTab("edit")}
|
||||||
|
@@ -31,7 +31,7 @@ export default function ScrollUpButton() {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={scrollToTop}
|
onClick={scrollToTop}
|
||||||
class={`fixed bottom-20 right-4 z-20 bg-secondary hover:bg-primary
|
class={`fixed bottom-20 right-4 z-20 bg-secondary hover:bg-primary
|
||||||
p-3 rounded-full shadow-lg transition-all duration-300 min-h-[44px] min-w-[44px] inline-flex items-center justify-center
|
p-3 rounded-full transition-all duration-300 min-h-[44px] min-w-[44px] inline-flex items-center justify-center
|
||||||
${
|
${
|
||||||
isVisible.value
|
isVisible.value
|
||||||
? "opacity-100 translate-y-0"
|
? "opacity-100 translate-y-0"
|
||||||
|
@@ -34,4 +34,14 @@
|
|||||||
--border: 1px;
|
--border: 1px;
|
||||||
--depth: 1;
|
--depth: 1;
|
||||||
--noise: 1;
|
--noise: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Indie Flower";
|
||||||
|
src:
|
||||||
|
url("IndieFlower.woff2") format("woff2"),
|
||||||
|
url("IndieFlower.woff") format("woff");
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user