Skip to content

Commit

Permalink
Make first ad come first, remove old ads
Browse files Browse the repository at this point in the history
  • Loading branch information
leomet07 committed Dec 4, 2023
1 parent cfe7f16 commit 61e1220
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
10 changes: 0 additions & 10 deletions advertisements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ const advertisements = [
image_src: "/images/ads/kweller_prep.png",
url: "https://www.kwellerprep.com/",
},
{
name: "Don't Sweat the Essay!",
image_src: "/images/ads/dont_sweat_the_essay.png",
url: "https://www.dontsweattheessay.com/?utm_source=Stuyvesant&utm_medium=SpectatorWeb&utm_campaign=Spring2022",
},
{
name: "Now Test Prep",
image_src: "/images/ads/ntp_test_prep.jpg",
Expand All @@ -19,10 +14,5 @@ const advertisements = [
image_src: "/images/ads/contest_math_tutoring.jpg",
url: "https://contestmathtutoring.com/",
},
{
name: "Crimson Education",
image_src: "/images/ads/crimson_education.png",
url: "https://www.crimsoneducation.org/us/campaign/april-13-us-10-things-top-colleges-look-for-with-martin-walsh-registration/",
},
];
export default advertisements;
10 changes: 5 additions & 5 deletions components/MixedArticleDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default function MixedArticleDisplay(props: {
props.display_department
}
/>
{index % ad_spacing == 0 && index != 0 ? (
{index % ad_spacing == 0 ? (
<div className={styles.ad_parent}>
<Advertisment
index={index / ad_spacing}
Expand Down Expand Up @@ -247,10 +247,10 @@ export default function MixedArticleDisplay(props: {
props.display_department
}
/>
{index % ad_spacing == 0 ? (
{index % ad_spacing == 1 ? (
<div className={styles.ad_parent}>
<Advertisment
index={index / ad_spacing + 2}
index={Math.floor(index / ad_spacing) + 2}
/>
</div>
) : (
Expand All @@ -271,10 +271,10 @@ export default function MixedArticleDisplay(props: {
props.display_department
}
/>
{index % ad_spacing == 0 && index != 0 ? (
{index % ad_spacing == 1 && index != 0 ? (
<div className={styles.ad_parent}>
<Advertisment
index={index / ad_spacing}
index={Math.floor(index / ad_spacing)}
/>
</div>
) : (
Expand Down
Binary file removed public/images/ads/crimson_education.png
Binary file not shown.
Binary file removed public/images/ads/dont_sweat_the_essay.png
Binary file not shown.

0 comments on commit 61e1220

Please sign in to comment.