Skip to content
Open
Binary file added public/assets/new_homepage_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 1 addition & 21 deletions src/app/components/pages/EventManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,7 @@ import { SelectedEventDetails } from "../elements/panels/SelectedEventDetails";
import { ManageExistingBookings } from "../elements/panels/ManageExistingBookings";
import { AddUsersToBooking } from "../elements/panels/AddUsersToBooking";
import { EventAttendance } from "../elements/panels/EventAttendance";
import { Button, Container } from "reactstrap";

const EventButton = ({ link, text, className }: { link: string; text: string; className?: string }) => (
<Button
color="primary"
size="md"
href={link}
className={`mx-3 ${className}`}
target="_blank"
rel="noopener noreferrer"
>
{text}
</Button>
);
import { Container } from "reactstrap";

export const EventManager = ({ user }: { user: PotentialUser }) => {
const [selectedEventId, setSelectedEventId] = useState<string | null>(null);
Expand All @@ -35,13 +22,6 @@ export const EventManager = ({ user }: { user: PotentialUser }) => {
return (
<Container>
<TitleAndBreadcrumb intermediateCrumbs={[ADMIN_CRUMB]} currentPageTitle="Event booking admin" />
<div className="my-3 d-flex flex-column flex-sm-row justify-content-end">
<EventButton link="https://forms.office.com/e/ZrijWx8gcw" text="Event listing form" className="mb-2 mb-sm-0" />
<EventButton
link="https://myscience.atlassian.net/wiki/spaces/NN/pages/4119658517/Events+toolkit"
text="Events toolkit"
/>
</div>
<div className="mb-5 mx-n4 mx-sm-n5 pt-3" id="event-admin">
<EventOverviews user={user} setSelectedEventId={setSelectedEventId} />
{selectedEventId !== null && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import { selectors, useAppSelector } from "../../../../state";
import { isStudent, isAdmin, isTeacher } from "../../../../services";
import CompetitionWrapper from "../CompetitionWrapper";
import { CLOSED_MESSAGE, STUDENT_MESSAGE, TEACHER_MESSAGE } from "../constants";
import { isBeforeCompetitionOpenDate } from "../dateUtils";

// EOI button configuration - same as HomepageHighlight
export const eoiButton = {
to: "https://forms.cloud.microsoft/e/K4GmaA3QEF",
label: "Express your interest",
label: isBeforeCompetitionOpenDate(new Date()) ? "Express your interest" : "Submit your project",
};

const StudentMessage = () => (
Expand Down
70 changes: 39 additions & 31 deletions src/app/components/pages/IsaacCompetition/IsaacCompetition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import CompetitionTimeline from "./CompetitionInformation/CompetitionTimeline";
import EntryFormHandler, { eoiButton } from "./EntryForm/EntryFormHandler";
import CompetitionButton from "./Buttons/CompetitionButton";
import CompetitionWrapper from "./CompetitionWrapper";
import { liveQandASessionDate } from "./dateUtils";
import { isBeforeCompetitionOpenDate, liveQandASessionDate } from "./dateUtils";

const { section1, section3, accordion } = content;

Expand Down Expand Up @@ -71,45 +71,53 @@ export const IsaacCompetition = () => {
<Container className="pt-4 z1">
<Row className="pb-5">
<h1 className="primary-heading pl-3">National Computer Science Competition</h1>
<Col xs={12} md={6} lg={8} className="pb-3">
<Col xs={12} md={6} className="pb-3">
<p className="mt-4 body-text">{section1.header.section1}</p>
<p className="mt-4 body-text">{section1.header.section2}</p>
<p className="mt-4 mb-0 body-text">
<span>{section1.note.entryDetails} </span>
<a
href={section1.note.facebookLink}
target="_blank"
rel="noopener noreferrer"
className="text-decoration-underline"
>
Facebook
</a>
{` and `}
<a
href={section1.note.instagramLink}
target="_blank"
rel="noopener noreferrer"
className="text-decoration-underline"
>
Instagram
</a>
{` ${section1.note.callToAction}`}
{isBeforeCompetitionOpenDate(new Date()) ? (
<>
<span>{section1.note.beforeOpen.entryDetails} </span>
<a
href={section1.note.beforeOpen.facebookLink}
target="_blank"
rel="noopener noreferrer"
className="text-decoration-underline"
>
Facebook
</a>
{` and `}
<a
href={section1.note.beforeOpen.instagramLink}
target="_blank"
rel="noopener noreferrer"
className="text-decoration-underline"
>
Instagram
</a>
{` ${section1.note.beforeOpen.callToAction}`}
</>
) : (
section1.note.afterOpen.entryDetails
)}
</p>
<Row className="justify-content-left mt-4">
<Row className="justify-content-left mt-5">
<Col xs="auto">
<CompetitionWrapper beforeCompetitionOpenContent={<CompetitionButton buttons={[eoiButton]} />}>
{null}
<CompetitionWrapper>
<CompetitionButton buttons={[eoiButton]} />
</CompetitionWrapper>
</Col>
</Row>
</Col>
<Col lg={4} md={6} className="order-lg-2 order-3 mt-4 mt-lg-0 pb-md-0">
<img
src="/assets/competition-image.png"
alt="Competition"
className="img-fluid d-none d-md-block"
style={{ maxWidth: "100%", height: "auto" }}
/>
<Col md={6} className="mt-4 pb-md-0 d-none d-md-block">
<div className="mb-3">
<img
src="/assets/new_homepage_image.png"
alt="The 2025/2026 competition winners"
className="img-fluid w-100 h-auto d-block p-0"
/>
</div>
<p className="competition-hero-caption text-center mt-2 mb-0 px-5">{section1.imageCaption}</p>
</Col>
</Row>
</Container>
Expand Down
17 changes: 12 additions & 5 deletions src/app/components/pages/IsaacCompetition/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@ export default {
section1: {
header: {
section1: [
"Calling all computer science fans! We are hosting a national competition to challenge students to imagine, design, and pitch a groundbreaking new product for the Internet of Everything (IOE).",
"Calling all computer science fans! We are hosting a national competition to challenge students to imagine, design, and pitch a groundbreaking new product for the Internet of Everything.",
],
section2: [
"The competition is a fantastic opportunity for students to apply their knowledge to real-world ideas.",
],
},
note: {
entryDetails: "Follow our",
callToAction: "accounts for updates.",
facebookLink: "https://www.facebook.com/IsaacComputerScience",
instagramLink: "https://www.instagram.com/isaaccomputerscience",
beforeOpen: {
entryDetails: "Follow our",
callToAction: "accounts for updates.",
facebookLink: "https://www.facebook.com/IsaacComputerScience",
instagramLink: "https://www.instagram.com/isaaccomputerscience",
},
afterOpen: {
entryDetails: "Are you a teacher? Log in to submit a project on behalf of your students.",
},
},
imageCaption:
"The 2025/2026 competition winners: the 'Binary Sorter' project from Newstead Wood School (four students on the left) and 'Smart Port Locker' from Stroud High School (a student on the right)",
},

section3: {
Expand Down
6 changes: 6 additions & 0 deletions src/scss/cs/competition.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
background-color: #ffffff;
}

.competition-hero-caption {
font-size: 14px;
line-height: 1.4;
background-color: transparent;
}

.manage-group-link {
color: #1d70b8;
text-decoration: underline;
Expand Down
11 changes: 0 additions & 11 deletions src/test/pages/EventManager.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ describe("Event Manager", () => {
);
});

it("shows event listing form and events toolkit buttons with correct links", () => {
renderEventManager();
const eventListingForm = screen.getByRole("link", { name: /event listing form/i });
const eventsToolkit = screen.getByRole("link", { name: /events toolkit/i });
expect(eventListingForm).toHaveAttribute("href", "https://forms.office.com/e/ZrijWx8gcw");
expect(eventsToolkit).toHaveAttribute(
"href",
"https://myscience.atlassian.net/wiki/spaces/NN/pages/4119658517/Events+toolkit",
);
});

it("if logged in as an Event Leader, a message appears to warn that they can only view events they manage", () => {
renderEventManager({ role: "EVENT_LEADER" });
checkPageTitle("Event booking admin");
Expand Down
Loading