Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
Format code to have consistent indentation. Remove markdownToHTML.ts as it's not used. Remove unused imports. Remove dependencies on remark and remark-html as they are only used in markdownToHTML.ts.
  • Loading branch information
pigrammer3 committed Dec 30, 2023
1 parent 0fc904f commit fbfe932
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 469 deletions.
28 changes: 13 additions & 15 deletions app/awards/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import styles from "./styles.module.css";
import Image from "next-image-export-optimizer";
import Link from "next/link";
import { ExternalLink } from "react-feather";
import PageTitle from "../../components/page-title";
import competition from "../../images/index/competition.jpeg";
import entrepreneurship from "../../images/index/week2-team-photo.jpg";
Expand Down Expand Up @@ -41,7 +39,7 @@ export default function Awards() {
</div>

<div className={`container cols1_1 ${styles.stat}`}>
<div className = { styles.right_side_border } >
<div className = { styles.right_side_border } >
<Image src={winners} alt="Winners Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}> This award is presented to the alliance that wins the event.</p>
</div>
Expand All @@ -56,14 +54,14 @@ export default function Awards() {
<div className={styles.number} > x2 </div>
<div className={styles.label} > Event Finalists </div>
</div>
< div className = { styles.left_side_border } >
< div className = { styles.left_side_border } >
<Image src={finalist} alt="Finalist Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Finalist Award celebrates the alliance that makes it to the final match of the competition.</p>
</div>
</div>

<div className={`container cols1_1 ${styles.stat}`}>
<div className = { styles.right_side_border } >
<div className = { styles.right_side_border } >
<Image src={impact} alt="Impact Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The FIRST Impact Award honors the team that best represents a model for other teams to emulate and best embodies the mission of FIRST. It focuses on the ultimate goal of transforming the world in ways that will inspire greater levels of respect and honor for science and technology, as well as encouraging more of today’s youth to become science and technology leaders. </p>
</div>
Expand All @@ -78,14 +76,14 @@ export default function Awards() {
<div className={styles.number} > x3 </div>
<div className={styles.label} > Creativity Award </div>
</div>
< div className = { styles.left_side_border } >
< div className = { styles.left_side_border } >
<Image src={creativity} alt="Creativity Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Creativity Award celebrates creativity that enhances strategy of play and was intentionally designed and not discovered. The creative element’s uniqueness has a practical application and contributes to the objectives of the competition.</p>
</div>
</div>

<div className={`container cols1_1 ${styles.stat}`}>
<div className = { styles.right_side_border } >
<div className = { styles.right_side_border } >
<Image src={entrepreneurship} alt="Entrepreneurship Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Entrepreneurship Award celebrates a team that integrates sustainable, professional design into the structure and management of the team.</p>
</div>
Expand All @@ -100,13 +98,13 @@ export default function Awards() {
<div className={styles.number} > x2 </div>
<div className={styles.label} > Engineering Inspiration Award </div>
</div>
< div className = { styles.left_side_border } >
< div className = { styles.left_side_border } >
<Image src={engineering} alt="Engineering Inspiration Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Engineering Inspiration Award celebrates outstanding success in advancing respect and appreciation for engineering within a team’s school or organization and community. The team demonstrates a commitment to science and technology education among the team, school, and community, and achievement of the FIRST mission and ability to communicate that at the competition and away from it.</p>
</div>
</div>
<div className={`container cols1_1 ${styles.stat}`}>
<div className = { styles.right_side_border } >
<div className = { styles.right_side_border } >
<Image src={quality} alt="Quality Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Quality Award celebrates machine robustness in concept and fabrication. The entire machine demonstrates quality: workmanship, welds, attachment systems, wiring, paint, etc, that allow it to withstand the rigors of competition – maintaining functionality, including the use of designed-in redundancy and risk mitigation measures.</p>
</div>
Expand All @@ -121,14 +119,14 @@ export default function Awards() {
<div className={styles.number} > </div>
<div className={styles.label} > Excellence in Engineering Award </div>
</div>
< div className = { styles.left_side_border } >
< div className = { styles.left_side_border } >
<Image src={engineering_2} alt="Excellence in Engineering Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Excellence in Engineering Award celebrates the team that demonstrates a professional approach to the design process. The designs reflect an engineering solution to a specific problem and are elegant and advantageous on the field of play. </p>
</div>
</div>

<div className={`container cols1_1 ${styles.stat}`}>
<div className = { styles.right_side_border } >
<div className = { styles.right_side_border } >
<Image src={innovation} alt="Innovation Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Innovation in Control Award celebrates an innovative control system or application of control components – electrical, mechanical or software – to provide unique machine functions. The control system is innovative and unique. It is integrated with the machine, human players, strategy, etc. in concept and execution. The innovation is practical; it addresses the game’s challenge and is reliable under the stress of competition. </p>
</div>
Expand All @@ -143,14 +141,14 @@ export default function Awards() {
<div className={styles.number} > </div>
<div className={styles.label} > Sportsmanship Award </div>
</div>
< div className = { styles.left_side_border } >
< div className = { styles.left_side_border } >
<Image src={sportsmanship} alt="Sportsmanship Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Sportsmanship Award celebrates the team that exemplifies Coopertition and Gracious Professionalism in competition.</p>
</div>
</div>

<div className={`container cols1_1 ${styles.stat}`}>
<div className = { styles.right_side_border } >
<div className = { styles.right_side_border } >
<Image src={defense} alt="Defense Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Defense Award celebrates a member of an alliance that provides invaluable and strong defense.</p>
</div>
Expand All @@ -165,11 +163,11 @@ export default function Awards() {
<div className={styles.number} > </div>
<div className={styles.label} > Rookie All-Star Award </div>
</div>
< div className = { styles.left_side_border } >
< div className = { styles.left_side_border } >
<Image src={competition} alt="Rookie Award Photo" className={`responsive-image brand-border ${styles.awardPhoto}`} />
<p className={styles.awardText}>The Rookie All-Star award celebrates the rookie team exemplifying a young but strong partnership effort, as well as implementing the mission of FIRST to inspire students to learn more about science and technology.</p>
</div>
</div>
</section>
</main>);
}
}
3 changes: 1 addition & 2 deletions app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import {
getPreviousPost,
getNextPost,
} from "../../../lib/api";
import markdownToHtml from "../../../lib/markdownToHTML";
import styles from "./styles.module.css";
import Image from "next-image-export-optimizer";
import Link from "next/link";
import ReactMarkdown from "react-markdown";
import { ArrowLeftCircle, ArrowRightCircle } from "react-feather";

export default async function Page({ params }) {
export default async function Page({ params }: { params: { slug: string }}) {
const { slug } = params;

const getPost = getPostBySlug(`${slug}.md`, [
Expand Down
12 changes: 6 additions & 6 deletions app/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { getAllPosts, getPostSlugs, getPostBySlug } from "../../lib/api";
import { getAllPosts } from "../../lib/api";
import PostPreview from "../../components/postPreview";
import PageTitle from "../../components/page-title";
import styles from "./styles.module.css";
Expand All @@ -14,16 +14,16 @@ export default function Posts() {
<div className={styles.section}>
<PageTitle>All Posts</PageTitle>
<div className = {styles.posts}>
{posts.map((post) => (
{posts.map((post) => (
<div>
<PostPreview post= { post } />
<PostPreview post= { post } />
</div>
))
}
}
</div>
</div>


</main>
</div>
);
Expand Down
8 changes: 2 additions & 6 deletions app/history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,13 @@ export default function History () {
</div>
<div className = {styles.event}>
<h3>Off-Season 2: </h3>
< Link href = "https://www.thebluealliance.com/event/2023matb" className = "link"> 2023 New England Robotics Derby (N.E.R.D.)</Link>
< Link href = "https://www.thebluealliance.com/event/2023matb" className = "link"> 2023 New England Robotics Derby (N.E.R.D.)</Link>
</div>
</div>
</div>
<div>
<Image className={`responsive-image brand-border ${styles.robotPhoto}`} src={llama} alt="2023 Robot (Llama)" />
<h3 className={styles.robotName}> Robot: <i>Llama</i></h3>
{/* <p className={styles.blurb}> Lorem ipsum dolor sit amet, consectetur adipiscing elit.Sed quis vestibulum magna, sit amet ornare justo.</p> */}
</div>
</div>
</section>
Expand All @@ -96,7 +95,6 @@ export default function History () {
<div>
<Image className={`responsive-image brand-border ${styles.robotPhoto}`} src={lobstah} alt="2022 Robot (Lobstah)" />
<h3 className={styles.robotName}> Robot: <i>Lobstah</i></h3>
{/* <p className={styles.blurb}> Lorem ipsum dolor sit amet, consectetur adipiscing elit.Sed quis vestibulum magna, sit amet ornare justo.</p> */}
</div>
</div>
</section>
Expand All @@ -119,7 +117,6 @@ export default function History () {
<div>
<Image className={`responsive-image brand-border ${styles.robotPhoto}`} src={popcorn} alt="2020 Robot (Popcorn)" />
<h3 className={styles.robotName}> Robot: <i>Popcorn</i></h3>
{/* <p className={styles.blurb}> Lorem ipsum dolor sit amet, consectetur adipiscing elit.Sed quis vestibulum magna, sit amet ornare justo.</p> */}
</div>
</div>
</section>
Expand Down Expand Up @@ -150,14 +147,13 @@ export default function History () {
<div>
<Image className={`responsive-image brand-border ${styles.robotPhoto}`} src={burrito} alt="2019 Robot (Burrito)" />
<h3 className={styles.robotName}> Robot: <i>Burrito</i></h3>
{/* <p className={styles.blurb}> Lorem ipsum dolor sit amet, consectetur adipiscing elit.Sed quis vestibulum magna, sit amet ornare justo.</p> */}
</div>
</div>
<div className="container">
<Link href="https://www.thebluealliance.com/team/246/history" className="button">View Full History</Link>
</div>
</section>

</main>
);
}
76 changes: 38 additions & 38 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Instagram } from "react-feather";
import { Youtube } from "react-feather";
import { ArrowRight } from "react-feather";
import SponsorsSection from "../components/sponsors-section";
import { getAllPosts, getPostSlugs, getPostBySlug } from "../lib/api";
import { getAllPosts } from "../lib/api";
import PostPreview from "../components/postPreview";

export default function Page () {
Expand Down Expand Up @@ -52,33 +52,33 @@ export default function Page () {
<Image src={eventPhoto} alt="2023 Event Photo" className="responsive-image brand-border" />
</div>
<div className = {styles.event}>
<div className={styles.eventLinks}>
<div className={styles.link}>
<h3>Event 1:</h3>
<Link href="https://www.thebluealliance.com/event/2023week0" className="link">2023 Week 0 in Nashua, NH</Link>
<div className={styles.eventLinks}>
<div className={styles.link}>
<h3>Event 1:</h3>
<Link href="https://www.thebluealliance.com/event/2023week0" className="link">2023 Week 0 in Nashua, NH</Link>
</div>
<div className={styles.link}>
<h3>Event 2:</h3>
<Link href="https://www.thebluealliance.com/event/2023rinsc" className="link">2023 New England District Rhode Island Event</Link>
</div>
<div className={styles.link}>
<h3>Event 3:</h3>
<Link href="https://www.thebluealliance.com/event/2023mabos" className="link">2023 New England District Greater Boston Event</Link>
</div>
<div className={styles.link}>
<h3>Event 4:</h3>
<Link href="https://www.thebluealliance.com/event/2023necmp2" className="link">2023 New England FIRST District Championships - Wilson Division</Link>
</div>
</div>
<div className={styles.link}>
<h3>Event 2:</h3>
<Link href="https://www.thebluealliance.com/event/2023rinsc" className="link">2023 New England District Rhode Island Event</Link>
</div>
<div className={styles.link}>
<h3>Event 3:</h3>
<Link href="https://www.thebluealliance.com/event/2023mabos" className="link">2023 New England District Greater Boston Event</Link>
</div>
<div className={styles.link}>
<h3>Event 4:</h3>
<Link href="https://www.thebluealliance.com/event/2023necmp2" className="link">2023 New England FIRST District Championships - Wilson Division</Link>
<div className = {styles.buttons}>
<div className={styles.leftButtonRow}>
<Link href="/history" className="button">Past Events <ArrowRight /></Link>
< Link href = "/awards" className = "button"> Check Out Our Awards< ArrowRight /> </Link>
</div>
</div>
</div>
<div className = {styles.buttons}>
<div className={styles.leftButtonRow}>
<Link href="/history" className="button">Past Events <ArrowRight /></Link>
< Link href = "/awards" className = "button"> Check Out Our Awards< ArrowRight /> </Link>
</div>
</div>
</div>
</div>


</section>
<section className="bg-gray">
<div className="container section">
Expand All @@ -87,25 +87,25 @@ export default function Page () {
{
posts.map((post) => (
<div className = {styles.postCard}>
<PostPreview post= { post } />
<PostPreview post= { post } />
</div>
))
}
</div>

<div className = {styles.buttonRow}>
<div className = {styles.leftButtonRow}>
<div className = {styles.follow}>Follow Us:</div>
<div className={styles.mediaIcons}>
<Link href="https://twitter.com/" target="_blank"><Twitter className={styles.mediaIcon} /></Link>
<Link href="https://www.instagram.com/burobotics246/?hl=en" target="_blank"><Instagram className={styles.mediaIcon} /></Link>
<Link href="https://www.youtube.com/@burobotics/" target="_blank"><Youtube className={styles.mediaIcon} /></Link>
</div>
</div>
<div className={styles.rightButtonRow}>
<Link href="/blog" className="button"> More Posts <ArrowRight /></Link>
<Link href = "/gallery" className = "button" > Team Gallery <ArrowRight /></Link>
</div>
<div className = {styles.leftButtonRow}>
<div className = {styles.follow}>Follow Us:</div>
<div className={styles.mediaIcons}>
<Link href="https://twitter.com/" target="_blank"><Twitter className={styles.mediaIcon} /></Link>
<Link href="https://www.instagram.com/burobotics246/?hl=en" target="_blank"><Instagram className={styles.mediaIcon} /></Link>
<Link href="https://www.youtube.com/@burobotics/" target="_blank"><Youtube className={styles.mediaIcon} /></Link>
</div>
</div>
<div className={styles.rightButtonRow}>
<Link href="/blog" className="button"> More Posts <ArrowRight /></Link>
<Link href = "/gallery" className = "button" > Team Gallery <ArrowRight /></Link>
</div>
</div>
</div>
</section>
Expand Down
24 changes: 12 additions & 12 deletions components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ export default function Footer () {
</div>
<nav className = "cols1_1">
<div>
<ul className={styles.footerLinks}>
<li className = {styles.footerLink}><Link href="/blog" > Posts </Link></li>
<li className = {styles.footerLink}><Link href="/history">Past Seasons</Link></li>
<li className = {styles.footerLink}><Link href="/awards" > Awards </Link></li >
<li className = {styles.footerLink}><Link href="/team">Our Team</Link></li>
</ul>
<ul className={styles.footerLinks}>
<li className = {styles.footerLink}><Link href="/blog" > Posts </Link></li>
<li className = {styles.footerLink}><Link href="/history">Past Seasons</Link></li>
<li className = {styles.footerLink}><Link href="/awards" > Awards </Link></li >
<li className = {styles.footerLink}><Link href="/team">Our Team</Link></li>
</ul>
</div>
<div>
<ul className={styles.footerLinks}>
<li className = {styles.footerLink}><Link href="/sponsors">Sponsors</Link></li>
<li className = {styles.footerLink}><Link href="/gallery">Gallery</Link></li>
<li className = {styles.footerLink}><Link href="/contact">Contact</Link></li>
<li className = {styles.footerLink}><Link href="/support" > Support Us </Link></li >
</ul>
<li className = {styles.footerLink}><Link href="/sponsors">Sponsors</Link></li>
<li className = {styles.footerLink}><Link href="/gallery">Gallery</Link></li>
<li className = {styles.footerLink}><Link href="/contact">Contact</Link></li>
<li className = {styles.footerLink}><Link href="/support" > Support Us </Link></li >
</ul>
</div>

</nav>
</div>
</div>
Expand Down
Loading

0 comments on commit fbfe932

Please sign in to comment.