Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix Mobile Menu, Light Mode Updated, Copy to Clipboard Fixed #363

Merged
merged 8 commits into from
Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: mobile menu scrolling
  • Loading branch information
kroucher committed Aug 28, 2022
commit b6d6e9103ced2923a991d0699b46ebf62f133859
10 changes: 5 additions & 5 deletions www/src/components/leftSidebar/leftSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ const langCode = getLanguageFromURL(currentPage);
const sidebar = SIDEBAR[langCode];
---

<nav aria-labelledby="grid-left">
<nav aria-labelledby="grid-left" class={currentPage === "/" ? ` py-20 h-full` : `overflow-y-scroll md:overflow-hidden h-full pb-32`}>
<div class="max-w-lg mx-auto p-3 pt-6 md:hidden">
<Search client:idle />
</div>
<ul
class="h-full p-8 max-h-[100vh] overflow-x-visible overflow-y-auto dark:text-slate-50 text-slate-800"
class="p-8 h-full overflow-x-visible overflow-y-scroll sm:overflow-auto pb-32 dark:text-slate-50 text-slate-800"
>
{
Object.entries(sidebar).map(([header, children]) => (
<li>
<div>
<h2 class="text-xl dark:text-slate-50 text-slate-800">{header}</h2>
<h2 class={currentPage === "/" ? `text-xl text-slate-50` : `text-xl dark:text-slate-50 text-slate-900`}>{header}</h2>
<ul>
{children.map((child) => {
const url = Astro.site?.pathname + child.link;
Expand All @@ -38,8 +38,8 @@ const sidebar = SIDEBAR[langCode];
class={`
${
currentPageMatch === child.link
? "hover:text-t3-purple-300 dark:hover:text-t3-purple-100 text-t3-purple-500 dark:text-t3-purple-200 font-extrabold "
: "hover:text-t3-purple-300 dark:hover:text-t3-purple-100 text-t3-purple-500 dark:text-t3-purple-200"
? "hover:text-t3-purple-300 dark:hover:text-t3-purple-100 text-t3-purple-300 dark:text-t3-purple-200 font-extrabold "
: "hover:text-t3-purple-300 dark:hover:text-t3-purple-100 text-t3-purple-300 dark:text-t3-purple-200"
}

transition-colors
Expand Down
2 changes: 1 addition & 1 deletion www/src/layouts/landingPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import "@docsearch/css";
<Navbar />
<aside
id="grid-left"
class="hidden sticky h-[100vh] bottom-0 top-20 bg-gradient-to-b via-[#300171] from-gray-900 to-slate-900 z-10"
class="hidden sticky h-[100vh] overflow-y-auto bottom-0 top-20 bg-gradient-to-b via-[#300171] from-gray-900 to-slate-900 z-10"
title="Site Navigation"
>
<LeftSidebar currentPage={currentPage} />
Expand Down
2 changes: 1 addition & 1 deletion www/src/layouts/mainLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
<body>
<Navbar />
<main
class="bg-t3-purple-50 dark:bg-slate-900 w-full justify-items-center grid grid-cols-1 md:grid-cols-3 h-full relative"
class="bg-t3-purple-50 dark:bg-slate-900 w-full justify-items-center grid grid-cols-1 md:grid-cols-3 h-full relative overflow-y-auto"
>
<aside
id="grid-left"
Expand Down
1 change: 1 addition & 0 deletions www/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
theme: {
extend: {
colors: {
"t3-purple-50": "#F3EEFF",
"t3-purple-100": "#e8ddff",
"t3-purple-200": "#c3b4fc",
"t3-purple-300": "#9e8bf9",
Expand Down