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

upgrade: Community Calandar Button #518

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/components/development-pages/calendar-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export function CalendarButton({ onClick }: CalendarButtonProps) {
return (
<button
onClick={onClick}
className="fixed bottom-6 right-6 flex items-center justify-between rounded-full bg-[#1E1E1E] px-5 py-3 text-xs text-white dark:bg-white dark:text-black md:bottom-9 md:right-9 md:text-sm lg:bottom-12 lg:right-12 "
className="flex items-center justify-between rounded-full bg-primary/5 dark:border-primary/10 px-5 py-3 text-xs text-primary font-semibold border border-primary md:text-sm "
>
<CalendarIcon className="mr-2 h-4 w-4" />
Community Calendar
</button>
);
}
}
61 changes: 61 additions & 0 deletions src/components/development-pages/calendarModal.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
import TimeZoneCalendar from "./time-zone-calendar";

const DEFAULT_CALENDAR_ID =
"c_25e5e3748e4c4ab7a55f41fbc5ebebcc0a03b40fb028785f14159bfaebea12e2@group.calendar.google.com";

const calendarUrl = `https://calendar.google.com/calendar/u/0?cid=${encodeURIComponent(DEFAULT_CALENDAR_ID)}`;
---

<h2 class="text-lg font-semibold md:text-2xl text-gray-900 dark:text-white flex justify-between">
Akash Community <br class="md:hidden" /> Groups Calendar
</h2>

<div class="mt-5 flex flex-col gap-4 rounded-md border bg-background2 p-3 md:max-h-[60vh] md:p-5">
<TimeZoneCalendar calendarId={DEFAULT_CALENDAR_ID} />
<a
href={calendarUrl}
class="flex items-center justify-center gap-3 rounded-md bg-[#FFDEDE] py-3 text-sm font-medium text-primary dark:bg-background md:text-base"
target="_blank"
rel="noopener noreferrer"
>
<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
>
<path
d="M12.5 3.33366V1.66699M12.5 3.33366V5.00033M12.5 3.33366H8.75M2.5 8.33366V15.8337C2.5 16.7542 3.24619 17.5003 4.16667 17.5003H15.8333C16.7538 17.5003 17.5 16.7542 17.5 15.8337V8.33366H2.5Z"
stroke="#FF414C"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
></path>
<path
d="M2.5 8.33301V4.99967C2.5 4.0792 3.24619 3.33301 4.16667 3.33301H5.83333"
stroke="#FF414C"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
></path>
<path
d="M5.83594 1.66699V5.00033"
stroke="#FF414C"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
></path>
<path
d="M17.4974 8.33301V4.99967C17.4974 4.0792 16.7512 3.33301 15.8307 3.33301H15.4141"
stroke="#FF414C"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
></path>
</svg>
Subscribe to SIG & WG calendar
</a>
</div>
2 changes: 2 additions & 0 deletions src/components/header/header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { DiscordIcon, GithubIcon, TwitterIcon } from "./icons";
import PopOverCommunity, { SubNavbar } from "./popovers/popover-nav-community";
import PopOverNavItemNetwork from "./popovers/popover-nav-item";
import PopOverNavItemEcosystem from "./popovers/popover-nav-item-ecosystem";
import { CalendarModal } from "../development-pages/calendar-modal";
const pathname = `/${Astro.url.pathname.split("/")[1]}`;

interface Props {
Expand Down Expand Up @@ -173,6 +174,7 @@ const latestRoadmapYear = getYearToUse();
{
visibilty.development.includes(pathname) && (
<SubNavbar pathname={Astro.url.pathname} client:load type="development" />
<div class="flex justify-end p-2"><CalendarModal client:load /></div>
)
}
{
Expand Down
3 changes: 3 additions & 0 deletions src/content/Development_Page/welcome/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import CalenderButton from "../../../components/development-pages/calenderbutton
import TimeZoneCalendar from "../../../components/development-pages/time-zone-calendar.tsx";
import Welcome from "../../../components/development-pages/Welcome.astro";
import GithubButton from "../../../components/mdx-cards/buttons/github-button.astro";
import Calendar from "../../../components/development-pages/calendarModal.astro";

<Welcome />

Expand All @@ -17,6 +18,8 @@ This is the starting point for joining and contributing to building Akash Networ

The Akash Network community welcomes contributions from all skill levels. If you’re interested in contributing, visit our [project list](https://github.com/orgs/akash-network/projects) to find a project that matches your skillset.

<Calendar />

## Community Groups

The Akash Network is supported by a diverse group of users, contributors, and supporters. We strive to improve the project and work together efficiently. We’re proud of our progress over the years. All aspects of the Akash Network - from code to culture - are managed by the community and divided into three programs.
Expand Down
2 changes: 0 additions & 2 deletions src/pages/development/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { proseClasses } from "@/lib/prose-classes";
import type { MarkdownHeading } from "astro";
import { type CollectionEntry, getCollection } from "astro:content";
import clsx from "clsx";
import { CalendarModal } from "@/components/development-pages/calendar-modal.tsx";

interface NavItem {
link: string;
Expand Down Expand Up @@ -73,7 +72,6 @@ if (akashInsidersIndex !== -1) {
<article class={proseClasses}>
<Content />
</article>
<CalendarModal client:load />
</div>
</TopMargin>
</Layout>