Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Daily Bruin" Header resize #116

Open
wants to merge 110 commits into
base: gene/header_resize
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
798aa75
Ad above the opinion section for mobile
BrysonXiao Nov 4, 2022
bcd6af0
Scroll banner ad in view, placeholder style space
miastay Nov 4, 2022
1eaea91
Reparented & restyled sponsored links
miastay Nov 18, 2022
6c34b29
Moved prime ad
BrysonXiao Nov 29, 2022
28756b6
Merge branch 'rtaylor/fix/tabletspacing' of https://github.com/dailyb…
BrysonXiao Nov 29, 2022
22b7902
Changed style of tablet footer to match style of phone footer
BrysonXiao Nov 29, 2022
aae78e7
Remove additional height from adspace
miastay Feb 23, 2023
3484a7a
Merge branch 'bryson/fix-tablet-spacing'
BrysonXiao Mar 7, 2023
8a0096b
Merge pull request #110 from dailybruin/bryson/fix-tablet-spacing
kaylynphan May 10, 2023
14883dc
Revert "Merge pull request #110 from dailybruin/bryson/fix-tablet-spa…
kaylynphan May 23, 2023
0e7ca63
removed console logs in rerenders
miastay May 25, 2023
e39d138
Revert "Revert "Merge pull request #110 from dailybruin/bryson/fix-ta…
kaylynphan May 25, 2023
07ce5b6
Merge pull request #118 from dailybruin/mia/storage_fix
kaylynphan May 25, 2023
e514f12
Added description parameter for category pages
BrysonXiao Sep 22, 2023
4e1a4da
Merge pull request #120 from dailybruin/bryson/quad-description
BrysonXiao Sep 24, 2023
7775667
Added support for mobile category descriptions
BrysonXiao Sep 25, 2023
f386609
Merge pull request #121 from dailybruin/bryson/category-mobile-descri…
BrysonXiao Sep 25, 2023
92abc37
Added Daily Bruin header to Stonewall
audreyliao Nov 16, 2023
581fb6a
deleted new lines and comments
audreyliao Nov 16, 2023
898d9db
Merge pull request #123 from dailybruin/stonewall/audre
BrysonXiao Nov 16, 2023
ced7259
grid
jjasminew Nov 27, 2023
39e8dd6
added grid to stonewall
jjasminew Nov 30, 2023
87ff9e8
Merge branch 'master' into jasmineNancy/stonewall-grid
jjasminew Nov 30, 2023
e802000
Merge pull request #125 from dailybruin/jasmineNancy/stonewall-grid
BrysonXiao Jan 10, 2024
a2d1a7d
Set up the initial page and feature flag for opinion column series
BrysonXiao Feb 21, 2024
d784689
Merge pull request #129 from dailybruin/bryson/opinion-column-series
BrysonXiao Feb 21, 2024
d9ac882
Fix subcategories popping
BrysonXiao Feb 27, 2024
c0f99bd
Merge pull request #130 from dailybruin/bryson/opinion-column-series
BrysonXiao Feb 27, 2024
67effd3
update donation link
Mar 6, 2024
7e13295
updated twitter logo to X
Mar 6, 2024
18f46ee
Update deploy.yml for GitHub Action trigger
matthewyu01 May 1, 2024
416ee4f
Run fetches in parallel
matthewyu01 May 1, 2024
f1580bc
Merge pull request #131 from dailybruin/matthew/parallel-fetches
BrysonXiao May 2, 2024
76af91f
updated stonewall paragraph to since 1919
BrysonXiao May 29, 2024
ad2a6e4
Merge pull request #132 from dailybruin/bryson/update-stonewall-text
BrysonXiao May 29, 2024
643c1bb
Changed order of Footer Links
EdNawrocki Jul 26, 2024
62a0ac2
Merge pull request #134 from dailybruin/Ed/MoveSubmit
EdNawrocki Jul 31, 2024
676db18
Added ACTIONS_ALLOW_USE_UNSECURED_NODE_VERSION
EdNawrocki Aug 11, 2024
de3440b
Merge pull request #135 from dailybruin/Ed/UpdateGithubWorkflow
EdNawrocki Aug 11, 2024
7ea6c4a
Test action creates test.txt and adds hello
EdNawrocki Aug 16, 2024
1816454
updated workflow to run on node 16
EdNawrocki Aug 16, 2024
112c422
Merge pull request #136 from dailybruin/Ed/TestGitHubAction
EdNawrocki Aug 16, 2024
8a56604
Updated checkout and setup-node versions
EdNawrocki Aug 16, 2024
290c874
Merge pull request #137 from dailybruin/Ed/TestGitHubAction
EdNawrocki Aug 16, 2024
253b239
Changed order of actions so node is updated before checkout
EdNawrocki Aug 16, 2024
5a9995f
Merge pull request #138 from dailybruin/Ed/TestGitHubAction
EdNawrocki Aug 16, 2024
1b4a6b1
Checking node version when running test workflow
EdNawrocki Aug 19, 2024
05ac070
Merge pull request #139 from dailybruin/Ed/TestGitHubAction
EdNawrocki Aug 19, 2024
c431a3a
Fixed output of node version
EdNawrocki Aug 19, 2024
64ca4d9
Merge pull request #140 from dailybruin/Ed/TestGitHubAction
EdNawrocki Aug 19, 2024
68cf4f4
Added Dockerfile and health endpoints
EdNawrocki Sep 24, 2024
d7f73dc
Basic Breaking Layout, Card iteration #1
EdNawrocki Oct 8, 2024
aae86ad
Added time since posting metric
EdNawrocki Oct 9, 2024
bb4689d
Overlooked tab is done and over
EdNawrocki Oct 9, 2024
3524af1
Updated breaking feeds to be tied to tags and more twitter-y
EdNawrocki Oct 9, 2024
53e381a
Merge pull request #141 from dailybruin/Remove-Overlooked-Link
EdNawrocki Oct 9, 2024
c0dfb76
Merge branch 'Remove-Overlooked-Link' into Breaking-Feeds
EdNawrocki Oct 9, 2024
00486f4
Added sticky news bulletin, fixed news feed to work mobile and tablet
EdNawrocki Oct 11, 2024
0dc0bdc
Added routing for new breaking news overview category
EdNawrocki Oct 11, 2024
6a51330
Added WestWord build to the public frontend of the website
EdNawrocki Oct 22, 2024
bd5513b
Added "Games" title in masthead.
EdNawrocki Oct 22, 2024
1e92c19
React 17.0 WE GOT YOUUU
Oct 24, 2024
2cad62f
removed default breaking page, changed color of outline
EdNawrocki Oct 26, 2024
839549c
new wordle
EdNawrocki Oct 31, 2024
4913030
Self runner will run actions using node version 16
EdNawrocki Oct 31, 2024
67de7c0
reverted react version to 16 :( and changed actions runner
EdNawrocki Oct 31, 2024
dc8ae63
Changed A&E Header to be Arts instead for our dear friend BT
EdNawrocki Oct 31, 2024
633e0f4
Put link to games tab on front page
EdNawrocki Oct 31, 2024
0905abb
Merge pull request #142 from dailybruin/Games-Tab
EdNawrocki Oct 31, 2024
d128586
Minor wordle changes from liam
EdNawrocki Nov 1, 2024
911a7e3
Merge pull request #143 from dailybruin/Games-Tab
EdNawrocki Nov 1, 2024
06cd001
updated colors for election issue
EdNawrocki Nov 4, 2024
4650643
Merge pull request #144 from dailybruin/Games-Tab
EdNawrocki Nov 4, 2024
031a14c
removed /category/breaking post page
EdNawrocki Nov 4, 2024
9228447
Merge pull request #145 from dailybruin/Breaking-Feeds
EdNawrocki Nov 4, 2024
57cf292
Updated colors for westword game and made font bigger. Also deleted t…
EdNawrocki Nov 4, 2024
0f49909
Merge pull request #146 from dailybruin/Games-Tab
EdNawrocki Nov 4, 2024
bf21c92
modified breaking feeds overview card to work with more than 50 chara…
EdNawrocki Nov 4, 2024
8e76d6d
Merge pull request #147 from dailybruin/Breaking-Feeds
EdNawrocki Nov 4, 2024
38c3f65
breaking category page now can collect linked feeds
EdNawrocki Nov 4, 2024
5fb3d68
fixed issue where page crashed with no overview
EdNawrocki Nov 5, 2024
8680f85
Merge pull request #148 from dailybruin/Breaking-Feeds-hotfix
EdNawrocki Nov 5, 2024
42c699f
Added additional guard for no event Summary
EdNawrocki Nov 5, 2024
e1c1152
Merge pull request #149 from dailybruin/Breaking-Feeds
EdNawrocki Nov 5, 2024
e1edb36
Removed breaking feed posts from showing up on author page
EdNawrocki Nov 5, 2024
914bd3b
Merge pull request #150 from dailybruin/Breaking-Feeds
EdNawrocki Nov 5, 2024
2485984
Fixed issues where line breaks did not show up
EdNawrocki Nov 5, 2024
f74a890
Fixed typo in infinite scroll generation
EdNawrocki Nov 5, 2024
d11c0ba
Merge pull request #151 from dailybruin/Breaking-Feeds
EdNawrocki Nov 5, 2024
315abfc
upgraded next from ver 9 to 10
jz0527 Nov 7, 2024
77c12a1
finished merge by deleting yarn.lock
EdNawrocki Nov 7, 2024
ddde017
React-->17 Next-->10
EdNawrocki Nov 7, 2024
9786e9b
Merge pull request #153 from dailybruin/react17next10upgrade
EdNawrocki Nov 7, 2024
f405c06
removed election theme from westwords?
EdNawrocki Nov 9, 2024
7903993
Merge pull request #154 from dailybruin/Westwordle-No-Election
EdNawrocki Nov 9, 2024
d26ee96
fixed colors for westwords
EdNawrocki Nov 10, 2024
ec1ae8b
Merge pull request #155 from dailybruin/games-fix
EdNawrocki Nov 10, 2024
4dc9f82
Changed title for index.html file for westwords
EdNawrocki Nov 12, 2024
84bd9a5
Merge pull request #156 from dailybruin/games-title-fix
EdNawrocki Nov 12, 2024
bbf6fe4
fixed brackets in title
EdNawrocki Nov 12, 2024
c10e249
Merge pull request #157 from dailybruin/games-title-fix
EdNawrocki Nov 12, 2024
3c15991
Merge branch 'master' into Ed/DockerContainer
EdNawrocki Nov 20, 2024
f99776e
Modified author posts query to exclude overview and breaking feed pos…
EdNawrocki Nov 20, 2024
c0749c5
Merge pull request #158 from dailybruin/AuthorFeeds
EdNawrocki Nov 20, 2024
acf66bd
Modified chat button in bottom right to link to tipline
EdNawrocki Nov 21, 2024
74cb100
Merge pull request #159 from dailybruin/GoogleFormLink
EdNawrocki Nov 21, 2024
42e5ff7
New Deployment File
jishk11 Jan 24, 2025
76279be
Merge pull request #160 from dailybruin/New_GitHub_Action
EdNawrocki Jan 24, 2025
69aebf0
new deployment file
jishk11 Jan 31, 2025
58fcc7c
Merge pull request #162 from dailybruin/New_GitHub_Action
EdNawrocki Jan 31, 2025
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
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ name: Deploy
on:
push:
branches: [master]
workflow_dispatch:

jobs:
build:
runs-on: self-hosted

strategy:
matrix:
node-version: [10.x, 12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2 # on the runner, check out this code on
Expand All @@ -26,3 +27,4 @@ jobs:
- run: pm2 reload flamingo # reloads on the DigitalOcean droplet
env:
CI: true
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
58 changes: 58 additions & 0 deletions .github/workflows/new_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy

on:
push:
branches: [master]
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: yarn install

- name: Build project
run: yarn build

- name: Set up Docker
uses: docker/setup-buildx-action@v3

- name: Log in to DigitalOcean
run: echo "${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}" | docker login -u "doctl" --password-stdin registry.digitalocean.com

- name: Build and push Docker image
run: |
docker buildx build --platform linux/amd64,linux/arm64 \
--tag registry.digitalocean.com/dailybruin/dbonline:latest \
--push .

- name: Install doctl
run: |
curl -sL https://github.com/digitalocean/doctl/releases/download/v1.99.0/doctl-1.99.0-linux-amd64.tar.gz | tar -xzv
sudo mv doctl /usr/local/bin/

- name: Authenticate doctl
run: |
doctl auth init --access-token ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: Write kubeconfig to file
run: |
echo "${{ secrets.KUBECONFIG }}" > kubeconfig.yaml

- name: Update Kubernetes deployment
env:
KUBECONFIG: kubeconfig.yaml
run: |
kubectl set image deployment/flamingo flamingo=registry.digitalocean.com/dailybruin/dbonline:latest
kubectl rollout status deployment/flamingo

18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:16.20.2

RUN apt-get update && apt-get install -y \
yarn

WORKDIR /usr/src/flamingo

COPY .next ./.next

COPY node_modules ./node_modules

COPY package.json .

COPY yarn.lock .

EXPOSE 1919

CMD ["yarn", "deploy"]
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

yarn build
docker build --platform="linux/amd64" -t registry.digitalocean.com/dailybruin/flamingotestedamd64:latest .
docker push registry.digitalocean.com/dailybruin/flamingotestedamd64:latest
3 changes: 1 addition & 2 deletions components/Article/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import Link from "next/link";
/** @jsx jsx */
/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
import moment from "moment";

Expand All @@ -25,7 +25,6 @@ export default class Article extends React.Component {
// quick patch to prevent attempting to load an author that was not properly fetched.
continue;
}
console.log(author);
authorPictures.push(
<a href={`/author/${author.slug}`}>
<img
Expand Down
160 changes: 160 additions & 0 deletions components/ArticleCard/Breaking.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
import * as React from "react";
import Link from "next/link";
/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
import * as globals from "../globals";
import * as locals from "./locals";
import * as utilities from "./utilities";
import * as moment from "moment";

export default function Breaking(props) {
var CurrentTime = new Date();
var PostTime = new Date(props.date);
var DiffInMilliseconds = CurrentTime - PostTime;
var TotalMinutes = Math.floor(DiffInMilliseconds / (1000 * 60));
var DiffInDays = Math.floor(TotalMinutes / (60 * 24));
var DiffInHours = Math.floor((TotalMinutes % (60 * 24)) / 60);
var DiffInMinutes = TotalMinutes % 60;

var TimeDiff = "";
if (DiffInDays != 0) {
TimeDiff += DiffInDays + " Day" + (DiffInDays != 1 ? "s" : "") + ", ";
}
if (DiffInHours != 0) {
TimeDiff += DiffInHours + " Hour" + (DiffInHours != 1 ? "s" : "") + ", ";
}
TimeDiff += DiffInMinutes + " Minute" + (DiffInMinutes != 1 ? "s" : "") + " Ago";

return (
<div
css={css`
display: flex;
flex-wrap: wrap;
box-shadow: ${globals.cardShadow};
padding: 0px;
background-color: #ffffff;
/*border: 10px solid #d12008;*/
border-radius: 20px;
width: 100%;
`}
>
<div
css={css`
padding: 20px;
padding-bottom: 5px;
padding-top: 5px;
width: 100%;
`}
>
<span>
<span>
<h3
css={css`
margin: 0;

font-family: ${globals.bodyFont};
font-style: normal;
font-weight: bold;
font-size: 11px;
display: inline;
margin-right: 4px;
color: #000000;`}
>
{utilities.renderAuthors(props.authors)}
</h3>
</span>

<span
css={css`
margin: 0 5px 0 0;
font-family: ${globals.bodyFont};
font-style: normal;
font-weight: 300;
font-size: 11px;
line-height: 14px;
display: inline;
`}
>
{PostTime.toLocaleString()}
</span>
<span
css={css`
border-left: 1px solid #000;
padding-left: 4px;
font-family: ${globals.bodyFont};
font-style: normal;
font-weight: 300;
font-size: 11px;
line-height: 14px;
`}
>
{TimeDiff}
</span>
</span>
<div
css={css`
margin: 2px 0 4px;
font-family: 'DM Serif Text', serif;\n font-style: normal;\n font-weight: bold;\n font-size: 1.5rem;\n line-height: 1.25;\n color: #000000;\n
`}
style={{
fontStyle:
props.acf.db_article_format == "column" ? "italic" : "normal"
}}
dangerouslySetInnerHTML={{ __html: props.headline }}
/>
<div
css={css`
margin: 0 0 5px;
font-family: 'Roboto', serif;\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n color: #000000;\n\n
`}
dangerouslySetInnerHTML={{ __html: props.content }}
/>
</div>
{props.imageurl != "http://wp.dailybruin.com/images/2017/03/db-logo.png" &&

<div
css={css`
height: 100%;
width: 100%;
padding-top: 66.66%;
overflow: hidden;
position: relative;
`}
>
<img
css={css`
height: 100%;
width: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
object-fit: cover;
padding: 20px;
padding-top: 0px;
padding-bottom: 10px;
`}
src={props.imageurl}
/>
</div>
/* <h4
css={css`
display: block;
margin: 2px 0 0;

font-family: Arimo;
font-style: normal;
font-weight: normal;
font-size: 8px;
text-align: right;

color: #000000;
`}
>
{props.photographer}
</h4> */
}

</div>
);
}
102 changes: 102 additions & 0 deletions components/ArticleCard/BreakingOverview.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import * as React from "react";
import Link from "next/link";
/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
import * as globals from "../globals";
import * as locals from "./locals";
import * as utilities from "./utilities";
import * as moment from "moment";

export default function BreakingOverview(props) {
return (
<div
css={css`
display: flex;
flex-wrap: wrap;
box-shadow: ${globals.cardShadow};
padding: 0px;
background-color: #ffffff;
border: 2px solid #d12008;
border-radius: 20px;
width: 100%;
position: sticky;
`}
>
<div
css={css`
padding: 20px;
padding-bottom: 5px;
padding-top: 5px;
width: 100%;
`}
>
<span>
<span>
<h3
css={css`
margin: 0;
font-family: 'DM Serif Text', serif;\n font-style: normal;\n font-weight: bold;\n font-size: 1.5rem;\n line-height: 1.25;\n color: #000000;\n
font-size: 1.3rem;
display: inline;
`}
>
{"What we're covering here"}
</h3>
</span>
</span>
<div
css={css`
margin: 10px 0 5px;
font-family: 'Roboto', serif;\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n color: #000000;\n\n
`}
dangerouslySetInnerHTML={{ __html: props.excerpt }}
/>
</div>
{props.imageurl != "http://wp.dailybruin.com/images/2017/03/db-logo.png" &&

<div
css={css`
height: 100%;
width: 100%;
padding-top: 66.66%;
overflow: hidden;
position: relative;
`}
>
<img
css={css`
height: 100%;
width: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
object-fit: cover;
padding: 20px;
padding-top: 0px;
padding-bottom: 10px;
`}
src={props.imageurl}
/>
</div>
/* <h4
css={css`
display: block;
margin: 2px 0 0;

font-family: Arimo;
font-style: normal;
font-weight: normal;
font-size: 8px;
text-align: right;

color: #000000;
`}
>
{props.photographer}
</h4> */
}

</div>
);
}
2 changes: 1 addition & 1 deletion components/ArticleCard/Full.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import Link from "next/link";
/** @jsx jsx */
/** @jsxImportSource @emotion/react */
import { css, jsx } from "@emotion/core";
import * as globals from "../globals";
import * as locals from "./locals";
Expand Down
Loading