Clean up Shapes Backgrounds on some mobile pages #307

Merged
a258wang merged 3 commits from amy-adjust-mobile-shapes-background into main 2021-09-15 23:17:19 -04:00
5 changed files with 19 additions and 15 deletions

View File

@ -23,7 +23,7 @@
@media only screen and (max-width: calc(768rem / 16)) {
.page {
margin-bottom: calc(30rem / 16);
margin: calc(30rem / 16) 0;
}
.headerContainer {

View File

@ -64,6 +64,7 @@
.headerContainer {
flex-direction: column-reverse;
padding-bottom: 1rem;
margin-top: calc(30rem / 16);
}
.nav {

View File

@ -5,6 +5,11 @@ import { MDXRemote } from "next-mdx-remote";
import React from "react";
import { EventCard } from "@/components/EventCard";
import {
ShapesConfig,
defaultGetShapesConfig,
GetShapesConfig,
} from "@/components/ShapesBackground";
import { Title } from "@/components/Title";
import {
Event,
@ -30,6 +35,12 @@ export default function EventInfoPage({ year, term, event }: Props) {
);
}
EventInfoPage.getShapesConfig = ((width, height) => {
return window.innerWidth <= 768
? ({} as ShapesConfig)
: defaultGetShapesConfig(width, height);
}) as GetShapesConfig;
interface Props {
year: string;
term: string;

View File

@ -264,20 +264,13 @@ Home.getShapesConfig = (() => {
],
hash: [
{
top: "calc(190rem / 16)",
right: "87vw",
width: "calc(60rem / 16)",
height: "calc(60rem / 16)",
top: "calc(250rem / 16)",
right: "80vw",
width: "calc(45rem / 16)",
height: "calc(45rem / 16)",
},
],
triangle: [
{
top: "calc(266rem / 16)",
right: "78vw",
width: "calc(45rem / 16)",
height: "calc(45rem / 16)",
transform: "rotate(-26deg)",
},
{
top: "calc(4rem / 16)",
right: "3vw",
@ -288,7 +281,7 @@ Home.getShapesConfig = (() => {
],
waves: [
{
top: "calc(168rem / 16)",
top: "calc(230rem / 16)",
left: "86vw",
width: "calc(102rem / 16)",
height: "calc(50rem / 16)",

View File

@ -36,8 +36,7 @@
@media only screen and (max-width: calc(768rem / 16)) {
.page {
margin-top: 0;
margin-bottom: calc(20rem / 16);
margin: calc(30rem / 16) 0;
}
.headerContainer {