diff --git a/.vscode/extensions.json b/.vscode/extensions.json index af0e7c69..174f1cad 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,7 +2,6 @@ "recommendations": [ "dbaeumer.vscode-eslint", "humao.rest-client", - "silvenon.mdx", - "xyc.vscode-mdx-preview" + "silvenon.mdx" ] } \ No newline at end of file diff --git a/components/EventDescriptionCard.tsx b/components/EventDescriptionCard.tsx index 013d977a..32fcba15 100644 --- a/components/EventDescriptionCard.tsx +++ b/components/EventDescriptionCard.tsx @@ -1,5 +1,6 @@ import React, { ReactNode } from "react"; // import { Button } from "./Button"; +import { Image } from "./Image"; import { EventSetting } from "./EventSetting"; import styles from "./EventDescriptionCard.module.css"; @@ -37,7 +38,7 @@ const links = { export function EventDescriptionCard(props: Props) { return (
- {props.name} + {props.name}

{props.name}

@@ -60,7 +61,7 @@ export function EventDescriptionCard(props: Props) { )} {props.online && ( - {props.location}) { + const { src: relativeSrc = "" } = props; + + let absoluteSrc = process.env.BASE_PATH ?? "/"; + if (absoluteSrc.endsWith("/") && relativeSrc.startsWith("/")) { + absoluteSrc += relativeSrc.slice(1); + } else if (absoluteSrc.endsWith("/") || relativeSrc.startsWith("/")) { + absoluteSrc += relativeSrc; + } else { + absoluteSrc += "/" + relativeSrc; + } + + return ; +} diff --git a/components/Navbar.module.css b/components/Navbar.module.css index 9aa5b04b..0bac891e 100644 --- a/components/Navbar.module.css +++ b/components/Navbar.module.css @@ -29,6 +29,10 @@ cursor: pointer; } +.logo img { + width: 96px; +} + .navMenu { display: inline-flex; flex-direction: row; diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 19493239..1111c7a6 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -1,7 +1,7 @@ import React from "react"; -import Image from "next/image"; import Link from "next/link"; import { useRouter } from "next/router"; +import { Image } from "./Image"; import styles from "./Navbar.module.css"; interface NavLink { @@ -98,12 +98,7 @@ export function Navbar() {
- CSC Logo + CSC Logo
    diff --git a/components/playground.tsx b/components/playground.tsx index baf4e99b..b4181839 100644 --- a/components/playground.tsx +++ b/components/playground.tsx @@ -83,7 +83,7 @@ export function EventDescriptionCardDemo() { date={date} online={true} location="Twitch" - poster="images/playground/intro-ootb.jpg" + poster="/images/playground/intro-ootb.jpg" registerLink="/" >

    {short}

    @@ -93,7 +93,7 @@ export function EventDescriptionCardDemo() { date={date} online={true} location="Twitch" - poster="images/playground/alt-tab.jpg" + poster="/images/playground/alt-tab.jpg" registerLink="/" >

    {short}

    @@ -103,7 +103,7 @@ export function EventDescriptionCardDemo() { date={date} online={true} location="Twitch" - poster="images/playground/intro-ootb.jpg" + poster="/images/playground/intro-ootb.jpg" registerLink="/" >

    {short}

    diff --git a/next.config.js b/next.config.js index 20725b3e..30e33dc0 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,9 @@ -const withMDX = require('@next/mdx')({ - extension: /\.mdx$/ -}) +const withMDX = require("@next/mdx")({ + extension: /\.mdx$/, +}); module.exports = withMDX({ - pageExtensions: ['ts', 'tsx', 'mdx'] -}) \ No newline at end of file + pageExtensions: ["ts", "tsx", "mdx"], + trailingSlash: true, + basePath: process.env.BASE_PATH, +});