Skip to content

Commit

Permalink
Merge pull request #387 from HoomanDgtl/main
Browse files Browse the repository at this point in the history
feat: new font, feel & illustrations updated..
  • Loading branch information
HoomanDgtl authored Oct 9, 2024
2 parents 62907c0 + 61b0174 commit e30c9f1
Show file tree
Hide file tree
Showing 136 changed files with 572 additions and 7,917 deletions.
4 changes: 2 additions & 2 deletions src/components/CTA.astro
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ if (pathname.startsWith("/ecosystem/providers")) {
? "hidden"
: ""
}
mt-10 flex flex-col items-center justify-around bg-[#F4F1EF] px-[30px] py-[80px] text-center dark:bg-background2 md:mt-16 lg:py-[160px]`}
mt-10 flex flex-col items-center justify-around bg-white border-y px-[30px] py-[80px] text-center dark:bg-background2 md:mt-16 lg:py-[160px]`}
>
<p
class="max-w-[1000px] text-[20px] font-medium text-foreground md:text-3xl md:leading-snug lg:text-[48px]"
class="font-instrument max-w-[1000px] text-3xl text-foreground md:text-5xl md:leading-snug xl:text-6xl 2xl:text-[80px]"
>
{title}
</p>
Expand Down
1 change: 0 additions & 1 deletion src/components/about-pages/mobile-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Disclosure, Transition } from "@headlessui/react";
import { ChevronDownIcon } from "lucide-react";
import { XMarkIcon } from "../header/icons";
import { useLockBody } from "../use-lock-body";

Expand Down
4 changes: 2 additions & 2 deletions src/components/about-pages/mobile-table-of-contents.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Menu, Transition } from "@headlessui/react";
import { CheckIcon, ChevronDownIcon } from "@heroicons/react/20/solid";
import { Fragment, useEffect, useState } from "react";
import { ChevronDownIcon } from "@heroicons/react/20/solid";
import { Fragment, useState } from "react";
import type { TocItem } from "../../lib/generateToc";

interface Props {
Expand Down
4 changes: 1 addition & 3 deletions src/components/about-pages/nav-config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Define an array named 'nav' that represents a navigation menu.
export const nav: any = [
// Create an item for 'Product Strategy' with sub-items.
{
label: "General Information", // Label for the main menu item.
label: "General Information",
link: "/about/general-information/",
enabled: true,
},
Expand Down
24 changes: 6 additions & 18 deletions src/components/base-head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,16 @@ const { title, description, image = "/meta-images/home.png" } = Astro.props;
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} />
<!-- Font preloads -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="preload"
href="/fonts/Satoshi-Variable.ttf"
as="font"
type="font/ttf"
crossorigin
href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap"
rel="stylesheet"
/>
<link
rel="preload"
href="/fonts/Satoshi-Variable.woff"
as="font"
type="font/woff"
crossorigin
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
rel="stylesheet"
/>
<link
rel="preload"
href="/fonts/Satoshi-Variable.woff2"
as="font"
type="font/woff2"
crossorigin
/>

<!-- Canonical URL -->
<link rel="canonical" href={canonicalURL} />

Expand Down
8 changes: 4 additions & 4 deletions src/components/blog/search-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default function SearchDialog() {
</button>

<Transition appear show={isOpen} as={Fragment}>
<Dialog as="div" className="relative z-10" onClose={closeModal}>
<Dialog as="div" className="relative " onClose={closeModal}>
<Transition.Child
as={Fragment}
enter="ease-out duration-300"
Expand All @@ -129,10 +129,10 @@ export default function SearchDialog() {
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<div className="fixed inset-0 bg-slate-900/25 opacity-100 backdrop-blur transition-opacity" />
<div className="fixed inset-0 z-[50] bg-slate-900/25 opacity-100 backdrop-blur transition-opacity" />
</Transition.Child>

<div className="fixed inset-0 overflow-y-hidden">
<div className="fixed inset-0 z-[51] overflow-y-hidden">
<div className="mt-10 flex min-h-full items-start justify-center p-4 text-center md:mt-[96px]">
<Transition.Child
as={Fragment}
Expand All @@ -143,7 +143,7 @@ export default function SearchDialog() {
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
<Dialog.Panel className="w-full max-w-2xl transform overflow-hidden rounded-lg p-6 text-left align-middle transition-all ">
<Dialog.Panel className=" w-full max-w-2xl transform overflow-hidden rounded-lg p-6 text-left align-middle transition-all ">
<div className="relative">
<input
className="block w-full rounded-lg border bg-background2 py-3 pl-4 pr-12 text-base text-textGray placeholder:text-para focus:outline-none sm:text-sm sm:leading-6"
Expand Down
26 changes: 15 additions & 11 deletions src/components/cards/post-card.astro
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
import { Image } from "astro:assets";
import FormattedDate from "@/components/formatted-date.astro";
import { Image } from "astro:assets";
interface BannerImage {
src: string;
width: number;
height: number;
format: "png" | "jpg" | "jpeg" | "tiff" | "webp" | "gif" | "svg";
}
interface Props {
image: BannerImage;
image: any;
title: string;
contributor: string;
tag: string;
Expand All @@ -30,41 +31,44 @@ const {
} = Astro.props;
---

<!-- hover:-translate-y-2 -->{
{
type === "compact" ? (
<div class=" group flex flex-col transition-transform duration-100 ease-in hover:transform">
<div class=" group flex flex-col duration-100 ease-in ">
<div class="aspect-video overflow-hidden rounded-lg">
<Image
src={image}
alt={`banner image for the post ${title}`}
width={1200}
height={1200}
format="webp"
class=" h-full w-full bg-gray-100 object-cover shadow-sm transition-all duration-500 ease-in-out group-hover:scale-105"
class=" h-full w-full bg-gray-100 object-cover shadow-sm transition-all duration-500 ease-in-out group-hover:scale-105"
loading="lazy"
/>
</div>

<div class="mt-4">
<div class="flex items-center gap-x-4">
<p class=" text-2xs font-medium md:text-sm">By {contributor}</p>
<p class=" text-2xs font-medium text-linkText md:text-sm">
By {contributor}
</p>

<span class="inline-flex items-center rounded-full bg-badgeColor px-3 py-1.5 text-xs font-medium text-iconText">
{" "}
{tag}
</span>
</div>

<h3 class="mt-2 line-clamp-2 text-base font-bold leading-[24px] md:mt-4 md:text-xl md:leading-[28px]">
<h3 class="mt-2 line-clamp-2 text-base font-semibold md:mt-4 md:text-xl ">
{title}
</h3>

<p class="mt-3 line-clamp-2 text-sm font-medium md:mt-6 md:text-base">
<p class="mt-3 line-clamp-2 text-sm text-linkText md:mt-6 md:text-base">
{description}
</p>

<div class="mt-4 flex items-center gap-x-1.5">
<p class="text-2xs font-medium md:text-sm">5 Min. Read</p>
<div class="mt-4 flex items-center gap-x-2 text-linkText">
<p class="text-2xs font-medium md:text-sm ">5 Min. Read</p>
<div class="size-1 rounded-full bg-linkText" />
<p class=" text-2xs font-medium md:text-sm">
<FormattedDate date={pubDate} />
</p>
Expand Down Expand Up @@ -98,7 +102,7 @@ const {
</div>

<div class="mt-4">
<h2 class=" text-lg font-bold md:mb-6 lg:text-3xl xl:text-2lg">
<h2 class=" text-lg font-semibold md:mb-6 lg:text-3xl xl:text-2lg">
{title}
</h2>

Expand Down
8 changes: 4 additions & 4 deletions src/components/community-pages/card.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { Image } from "astro:assets";
import FormattedDate from "../formatted-date.astro";
import type { CollectionEntry } from "astro:content";
import FormattedDate from "../formatted-date.astro";
type Project = CollectionEntry<"Community_Contributions_Page">;
interface Props {
contribution: Project;
Expand Down Expand Up @@ -43,18 +43,18 @@ const { contribution } = Astro.props;
</span>{" "}
</div>
<h4
class="mt-1 line-clamp-2 text-base font-bold leading-normal text-foreground"
class="mt-1 line-clamp-2 text-base font-semibold leading-normal text-foreground"
>
{contribution.data.title}
</h4>

<p
class="mt-4 line-clamp-2 text-xs font-medium leading-[18px] text-cardGray md:mt-6 md:text-sm"
class="mt-4 line-clamp-2 text-xs font-medium leading-[18px] text-linkText md:mt-6 md:text-sm"
>
{contribution.data.description}{" "}
</p>

<p class="mt-4 text-2xs font-normal text-cardGray md:mt-6">
<p class="mt-4 text-2xs font-normal text-linkText md:mt-6">
<FormattedDate date={contribution.data.pubDate} />{" "}
</p>
</div>
Expand Down
98 changes: 98 additions & 0 deletions src/components/community-pages/community-wrapper.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
import Card from "@/components/community-pages/card.astro";
import SearchDialog from "@/components/community-pages/search-dialog";
import Pagination from "@/components/pagination.astro";
import Tag from "@/components/ui/tag2.astro";
import { proseClasses } from "@/lib/prose-classes";
import TopMargin from "../ui/top-margin.astro";
import { type CollectionEntry } from "astro:content";
type Project = CollectionEntry<"Community_Contributions_Page">;
type Props = {
tags: string[];
page: any;
};
const { tags, page } = Astro.props;
const astroUrl = Astro.url;
const communityPage = await Astro.glob(
"../../content/Community_Page/_community-contributions/*.mdx",
);
const PageContent = communityPage[0].Content;
const pageFrontMatter = communityPage[0].frontmatter;
---

<TopMargin class="container mt-10 md:mt-[60px] lg:mt-20">
<div>
<div>
<div class="mt-10 md:mt-0">
<h1 id="overview" class="text-3xl md:text-4xl lg:text-5xl">
{pageFrontMatter.title}
</h1>
</div>

<div class="md:-mt-10">
<article class={proseClasses}>
<PageContent />
</article>
</div>

<div class="mt-[72px] flex items-center justify-between">
<h3 class="text-xl font-semibold md:text-2xl lg:text-3xl">
Community Contributions
</h3>
</div>
<div
class="not-prose mt-6 flex flex-col justify-between gap-x-6 gap-y-4 md:mt-8 md:gap-y-5 lg:flex-row lg:border-b lg:pb-[20px]"
>
<div
class="flex items-center gap-x-4 border-b pb-4 md:pb-5 lg:border-0 lg:pb-0"
>
<Tag
active={astroUrl.pathname.split("/")[3] === ""}
href={`/community/community-contributions/`}
>
All
</Tag>

{
tags.map((tag: string) => (
<Tag
active={
astroUrl.pathname
.split("/")[3]
.split("%20")
.join(" ")
.toLowerCase() === tag.toLowerCase()
}
href={`/community/community-contributions/${tag.toLowerCase()}/latest/1`}
>
{tag.charAt(0).toUpperCase() + tag.slice(1)}
</Tag>
))
}
</div>

<div class="flex items-center justify-end lg:justify-between">
<SearchDialog client:load currentPath={astroUrl.pathname} />
</div>
</div>
</div>

<div>
<div
class="mt-[42px] grid grid-cols-1 gap-y-8 md:grid-cols-2 md:gap-x-6 lg:grid-cols-3 2xl:grid-cols-4"
>
{
page.data.map((contribution: Project, i: number) => {
return <Card contribution={contribution} />;
})
}
</div>

<Pagination page={page} />
</div>
</div>
</TopMargin>
1 change: 0 additions & 1 deletion src/components/community-pages/edu-card.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import { Image } from "astro:assets";
import FormattedDate from "../formatted-date.astro";
import type { CollectionEntry } from "astro:content";
type Project = CollectionEntry<"Community_Akash_Edu_Page">;
interface Props {
Expand Down
6 changes: 3 additions & 3 deletions src/components/community-pages/event-card.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ const { card } = Astro.props;
</div>

<h4
class="mt-3 line-clamp-1 text-sm font-bold leading-normal text-foreground md:text-base lg:text-lg"
class="mt-3 line-clamp-1 text-sm font-semibold leading-normal text-foreground md:text-base lg:text-lg"
>
{card.title}
</h4>

<p
class="mt-6 line-clamp-3 text-xs font-medium leading-[24px] text-para md:mt-6 md:text-sm"
class="mt-6 line-clamp-3 text-xs font-medium leading-[24px] text-linkText md:mt-6 md:text-sm"
>
{card.description}{" "}
</p>
Expand All @@ -58,7 +58,7 @@ const { card } = Astro.props;
className="mt-10"
>
<ArrowUpCircle className="w-4 rotate-45 text-para" />
Read More
Read More
</ButtonLink>
</div>
</div>
15 changes: 3 additions & 12 deletions src/components/community-pages/how-to-contribute-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import React from "react";
import ReactMarkdown from "react-markdown";

import { proseClasses } from "@/lib/prose-classes";
import {
Accordion,
AccordionContent,
Expand All @@ -16,20 +12,15 @@ export function HowToContributeDropdown({
heading: string;
children: any;
}) {
const [value, setValue] = React.useState("");

return (
<Accordion type="single" collapsible className="w-full">
<AccordionItem
value={`item`}
className="border-b border-[#E6E8EB] py-3 "
className="border-b border-defaultBorder py-3 "
>
<AccordionTrigger
className="not-prose flex cursor-pointer no-underline "
plus
>
<AccordionTrigger className="not-prose flex cursor-pointer no-underline ">
<span className="flex h-full w-full">
<p className=" text-start text-base font-bold leading-[32px] text-foreground md:text-xl md:leading-[40px] lg:text-2xl">
<p className=" text-start text-base font-semibold text-foreground md:text-xl lg:text-2xl">
{heading}
</p>
</span>
Expand Down
1 change: 0 additions & 1 deletion src/components/community-pages/mobile-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Disclosure, Transition } from "@headlessui/react";
import { ChevronDownIcon } from "lucide-react";
import { XMarkIcon } from "../header/icons.tsx";
import { useLockBody } from "../use-lock-body.ts";

Expand Down
Loading

0 comments on commit e30c9f1

Please sign in to comment.