Lighten Home navigation icon strokes
This commit is contained in:
@@ -108,6 +108,15 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
.material-symbols-outlined.home-rail-icon {
|
||||
font-weight: 300;
|
||||
font-variation-settings: 'FILL' 0;
|
||||
}
|
||||
|
||||
.nav-item[aria-current="page"] .home-rail-icon {
|
||||
font-weight: 360;
|
||||
}
|
||||
|
||||
.material-symbols-outlined, .material-symbols-rounded, .material-symbols-sharp, .material-icons {
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
|
||||
@@ -14,26 +14,26 @@ export function HomeDesign() {
|
||||
|
||||
<nav aria-label="Primary navigation" className="flex flex-col items-center xl:items-stretch gap-gutter-xs">
|
||||
<button type="button" data-nav="home" aria-current="page" className="nav-switch nav-item inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-title text-title-lg transition-colors duration-state-change text-left">
|
||||
<span className="nav-icon material-symbols-outlined text-headline-lg" style={{ fontVariationSettings: "'FILL' 1" }} aria-hidden="true">home</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">home</span>
|
||||
<span className="hidden xl:inline">Home</span>
|
||||
</button>
|
||||
<a href="#explore" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change">
|
||||
<span className="material-symbols-outlined text-headline-lg" aria-hidden="true">search</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">search</span>
|
||||
<span className="hidden xl:inline">Explore</span>
|
||||
</a>
|
||||
<a href="#notifications" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change">
|
||||
<span className="relative inline-flex">
|
||||
<span className="material-symbols-outlined text-headline-lg" aria-hidden="true">notifications</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">notifications</span>
|
||||
<span className="absolute -top-1 -right-1 inline-flex items-center justify-center w-4 h-4 rounded-full bg-light-tertiary text-light-on-tertiary font-label text-label-sm">2</span>
|
||||
</span>
|
||||
<span className="hidden xl:inline">Notifications</span>
|
||||
</a>
|
||||
<a href="#follow" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change">
|
||||
<span className="material-symbols-outlined text-headline-lg" aria-hidden="true">person_add</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">person_add</span>
|
||||
<span className="hidden xl:inline">Follow</span>
|
||||
</a>
|
||||
<a href="#chat" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change">
|
||||
<span className="material-symbols-outlined text-headline-lg" aria-hidden="true">mail</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">mail</span>
|
||||
<span className="hidden xl:inline">Chat</span>
|
||||
</a>
|
||||
<a href="#grok" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change">
|
||||
@@ -41,30 +41,30 @@ export function HomeDesign() {
|
||||
<span className="hidden xl:inline">Grok</span>
|
||||
</a>
|
||||
<a href="#bookmarks" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change">
|
||||
<span className="material-symbols-outlined text-headline-lg" aria-hidden="true">bookmark_border</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">bookmark_border</span>
|
||||
<span className="hidden xl:inline">Bookmarks</span>
|
||||
</a>
|
||||
<a href="#creator-studio" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change">
|
||||
<span className="material-symbols-outlined text-headline-lg" aria-hidden="true">science</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">science</span>
|
||||
<span className="hidden xl:inline">Creator Studio</span>
|
||||
</a>
|
||||
<a href="#premium" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change">
|
||||
<span className="material-symbols-outlined text-headline-lg" aria-hidden="true">verified</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">verified</span>
|
||||
<span className="hidden xl:inline">Premium</span>
|
||||
</a>
|
||||
<button type="button" data-nav="profile" className="nav-switch nav-item inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change text-left">
|
||||
<span className="nav-icon material-symbols-outlined text-headline-lg" aria-hidden="true">person_outline</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">person_outline</span>
|
||||
<span className="hidden xl:inline">Profile</span>
|
||||
</button>
|
||||
<button type="button" className="inline-flex items-center justify-center xl:justify-start gap-gutter-lg p-2.5 xl:px-gutter-md xl:py-2.5 rounded-full hover:bg-light-surface-container text-light-on-surface font-body text-title-lg transition-colors duration-state-change text-left">
|
||||
<span className="material-symbols-outlined text-headline-lg" aria-hidden="true">pending</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-lg" aria-hidden="true">pending</span>
|
||||
<span className="hidden xl:inline">More</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div className="pt-gutter-md xl:pr-gutter-md">
|
||||
<button type="button" aria-label="Post" className="w-11 h-11 xl:w-full xl:h-auto xl:py-3 xl:px-gutter-xl rounded-full bg-light-primary text-light-on-primary font-label text-label-lg hover:opacity-90 transition-opacity duration-state-change inline-flex items-center justify-center">
|
||||
<span className="material-symbols-outlined text-headline-md xl:hidden" aria-hidden="true">edit</span>
|
||||
<span className="material-symbols-outlined home-rail-icon text-headline-md xl:hidden" aria-hidden="true">edit</span>
|
||||
<span className="hidden xl:inline">Post</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -78,7 +78,7 @@ export function HomeDesign() {
|
||||
<span className="font-body text-body-sm text-light-on-surface-variant truncate">@you_dian_ai</span>
|
||||
</div>
|
||||
</div>
|
||||
<span className="hidden xl:inline material-symbols-outlined text-title-lg text-light-on-surface-variant shrink-0" aria-hidden="true">more_horiz</span>
|
||||
<span className="hidden xl:inline material-symbols-outlined home-rail-icon text-title-lg text-light-on-surface-variant shrink-0" aria-hidden="true">more_horiz</span>
|
||||
</button>
|
||||
</aside>
|
||||
|
||||
|
||||
@@ -36,11 +36,6 @@ export function HomeInteractions() {
|
||||
else item.removeAttribute("aria-current");
|
||||
item.classList.toggle("font-title", active);
|
||||
item.classList.toggle("font-body", !active);
|
||||
const icon = item.querySelector<HTMLElement>(".nav-icon");
|
||||
if (icon) {
|
||||
icon.textContent = item.dataset.nav === "home" ? "home" : active ? "person" : "person_outline";
|
||||
icon.style.fontVariationSettings = active ? "'FILL' 1" : "'FILL' 0";
|
||||
}
|
||||
});
|
||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user