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

Landing page changes #172

Merged
merged 5 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 7 additions & 6 deletions components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ function Layout(props: LayoutProps): JSX.Element {
<Head>
<meta charSet="UTF-8" />
<meta name="title" content="opensource at acm at ucla" />
<meta name="description" content="open source at acm at ucla!"/>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="description" content="open source at acm at ucla!" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1"
/>

<title>open source at acm at ucla</title>
<title>open source at ucla</title>
<link rel="icon" href="/logo.png" />
</Head>
<Navbar />
<main>
{props.children}
</main>
<main>{props.children}</main>
<Footer />
</>
);
Expand Down
38 changes: 16 additions & 22 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,22 @@ export default function Home({
title="open source at ACM at UCLA"
description="at the largest computer science community at UCLA, we care about open-source"
openGraph={{
images: [{
url: 'https://opensource.uclaacm.com/logo.png',
width: 1200,
height: 1200,
alt: 'The ACM at UCLA logo',
}],
images: [
{
url: 'https://opensource.uclaacm.com/logo.png',
width: 1200,
height: 1200,
alt: 'The ACM at UCLA logo',
},
],
site_name: 'open source at ACM at UCLA',
}}
/>
<h1>
open source at{' '}
<ELink link="https://uclaacm.com">
ACM at UCLA
</ELink>
</h1>
<h1>open source at UCLA</h1>
<hr />
<p className="knockout-description">
at the largest computer science community at UCLA,
<br /> <b>we care about open-source.</b>
maintained by <ELink link="https://uclaacm.com">ACM at UCLA</ELink>,
the largest computer science community at UCLA
</p>
<div className="row">
<div className="col-6">
Expand Down Expand Up @@ -104,7 +101,8 @@ export default function Home({

<h2>featured project</h2>
<ProjectCard
project={randomProject ? randomProject : projects[projNumToDisplay]} preload={true}
project={randomProject ? randomProject : projects[projNumToDisplay]}
preload={true}
githubColors={githubColors}
/>
<h2>what we&apos;ve been doing recently...</h2>
Expand All @@ -116,15 +114,12 @@ export default function Home({
))}
<p>
see more activity{' '}
<ELink link="https://github.com/uclaacm/">
on our org
</ELink>
!
<ELink link="https://github.com/uclaacm/">on our org</ELink>!
</p>
</div>
</div>
</div >
</Layout >
</div>
</Layout>
);
}

Expand All @@ -141,7 +136,6 @@ export const getStaticProps: GetStaticProps = async () => {
});
const recentEvents = eventResponse.data;


const githubColors = await getGithubColors();

const projects = await getProjects();
Expand Down
43 changes: 24 additions & 19 deletions pages/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import ProjectCard from '../components/ProjectCard';
import SearchFilter from '../components/SearchFilter/SearchFilter';
import { getProjects, Project, GitHubColors, getGithubColors } from '../util';


interface ProjectsProps {
projects: Project[];
githubColors: GitHubColors
githubColors: GitHubColors;
}

function Projects({ projects, githubColors }: ProjectsProps): JSX.Element {

// projects is a master list of all the projects that we fetched, filteredProjects is the one that we render
// to the user
const [filteredProjects, setFilteredProjects] = useState(projects);
Expand All @@ -25,38 +23,45 @@ function Projects({ projects, githubColors }: ProjectsProps): JSX.Element {
title="projects | open source at ACM at UCLA"
description="a heads-up overview of the projects that power ACM at UCLA"
openGraph={{
images: [{
url: 'https://opensource.uclaacm.com/logo.png',
width: 1200,
height: 1200,
alt: 'The ACM at UCLA logo',
}],
images: [
{
url: 'https://opensource.uclaacm.com/logo.png',
width: 1200,
height: 1200,
alt: 'The ACM at UCLA logo',
},
],
site_name: 'open source at ACM at UCLA',
}}
/>
<h1>
projects
</h1>
<h1>check out current UCLA open source projects</h1>
Copy link
Contributor

@snigdha-kansal snigdha-kansal May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I think we want to change the description on the card link under Projects on the landing page to "Check out current UCLA open source projects!" and not the title of the projects page.

<p>
a (work-in-progress) heads-up overview of the projects that power ACM at UCLA.
an overview of all open-source projects affiliated with UCLA,
extending beyond those managed by ACM at UCLA.
</p>
<hr />
<SearchFilter
projects={projects}
setFilteredProjects={setFilteredProjects}
/>
<hr/>
<hr />
<div className="row same-height-grid">
{filteredProjects.length > 0
? filteredProjects.map((project, i) => {
{filteredProjects.length > 0 ? (
filteredProjects.map((project, i) => {
return (
<div className="col-4" key={project.name}>
<ProjectCard project={project} vertical preload={i < 3} githubColors={githubColors} />
<ProjectCard
project={project}
vertical
preload={i < 3}
githubColors={githubColors}
/>
</div>
);
})
: <h2>No results found</h2>
}
) : (
<h2>No results found</h2>
)}
</div>
</div>
</Layout>
Expand Down
Loading