Skip to content

Commit

Permalink
removing Q2 and fix tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
tensae-b committed Mar 19, 2024
1 parent e411036 commit a54a18e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
11 changes: 11 additions & 0 deletions public/3-version-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/pages/roadmap/[version_id]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import Layout from "../../../layouts/Layout.astro";
import { getQuarterData } from "../../../utils/getQuarterData.astro";
const { version_id } = Astro.params;
type VersionId = "Q1" | "Q2" | "Q3";
type VersionId = "Q1" | "Q4" | "Q3";
let opacity = 25;
function validateVersionId(versionId: string | undefined): VersionId {
if (!versionId) return "Q1";
const validVersions: VersionId[] = ["Q1", "Q2", "Q3"];
const validVersions: VersionId[] = ["Q1", "Q4", "Q3"];
if (validVersions.includes(versionId.toUpperCase() as VersionId)) {
return versionId.toUpperCase() as VersionId;
}
Expand All @@ -27,12 +27,13 @@ const roadmapVersion = await Astro.glob(
<Layout title="roadmap">
<section class="roadmap my-32">
<div class="relative w-full">
<img src="/public/roadmap-line.svg" class="w-full" />
<img src="/public/3-version-line.svg" class="w-full" />
<div
class="absolute -top-10 flex flex-row justify-evenly w-full md:-top-14"
>
{
roadmapVersion.map((version) => {
let opacity = 25;
const { id, title, backgroundColor, color } = version.frontmatter;
version_id == id ? (opacity = 100) : (opacity = 25);

Expand Down
12 changes: 6 additions & 6 deletions src/pages/roadmap/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ import { getQuarterData } from "../../utils/getQuarterData.astro";
const roadmapVersion = await Astro.glob("../../content/roadmapVersions/*.md");
const roadmapContent = await getQuarterData("Q1");
let opacity = 25;
---

<Layout title="roadmap">
<section class="roadmap my-32">
<div class="relative w-full">
<img src="/public/roadmap-line.svg" class="w-full" />
<img src="/public/3-version-line.svg" class="w-full" />
<div
class="absolute -top-10 flex flex-row justify-evenly w-full md:-top-14"
>
{
roadmapVersion.map((version) => {

const { id, title, backgroundColor, color } = version.frontmatter;
id == "Q1" ? (opacity = 100) : (opacity = 25);



return (
<div>
<div>
Expand All @@ -28,12 +29,11 @@ let opacity = 25;
</div>

<a href={`roadmap/${id}`}>

<div
class={`${backgroundColor} w-14 h-14 rounded-full opacity-20 relative`}
/>
<div
class={`${backgroundColor} w-8 h-8 absolute top-7 ml-3 rounded-full opacity-${opacity} md:top-12`}
class={`opacity-25 ${backgroundColor} w-8 h-8 absolute top-7 ml-3 rounded-full md:top-12`}
/>
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/getQuarterData.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
export const getQuarterData = async (quarter: "Q1" | "Q2" | "Q3") => {
export const getQuarterData = async (quarter: "Q1" | "Q4" | "Q3") => {
const globs = {
Q1: Astro.glob("../content/roadmap/Q1/*.md"),
Q2: Astro.glob("../content/roadmap/Q2/*.md"),
Q4: Astro.glob("../content/roadmap/Q4/*.md"),
Q3: Astro.glob("../content/roadmap/Q3/*.md"),
};
Expand Down

0 comments on commit a54a18e

Please sign in to comment.