response.json())
.then(
diff --git a/layouts/Breaking/index.jsx b/layouts/Breaking/index.jsx
new file mode 100644
index 0000000..f8a2aa2
--- /dev/null
+++ b/layouts/Breaking/index.jsx
@@ -0,0 +1,278 @@
+import React, { Component } from "react";
+import Error from "next/error";
+import { Config } from "../../config.js";
+import css from "../style.module.css";
+/** @jsxImportSource @emotion/react */
+import {css as cssEmotion, jsx} from "@emotion/core";
+import * as utilities from "../utilities";
+import InfiniteScroll from "react-infinite-scroller";
+import Media from "react-media";
+import LoadingBear from "../../components/LoadingBear";
+import ClassifiedsCard from "../../components/ClassifiedsCard";
+import ArticleCard from "components/ArticleCard/index.jsx";
+
+export default class BreakingLayout extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ otherArticleCards: utilities.buildArticleList(this.props.posts),
+ more: true,
+ isFixed: false
+ };
+ this.getPosts = this.getPosts.bind(this);
+ this.stickyRef = React.createRef(); // Reference to the sticky element
+ this.handleScroll = this.handleScroll.bind(this); // Binding the scroll handler
+ }
+
+ componentDidMount() {
+ window.addEventListener("scroll", this.handleScroll); // Attach scroll listener
+ }
+
+ componentWillUnmount() {
+ window.removeEventListener("scroll", this.handleScroll); // Clean up listener
+ }
+
+ handleScroll() {
+ const element = this.stickyRef.current;
+ if (element == null){
+ return; // this line is for mobile
+ }
+ const parent = element.parentElement;
+ const parentRect = parent.getBoundingClientRect();
+ const stickyTop = 70; // Matches the top value of sticky
+
+ // Switch to fixed when the parent container's bottom goes above the stickyTop
+ if (parentRect.bottom <= stickyTop) {
+ this.setState({ isFixed: true });
+ } else {
+ this.setState({ isFixed: false });
+ }
+ }
+
+ getPosts(page) {
+ fetch(
+ `${Config.apiUrl}/wp-json/wp/v2/posts?_embed&categories=27179&tags=${this.props.tagID}&page=${page}` //27179 is the category ID of breaking feed posts
+ )
+ .then(response => response.json())
+ .then(
+ json => {
+ if (json.data == undefined && json.length != 0) {
+ console.log(`${Config.apiUrl}/wp-json/wp/v2/posts?_embed&categories=27179&tags=${this.props.tagID}&page=${page}`);
+ this.setState({
+ otherArticleCards: this.state.otherArticleCards.concat(
+ utilities.buildArticleList(json, "breaking")
+ )
+ });
+ } else {
+ this.setState({
+ more: false
+ });
+ }
+ },
+ error => {
+ this.setState({
+ more: false
+ });
+ }
+ )
+ .catch(err =>
+ this.setState({
+ more: false
+ })
+ );
+ }
+
+ render() {
+ const { isFixed } = this.state;
+ return (
+
+ {matches => (
+ <>
+ {matches.phone && (
+
+
+
+ {this.props.eventSummary && utilities.buildArticleCard(this.props.eventSummary, "breakingOverview")}
+
+
+ }
+ >
+ {utilities.renderPostArray(
+ this.state.otherArticleCards,
+ "breaking"
+ )}
+
+ {!this.state.more ? (
+
+ End of news feed
+
+ ) : (
+
+ )}
+
+
+ )}
+ {matches.tablet && (
+
+
+
+
+ {this.props.eventSummary && utilities.buildArticleCard(this.props.eventSummary, "breakingOverview")}
+
+
+ }
+ >
+ {utilities.renderPostArray(
+ this.state.otherArticleCards,
+ "breaking"
+ )}
+
+ {!this.state.more ? (
+
+ End of news feed
+
+ ) : (
+
+ )}
+
+
+
+ )}
+ {matches.desktop && (
+
+
+
+ {/*
+ Normally you might just be able to do position: sticky to get the card to stick to the top of the
+ screen, but the stick only applies for the height of the div.
+ Instead of calculating the height of the screen to make the height of the div, we can instead
+ just put the position to fixed when the top of the div (from getBoundingClientRect)
+
+ */}
+
+ {this.props.eventSummary && utilities.buildArticleCard(this.props.eventSummary, "breakingOverview")}
+
+
+
+
+
+ }
+ >
+ {utilities.renderPostArray(
+ this.state.otherArticleCards,
+ "breaking"
+ )}
+
+ {!this.state.more ? (
+
+ End of news feed
+
+ ) : (
+
+ )}
+
+
+
+
+
+ )}
+ >
+ )}
+
+ );
+ }
+}
diff --git a/layouts/ColumnsFromQuarantine/index.jsx b/layouts/ColumnsFromQuarantine/index.jsx
index 78f8ba4..86d0817 100644
--- a/layouts/ColumnsFromQuarantine/index.jsx
+++ b/layouts/ColumnsFromQuarantine/index.jsx
@@ -1,5 +1,5 @@
import React from "react";
-/** @jsx jsx */
+/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
import * as globals from "../../components/globals";
diff --git a/layouts/Emmys2022/Footer.jsx b/layouts/Emmys2022/Footer.jsx
index a133a62..f2dc3d4 100644
--- a/layouts/Emmys2022/Footer.jsx
+++ b/layouts/Emmys2022/Footer.jsx
@@ -1,5 +1,5 @@
import React from "react";
-/** @jsx jsx */
+/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
import * as globals from "../../components/globals";
import dblogo from "./dblogo.svg"
diff --git a/layouts/Emmys2022/Header.jsx b/layouts/Emmys2022/Header.jsx
index 19a72b8..d80234a 100644
--- a/layouts/Emmys2022/Header.jsx
+++ b/layouts/Emmys2022/Header.jsx
@@ -1,6 +1,6 @@
import React from "react";
import DBLogo from "../AAPI2022/icons/DBLogo.svg";
-/** @jsx jsx */
+/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
export default function Header() {
return (
diff --git a/layouts/Emmys2022/index.jsx b/layouts/Emmys2022/index.jsx
index 49623f3..e3e5009 100644
--- a/layouts/Emmys2022/index.jsx
+++ b/layouts/Emmys2022/index.jsx
@@ -1,5 +1,5 @@
import React from "react";
-/** @jsx jsx */
+/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
import * as globals from "../../components/globals";
diff --git a/layouts/Home/index.jsx b/layouts/Home/index.jsx
index 9adbca9..59c4266 100644
--- a/layouts/Home/index.jsx
+++ b/layouts/Home/index.jsx
@@ -11,6 +11,8 @@ import Poll from "../../components/Poll";
import StoryList from "../../components/StoryList";
import SponsoredLinks from "../../components/SponsoredLinks";
import TwitterFeed from "../../components/TwitterFeed";
+import GamesCard from "components/GamesCard/GamesCard";
+import Link from "next/link";
const ArticleAdStyle = {
width: "100%",
@@ -57,7 +59,7 @@ export default class HomeLayout extends React.Component {
"/category/opinion"
),
aeStoryList: utilities.buildStoryList(
- "A&E",
+ "ARTS",
this.props.posts.artsList,
"/category/arts-entertainment"
),
@@ -111,6 +113,7 @@ export default class HomeLayout extends React.Component {
{this.props.mappedBreaking != null && (