Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
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
20 changes: 11 additions & 9 deletions src/app/components/pages/IsaacCompetition/IsaacCompetition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ 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">
Expand All @@ -95,21 +95,23 @@ export const IsaacCompetition = () => {
</a>
{` ${section1.note.callToAction}`}
</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>
</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
4 changes: 3 additions & 1 deletion src/app/components/pages/IsaacCompetition/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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.",
Expand All @@ -14,6 +14,8 @@ export default {
facebookLink: "https://www.facebook.com/IsaacComputerScience",
instagramLink: "https://www.instagram.com/isaaccomputerscience",
},
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