Skip to content

Commit

Permalink
Minor styling updates; add aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-collinsworth committed Dec 12, 2024
1 parent 3d46677 commit 73dc575
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion _components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function SidebarTopNav(
return (
<li class="mx-2">
<a
class={`relative block py-1.5 px-1.5 text-base text-foreground-primary leading-snug rounded ring-1 ring-transparent hover:ring-background-tertiary hover:bg-background-secondary transition-colors duration-200 ease-in-out select-none current:text-blue-500 current:bg-background-tertiary ${
class={`relative block py-1.5 px-1.5 text-base text-foreground-primary leading-snug rounded ring-1 ring-transparent hover:ring-background-tertiary hover:bg-background-secondary transition-colors duration-200 ease-in-out select-none current:bg-background-tertiary ${
isCurrentlyActivePath ? "font-semibold" : "font-normal"
}`}
href={props.url}
Expand Down
4 changes: 3 additions & 1 deletion _components/ToTop.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export default function ToTop() {
return (
<a href="#" className="totop">
Back to top
<span className="sr-only">
Back to top
</span>
</a>
);
}
2 changes: 1 addition & 1 deletion _includes/raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function Raw(props: Lume.Data, helpers: Lume.Helpers) {
id="sidebar"
data-open="false"
>
<div class="p-4 shadow-sm flex justify-between h-16">
<div class="p-4 flex justify-between h-16">
<a class="flex items-center gap-3 mr-6" href="/">
<img
src="/img/logo.svg"
Expand Down
4 changes: 3 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
"tailwindcss": "npm:tailwindcss@^3.4.9"
},
"tasks": {
"build": "deno run -A lume.ts",
"serve": "deno run -A lume.ts -s",
"start": "deno task serve",
"dev": "deno task serve",
"build": "deno run -A lume.ts",
"debug": "deno task build && deno task prod",
"prod": "cd _site && deno run --allow-read --allow-env --allow-net server.ts",
"reference": "cd reference_gen && deno task types && deno task doc",
Expand Down
18 changes: 5 additions & 13 deletions overrides.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This file exists to provide CSS overrides to styles that exist on the pages
/* This file exists to provide CSS overrides to styles that exist on the pages
that are generated by deno_doc, the tool that powers the API reference documentation */

#content > main > section + div {
Expand Down Expand Up @@ -118,24 +118,15 @@ that are generated by deno_doc, the tool that powers the API reference documenta

.totop {
@apply block fixed p-3 bg-background-secondary rounded-md border
border-background-tertiary text-[0px];
color: transparent;
bottom: 1rem;
right: 1rem;
border-background-tertiary bottom-4 right-4 text-transparent;
animation-name: showToTop;
animation-duration: 1ms;
animation-timeline: --showScrollTop;
}

.totop::after {
@apply block w-4 h-4 border-2 border-primary border-l-0 border-t-0;
content: "";
display: block;
width: 1rem;
height: 1rem;
border-width: 2px;
border-color: hsla(var(--primary));
border-left: 0;
border-top: 0;
transform: translate(0, 25%) rotate(225deg);
}

Expand All @@ -147,9 +138,10 @@ html {
@keyframes showToTop {
0% {
opacity: 0;
transform: translateY(300%);
}

10% {
opacity: 1;
transform: translateY(0%);
}
}

0 comments on commit 73dc575

Please sign in to comment.