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

Enable Github Actions #370

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 13 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
33 changes: 33 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 3Brown1Blue

on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
format:
name: formatting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "19.6.0"
- run: yarn install
- run: yarn run check

lint:
name: linting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "19.6.0"
- run: yarn install
- run: yarn run lint
20 changes: 8 additions & 12 deletions .vscode/3blue1brown.code-snippets
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
// Place your 3blue1brown workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Place your 3blue1brown workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
Expand All @@ -18,9 +18,7 @@
"Figure": {
"scope": "markdown, mdx",
"prefix": "figure",
"body": [
"<Figure\n\timage=\"$1\" $2\n/>"
],
"body": ["<Figure\n\timage=\"$1\" $2\n/>"],
"description": "Insert a figure shortcode into markdown."
},
"Question": {
Expand All @@ -34,9 +32,7 @@
"Accordion": {
"scope": "markdown, mdx",
"prefix": "accordion",
"body": [
"<Accordion title=\"$1\">\n$7\n</Accordion>"
],
"body": ["<Accordion title=\"$1\">\n$7\n</Accordion>"],
"description": "Insert an accordion into markdown."
}
}
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"editor.wordWrap": "on"
}
"editor.wordWrap": "on"
}
14 changes: 9 additions & 5 deletions components/Announcement/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ Announcement.propTypes = {
hidden, enter showAnnouncements() into the devtools console.
*/

export default function Announcement({ id, headline, description, link, showCloseButton = true}) {
export default function Announcement({
id,
headline,
description,
link,
showCloseButton = true,
}) {
const [closedAnnouncements, setClosedAnnouncements] = useLocalStorage(
"closed-announcements",
[]
Expand All @@ -45,8 +51,7 @@ export default function Announcement({ id, headline, description, link, showClos
}

return (
(<Link href={link} className={styles.announcement}>

<Link href={link} className={styles.announcement}>
<div className={styles.center}>
<div className={styles.content}>
<div className={styles.headline}>{headline}</div>
Expand All @@ -66,8 +71,7 @@ export default function Announcement({ id, headline, description, link, showClos
</button>
)}
</div>

</Link>)
</Link>
);
}

Expand Down
6 changes: 2 additions & 4 deletions components/BookShelf/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default function BookShelf({ children }) {
return <div className={styles.bookShelf}>{children}</div>;
}

export function Book({ url, image, title, author=""}) {
export function Book({ url, image, title, author = "" }) {
return (
<div>
<a
Expand All @@ -16,9 +16,7 @@ export function Book({ url, image, title, author=""}) {
>
<img src={image} alt={title || ""} />
</a>
<a
href={url}
>
<a href={url}>
<div className={styles.title}> {title} </div>
</a>
<div className={styles.author}> {author ? "by " + author : ""} </div>
Expand Down
2 changes: 1 addition & 1 deletion components/BookShelf/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
justify-content: center;
font-size: 14px;
margin: 8px;
}
}
11 changes: 8 additions & 3 deletions components/ContactForms/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function TranslationForm() {
<Input name="video_url" label="Video URL:" />
<Input name="language" label="Language:" />
</InputRow>

<label className={styles.inputWrapper}>
<span className={styles.label}>Upload .srt file for subtitles:</span>
<input
Expand All @@ -149,7 +149,9 @@ export function TranslationForm() {
</label>

<label className={styles.inputWrapper}>
<span className={styles.label}>Upload .mp3 file for time-synced narration (optional):</span>
<span className={styles.label}>
Upload .mp3 file for time-synced narration (optional):
</span>
<input
className={styles.input}
type="file"
Expand All @@ -158,7 +160,10 @@ export function TranslationForm() {
/>
</label>

<Input name="links" label="Any social media links we should include when crediting you?" />
<Input
name="links"
label="Any social media links we should include when crediting you?"
/>

<Input name="message" label="Additional information:" />
</Form>
Expand Down
50 changes: 25 additions & 25 deletions components/FaqLinks/index.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
export default function FaqLinks(){
export default function FaqLinks() {
return (
<>
<a href="/faq#manim">Animations</a>
<span> &bull; </span>
<a href="/faq#requests">Requests</a>
<span> &bull; </span>
<a href="/faq#translations">Translations</a>
<span> &bull; </span>
<a href="/contact#licensing-inquiry">Licensing</a>
<span> &bull; </span>
<a href="/contact#speaking-inquiry">Speaking</a>
<span> &bull; </span>
<a href="/faq#sponsor">Sponsorships</a>
<span> &bull; </span>
<a href="/faq#name">Name</a>
<span> &bull; </span>
<a href="/faq#music">Music</a>
<span> &bull; </span>
<a href="/faq#recommendations">Recommendations</a>
<span> &bull; </span>
<a href="/faq#math-question">Math question</a>
<span> &bull; </span>
<a href="/faq#unsolved">Math results</a>
<span> &bull; </span>
<a href="/faq#advice">Advice for creators</a>
<a href="/faq#manim">Animations</a>
<span> &bull; </span>
<a href="/faq#requests">Requests</a>
<span> &bull; </span>
<a href="/faq#translations">Translations</a>
<span> &bull; </span>
<a href="/contact#licensing-inquiry">Licensing</a>
<span> &bull; </span>
<a href="/contact#speaking-inquiry">Speaking</a>
<span> &bull; </span>
<a href="/faq#sponsor">Sponsorships</a>
<span> &bull; </span>
<a href="/faq#name">Name</a>
<span> &bull; </span>
<a href="/faq#music">Music</a>
<span> &bull; </span>
<a href="/faq#recommendations">Recommendations</a>
<span> &bull; </span>
<a href="/faq#math-question">Math question</a>
<span> &bull; </span>
<a href="/faq#unsolved">Math results</a>
<span> &bull; </span>
<a href="/faq#advice">Advice for creators</a>
</>
);
};
}
1 change: 0 additions & 1 deletion components/Footer/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import SocialIcons from "../SocialIcons";
import styles from "./index.module.scss";

// footer component to show at bottom of every page
Expand Down
24 changes: 9 additions & 15 deletions components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@

// centered site title with logo and text
const Title = ({ big }) => (
(<Link href="/" className={styles.title}>

<Link href="/" className={styles.title}>
<Logo big={big} />
<Text />

</Link>)
</Link>
);

// site title text
Expand Down Expand Up @@ -66,7 +64,11 @@
tooltip="Interviews about math and education"
/>
<NavLink link="/blog" text="Blog" tooltip="Writing about math and more" />
<NavLink link="/extras" text="Extras" tooltip="Work elsewhere on the web" />
<NavLink
link="/extras"
text="Extras"
tooltip="Work elsewhere on the web"
/>

<div className={styles.break} />

Expand All @@ -75,16 +77,8 @@
text="Store"
tooltip="Notebooks, shirts, plushies, and more"
/>
<NavLink
link="/faq"
text="FAQ"
tooltip="Have a question?"
/>
<NavLink
link="/contact"
text="Contact"
tooltip="Email"
/>
<NavLink link="/faq" text="FAQ" tooltip="Have a question?" />
<NavLink link="/contact" text="Contact" tooltip="Email" />
<NavLink
link="/about"
text="About"
Expand All @@ -98,7 +92,7 @@
const NavLink = ({ link, text, icon, tooltip }) => (
<Link href={link} passHref legacyBehavior>
<Tooltip content={tooltip}>
<a className={styles.link}>

Check warning on line 95 in components/Header/index.js

View workflow job for this annotation

GitHub Actions / linting

The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
{text}
{icon && <i className={icon} />}
</a>
Expand Down
Loading
Loading