Skip to content

Commit

Permalink
Fixing the powered by aragon bottom overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
Jør∂¡ committed Mar 13, 2024
1 parent d14484c commit bd4e996
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 89 deletions.
209 changes: 120 additions & 89 deletions components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ const Sidebar = () => {
return (
<header className="h-screen select-none">
<SidebarSwitchButton />

<div
className={`md:w-72 bg-neutral-50 md:bg-neutral-100 h-screen flex flex-col justify-between z-40 ${isOpen ? "absolute md:relative w-full" : "hidden md:block"}`}
className={
"flex flex-col justify-between h-screen md:w-72 bg-neutral-50 md:bg-neutral-100 " +
(isOpen
? "max-sm:absolute md:relative max-sm:w-full"
: "max-sm:hidden")
}
>
<div className="w-full">
<div className="w-full flex items-center pt-14 py-3 px-3 md:pt-6">
Expand All @@ -58,100 +64,125 @@ const Sidebar = () => {
Aragonette
</Link>
</div>
<ul className="mt-6 px-6">
{/* Home page */}
<li
onClick={() => setIsOpen(false)}
className={`flex w-full justify-between text-neutral-700 cursor-pointer items-center mb-2 ${isHome ? "bg-neutral-100 md:bg-neutral-200 font-semibold text-primary-500" : ""
} rounded-lg shadow-lg hover:bg-neutral-100 md:hover:bg-neutral-200`}
>
<Link href="/" className="flex items-center w-full p-3">
<Icon
className="mr-2"
icon={IconType.HOME}
size="lg"
responsiveSize={{ md: "lg" }}
/>
<MenuList isHome={isHome} setIsOpen={setIsOpen} pluginId={pluginId} />
</div>
<div className="w-full">
<PoweredByAragon />
</div>
</div>
</header>
);
};

<span
className={`block py-2 pr-4 pl-3 rounded ${isHome ? "font-semibold" : ""
} lg:p-0`}
aria-current="page"
>
Home
</span>
</Link>
</li>
const MenuList = ({
isHome,
setIsOpen,
pluginId,
}: {
isHome: boolean;
setIsOpen: (o: boolean) => any;
pluginId: string | null;
}) => {
return (
<ul className="mt-6 px-6">
{/* HOME */}
<li
onClick={() => setIsOpen(false)}
className={`flex w-full justify-between text-neutral-700 cursor-pointer items-center mb-2 ${
isHome
? "bg-neutral-100 md:bg-neutral-200 font-semibold text-primary-500"
: ""
} rounded-lg shadow-lg hover:bg-neutral-100 md:hover:bg-neutral-200`}
>
<Link href="/" className="flex items-center w-full p-3">
<Icon
className="mr-2"
icon={IconType.HOME}
size="lg"
responsiveSize={{ md: "lg" }}
/>

{/* Plugin list */}
{plugins.map((plugin, idx) => (
<li
key={idx}
onClick={() => setIsOpen(false)}
className={`flex w-full justify-between text-neutral-700 cursor-pointer items-center mb-2 ${plugin.id === pluginId
? "bg-neutral-100 md:bg-neutral-200 font-semibold text-primary-500 rounded-lg shadow-lg"
: ""
} rounded-lg shadow-lg hover:bg-neutral-100 md:hover:bg-neutral-200`}
>
<Link
href={"/plugins/" + plugin.id + "/#/"}
className="flex items-center focus:outline-none focus:ring-2 focus:ring-white w-full p-3"
>
<Icon
className="mr-2"
icon={plugin.icon}
size="md"
responsiveSize={{ md: "lg" }}
/>
<span className="block py-2 pr-4 pl-3 lg:p-0">
{plugin.title}
</span>
</Link>
</li>
))}
<span
className={`block py-2 pr-4 pl-3 rounded ${
isHome ? "font-semibold" : ""
} lg:p-0`}
aria-current="page"
>
Home
</span>
</Link>
</li>

{/* External links */}
<li
className={`flex w-full justify-between text-neutral-700 cursor-pointer items-center mb-2 rounded-lg shadow-lg hover:bg-neutral-100 md:hover:bg-neutral-200`}
>
<Link
href={PUB_DISCORD_URL}
target="_blank"
className="flex items-center w-full p-3"
>
<Icon
className="mr-2"
icon={IconType.HELP}
size="md"
responsiveSize={{ md: "lg" }}
/>
<span className="block py-2 pr-4 pl-3 lg:p-0">Discord</span>
</Link>
</li>
</ul>
</div>
<div className="px-8 cursor-pointer py-5 text-neutral-400 w-full fixed bottom-0">
{/* PLUGINS */}
{plugins.map((plugin, idx) => (
<li
key={idx}
onClick={() => setIsOpen(false)}
className={`flex w-full justify-between text-neutral-700 cursor-pointer items-center mb-2 ${
plugin.id === pluginId
? "bg-neutral-100 md:bg-neutral-200 font-semibold text-primary-500 rounded-lg shadow-lg"
: ""
} rounded-lg shadow-lg hover:bg-neutral-100 md:hover:bg-neutral-200`}
>
<Link
href="https://aragon.org"
className="flex items-center focus:outline-none focus:ring-2 focus:ring-white"
href={"/plugins/" + plugin.id + "/#/"}
className="flex items-center focus:outline-none focus:ring-2 focus:ring-white w-full p-3"
>
<span className="block py-2 pr-4 pl-3 lg:border-0 flex flex-row">
Powered by{" "}
<span className="font-semibold text-primary-400 mr-1">
&nbsp;Aragon
</span>
<Image
src="/logo.png"
width="24"
height="20"
className=""
alt="Aragonette"
/>
</span>
<Icon
className="mr-2"
icon={plugin.icon}
size="md"
responsiveSize={{ md: "lg" }}
/>
<span className="block py-2 pr-4 pl-3 lg:p-0">{plugin.title}</span>
</Link>
</div>
</div>
</header>
</li>
))}

{/* EXTERNAL LINKS */}
<li
className={`flex w-full justify-between text-neutral-700 cursor-pointer items-center mb-2 rounded-lg shadow-lg hover:bg-neutral-100 md:hover:bg-neutral-200`}
>
<Link
href={PUB_DISCORD_URL}
target="_blank"
className="flex items-center w-full p-3"
>
<Icon
className="mr-2"
icon={IconType.HELP}
size="md"
responsiveSize={{ md: "lg" }}
/>
<span className="block py-2 pr-4 pl-3 lg:p-0">Discord</span>
</Link>
</li>
</ul>
);
};

const PoweredByAragon = () => {
return (
<div className="w-full flex justify-center mb-3">
<Link
href="https://aragon.org"
className="flex items-center focus:outline-none focus:ring-2 focus:ring-white"
>
<span className="block py-2 pr-4 pl-3 lg:border-0 flex flex-row">
Powered by{" "}
<span className="font-semibold text-primary-400 mr-1">
&nbsp;Aragon
</span>
<Image
src="/logo.png"
width="24"
height="20"
className=""
alt="Aragonette"
/>
</span>
</Link>
</div>
);
};

Expand Down
1 change: 1 addition & 0 deletions plugins/dualGovernance/pages/proposal-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default function Proposals() {
<ElseIf condition={isConnected}>
<SectionView>
<CardEmptyState
className="w-full"
heading="There are no proposals yet"
humanIllustration={{
body: "VOTING",
Expand Down
1 change: 1 addition & 0 deletions plugins/tokenVoting/pages/proposal-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export default function Proposals() {
<ElseIf condition={isConnected}>
<SectionView>
<CardEmptyState
className="w-full"
heading="There are no proposals yet"
humanIllustration={{
body: "VOTING",
Expand Down

0 comments on commit bd4e996

Please sign in to comment.