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

Add Product pages #71

Merged
merged 59 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8fc4cc0
fixed organizers spiffy
mfsilva22 Feb 27, 2024
066c121
Merge branch 'main' of https://github.com/PrairieLearn/marketing
mfsilva22 Mar 5, 2024
e69b0cb
added products tab to naavbar
mfsilva22 Mar 10, 2024
4e369e9
PrairieTest page wip
mfsilva22 Mar 10, 2024
c0fc39d
more updates to pt page
mfsilva22 Mar 10, 2024
4adf9dd
created a CTA component
mfsilva22 Mar 10, 2024
40a7bc4
added exam format draft
mfsilva22 Mar 10, 2024
3772214
add draft text to features
mfsilva22 Mar 10, 2024
0b61b42
fixed format
mfsilva22 Mar 10, 2024
ca96d93
updates to pt page
mfsilva22 Mar 10, 2024
7695781
initial draft for testing center page
mfsilva22 Mar 11, 2024
20eeccc
removed not used import
mfsilva22 Mar 11, 2024
11cb34b
update fingerprint card
mfsilva22 Mar 11, 2024
cdf8471
first attempt to add other section to cbtf page
mfsilva22 Mar 11, 2024
9fdb06d
another attempt for value prop section
mfsilva22 Mar 11, 2024
8b04f48
center and larger font for cbtf first section
mfsilva22 Mar 11, 2024
b01445a
small updates
mfsilva22 Mar 11, 2024
89a8208
Update src/pages/products/prairietest/index.tsx
mfsilva22 Mar 11, 2024
a9cdb66
Update src/components/Header.tsx
mfsilva22 Mar 11, 2024
da52a27
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
f9520cf
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
cca4b5c
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
46fa91b
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
5f3885f
Update src/pages/products/prairietest/index.tsx
mfsilva22 Mar 11, 2024
58518be
Update src/pages/products/prairietest/index.tsx
mfsilva22 Mar 11, 2024
83bc586
Update src/pages/products/prairietest/index.tsx
mfsilva22 Mar 11, 2024
3f2bdf6
Update src/pages/products/prairietest/index.tsx
mfsilva22 Mar 11, 2024
5ba41ea
added suggestions from Matt
mfsilva22 Mar 11, 2024
0650c6e
fixed capitalization
mfsilva22 Mar 11, 2024
9422524
update CTA component
mfsilva22 Mar 11, 2024
b8dd85a
remove old CTA button
mfsilva22 Mar 11, 2024
ce96336
Update src/pages/products/prairietest/index.tsx
mfsilva22 Mar 11, 2024
8051a6e
Update src/pages/products/prairietest/index.tsx
mfsilva22 Mar 11, 2024
ad4c0b9
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
b870d33
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
278fa8a
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
a00209e
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
fbfb8a0
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 11, 2024
40dc0a9
deleted comments
mfsilva22 Mar 11, 2024
31159ce
Merge branch 'product-pages' of https://github.com/PrairieLearn/marke…
mfsilva22 Mar 11, 2024
fc61c60
add CTA button start of testing center page
mfsilva22 Mar 11, 2024
c90a455
small edit
mfsilva22 Mar 11, 2024
6f438df
adjusted spacing exam format section
mfsilva22 Mar 11, 2024
9ac7801
removed not needed Link
mfsilva22 Mar 11, 2024
4df1574
Adjust spacing; replace images with Bootstrap icons
nwalters512 Mar 12, 2024
6044911
Only make PrairieLearn link active on homepage
nwalters512 Mar 12, 2024
13ef064
Fix heading levels
nwalters512 Mar 12, 2024
b21bed0
Fix linter issue
nwalters512 Mar 12, 2024
c54b8c5
edit text for privacy screen
mfsilva22 Mar 12, 2024
0490a9d
updated PT registration image
mfsilva22 Mar 12, 2024
f679efe
Fix build issue; remove unused code
nwalters512 Mar 12, 2024
bc610dc
consistent use of exam wording; replaced photo online format
mfsilva22 Mar 12, 2024
3549989
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 12, 2024
cb31de1
added two value props
mfsilva22 Mar 12, 2024
4067686
Crop images
nwalters512 Mar 13, 2024
34ce0f3
Remove VSCode settings file
nwalters512 Mar 13, 2024
b69f63f
Update src/pages/products/testing-center/index.tsx
mfsilva22 Mar 13, 2024
c531e33
Small adjustments
nwalters512 Mar 13, 2024
b0770fa
Fix build errors
nwalters512 Mar 13, 2024
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
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
6 changes: 6 additions & 0 deletions src/components/CallToActionBanner.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import "~bootstrap/scss/_functions.scss";
@import "~bootstrap/scss/_variables.scss";

