Skip to content

Commit

Permalink
Add description for organization
Browse files Browse the repository at this point in the history
  • Loading branch information
EshaanAgg committed Oct 31, 2023
1 parent 0e9d427 commit c747ad4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
13 changes: 6 additions & 7 deletions src/components/home/OrganizationCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ interface Props {
name: string;
logoUrl: string;
id: string;
description: string;
skills: string[];
}
const { id, name, logoUrl, skills } = Astro.props;
const { id, name, logoUrl, skills, description } = Astro.props;
//We will only display the non-empty and (at max) the most frequent 6 skills
const MAX_DESCRIPTION_LENGTH = 180;
// We will only display the non-empty and (at max) the most frequent 6 skills
const filtertedSkills = skills.filter((skill) => skill != "").slice(0, 6);
const description =
"CNCF is the open source, vendor-neutral hub of cloud native computing, hosting projects....";
---

<div
Expand All @@ -38,8 +37,8 @@ const description =
<div>
<p class="text-fade-grey text-sm text-center pt-[10px]">
{
description.length > 150
? description.substring(0, 150) + "..."
description.length > MAX_DESCRIPTION_LENGTH
? description.substring(0, MAX_DESCRIPTION_LENGTH) + "..."
: description
}
</p>
Expand Down
19 changes: 3 additions & 16 deletions src/pages/org/[orgID].astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ const projectData = (await projectResponse.json()).projects;
</div>

<div class="orgInfo">
<div class="orgAbout">
<p>
Need to integrate organization descriptions into the backend and
then display it here.
<div>
<p class="text-white text-md max-w-xl">
{orgData.desc}
</p>
</div>
<div class="graph">Display the Graph</div>
Expand Down Expand Up @@ -90,18 +89,6 @@ const projectData = (await projectResponse.json()).projects;
margin: 0vh 0vw 10vh 0vw;
}

.orgAbout {
display: flex;
gap: 20px;
flex-direction: column;
font-family: Lato;
font-size: 18px;
font-weight: 400;
line-height: 20px;
letter-spacing: 0em;
text-align: justified;
}

.graph {
display: flex;
width: 40%;
Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type Organization = {
id: string;
name: string;
description: string;
logoUrl: string;
skills: string[];
};
Expand Down

0 comments on commit c747ad4

Please sign in to comment.