.container {
background-color: $blue-700;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ import React from "react";
import classnames from "classnames";
import Link from "next/link";

import styles from "./Banner.module.scss";
import styles from "./CallToActionBanner.module.scss";

export interface DemoCourseCTAProps {
export interface BannerCTAProps {
title: string;
subtitle: string;
buttonLabel: string;
href: string;
}

export const DemoCourseCTA: React.FC<DemoCourseCTAProps> = ({
export const BannerCTA: React.FC<BannerCTAProps> = ({
title,
subtitle,
buttonLabel,
href,
}) => (
<div className={classnames("container-fluid py-4", styles.container)}>
<div className="container-md">
Expand All @@ -25,10 +27,7 @@ export const DemoCourseCTA: React.FC<DemoCourseCTAProps> = ({
</div>
<div className="row justify-content-center my-2">
<div className="col-md-12 text-center">
<Link
href="https://us.prairielearn.com/pl/course_instance/4970"
className="btn btn-warning btn-lg"
>
<Link href={href} className="btn btn-warning btn-lg">
{buttonLabel}
</Link>
</div>
Expand Down
57 changes: 44 additions & 13 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ import { RequestCourseModal } from "../components/RequestCourseModal";

import styles from "./Header.module.scss";

function useIsActive(href: string | string[]): boolean {
function useIsActive(href: string | string[], exact: boolean): boolean {
const { asPath } = useRouter();
const hrefs = Array.isArray(href) ? href : [href];
return hrefs.some((href) => asPath.startsWith(href));
return hrefs.some((href) =>
exact ? asPath === href : asPath.startsWith(href)
);
}

function useIsCurrent(href: string): boolean {
Expand All @@ -27,11 +29,12 @@ function useIsCurrent(href: string): boolean {

interface NavLinkProps {
href: string;
activeMatchExactHref?: boolean;
children: React.ReactNode;
}

const RouterNavLink: React.FC<NavLinkProps> = ({ href, children }) => {
const active = useIsActive(href);
const active = useIsActive(href, false);
const current = useIsCurrent(href);
return (
<Link
Expand All @@ -47,8 +50,12 @@ const RouterNavLink: React.FC<NavLinkProps> = ({ href, children }) => {
);
};

const NavDropdownItem: React.FC<NavLinkProps> = ({ href, children }) => {
const active = useIsActive(href);
const NavDropdownItem: React.FC<NavLinkProps> = ({
href,
children,
activeMatchExactHref = false,
}) => {
const active = useIsActive(href, activeMatchExactHref);
const current = useIsCurrent(href);
return (
<NavDropdown.Item
Expand Down Expand Up @@ -141,10 +148,34 @@ export const Header: React.FC = () => {
<Dropdown.Toggle
as={NavLink}
className={classnames(styles["nav-link"], {
[`fw-bold ${styles.active}`]: useIsActive([
"/gallery",
"/oer",
]),
[`fw-bold ${styles.active}`]: useIsActive(
["/products"],
false
),
})}
>
Product
</Dropdown.Toggle>
<Dropdown.Menu>
<NavDropdownItem href="/" activeMatchExactHref>
PrairieLearn
</NavDropdownItem>
<NavDropdownItem href="/products/prairietest">
PrairieTest
</NavDropdownItem>
<NavDropdownItem href="/products/testing-center">
Testing Centers
</NavDropdownItem>
</Dropdown.Menu>
</Dropdown>
<Dropdown as={NavItem}>
<Dropdown.Toggle
as={NavLink}
className={classnames(styles["nav-link"], {
[`fw-bold ${styles.active}`]: useIsActive(
["/gallery", "/oer"],
false
),
})}
>
Catalog
Expand All @@ -166,10 +197,10 @@ export const Header: React.FC = () => {
<Dropdown.Toggle
as={NavLink}
className={classnames(styles["nav-link"], {
[`fw-bold ${styles.active}`]: useIsActive([
"/about",
"/research",
]),
[`fw-bold ${styles.active}`]: useIsActive(
["/about", "/research"],
false
),
})}
>
About
Expand Down
Binary file added src/lib/images/byodinclass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/images/cbtf.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/images/exam-management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/images/fingerprint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/images/pt-reservation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/images/reduced-distraction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/images/student-zoom.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/pages/about/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Head from "next/head";
import Image, { ImageProps } from "next/image";

import { PageBanner } from "../../components/Banner";
import { DemoCourseCTA } from "../../components/DemoCourse";
import { BannerCTA } from "../../components/CallToActionBanner";
import { Heading } from "../../components/Heading";
import Stack from "../../components/Stack";

Expand Down Expand Up @@ -182,10 +182,11 @@ export default function About() {
</div>
</div>

<DemoCourseCTA
<BannerCTA
title="View demo course!"
subtitle="Explore the demo course to see how this all comes together"
buttonLabel="Demo course"
href="https://us.prairielearn.com/pl/course_instance/4970"
/>
</React.Fragment>
);
Expand Down
5 changes: 3 additions & 2 deletions src/pages/contact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import classnames from "classnames";

import { ContactUsForm } from "../../components/ContactUsForm";
import { PageBanner } from "../../components/Banner";
import { DemoCourseCTA } from "../../components/DemoCourse";
import { BannerCTA } from "../../components/CallToActionBanner";

import styles from "./index.module.scss";

Expand Down Expand Up @@ -34,10 +34,11 @@ export default function Contact() {
</div>
</div>

<DemoCourseCTA
<BannerCTA
title="View demo course!"
subtitle="Too busy to schedule a demo? You can test the demo course on your own, before requesting your course space."
buttonLabel="Demo course"
href="https://us.prairielearn.com/pl/course_instance/4970"
/>
</React.Fragment>
);
Expand Down
5 changes: 3 additions & 2 deletions src/pages/gallery/assessments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Image from "next/image";

import { Heading } from "../../../components/Heading";
import { PageBanner } from "../../../components/Banner";
import { DemoCourseCTA } from "../../../components/DemoCourse";
import { BannerCTA } from "../../../components/CallToActionBanner";
import Stack from "../../../components/Stack";

import { getAssessments } from "../../../lib/gallery/assessments";
Expand Down Expand Up @@ -87,10 +87,11 @@ const AssessmentIndex: React.FC<AssessmentIndexProps> = ({ assessments }) => {
</div>
</div>

<DemoCourseCTA
<BannerCTA
title="View demo course!"
subtitle="Explore the demo course to see how this all comes together"
buttonLabel="Demo course"
href="https://us.prairielearn.com/pl/course_instance/4970"
/>
</React.Fragment>
);
Expand Down
5 changes: 3 additions & 2 deletions src/pages/gallery/questions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Image from "next/image";

import { Heading } from "../../../components/Heading";
import { PageBanner } from "../../../components/Banner";
import { DemoCourseCTA } from "../../../components/DemoCourse";
import { BannerCTA } from "../../../components/CallToActionBanner";
import { LinkButton } from "../../../components/LinkButton";
import { getQuestions } from "../../../lib/gallery/questions";

Expand Down Expand Up @@ -122,10 +122,11 @@ const GalleryIndex: React.FC<GalleryIndexProps> = ({ questions }) => {
</div>
</div>

<DemoCourseCTA
<BannerCTA
title="View demo course!"
subtitle="Explore the demo course to see how this all comes together"
buttonLabel="Demo course"
href="https://us.prairielearn.com/pl/course_instance/4970"
/>
</React.Fragment>
);
Expand Down
5 changes: 3 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Link from "next/link";
import Stack from "../components/Stack";
import { Heading } from "../components/Heading";
import { ExampleQuestion } from "../components/ExampleQuestion";
import { DemoCourseCTA } from "../components/DemoCourse";
import { BannerCTA } from "../components/CallToActionBanner";

import richFBD from "../lib/images/rich_question_FBD.png";
import richorder from "../lib/images/rich_question_order_block.png";
Expand Down Expand Up @@ -283,10 +283,11 @@ const Home: React.FC<HomeProps> = ({ seed }) => {
</div>
</div>

<DemoCourseCTA
<BannerCTA
title="View demo course!"
subtitle="Explore the demo course to see how this all comes together."
buttonLabel="Demo course"
href="https://us.prairielearn.com/pl/course_instance/4970"
/>

<RequestCourseModal
Expand Down
16 changes: 16 additions & 0 deletions src/pages/products/prairietest/index.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@import "~bootstrap/scss/_functions.scss";
@import "~bootstrap/scss/_variables.scss";

.container {
background-color: $gray-200;
}

.color {
color: $blue-700;
}

.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
grid-gap: 2rem;
}
Loading
Loading