{name}
+{short}
+diff --git a/.drone.yml b/.drone.yml index bca0b8ce..61536adf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,35 +1,52 @@ --- kind: pipeline type: docker -name: node14 +name: node16 steps: +- name: check-lockfile + image: node:16 + commands: + - node ./check-lockfile.js + - name: install-deps - image: node:14 + image: node:16 + depends_on: + - check-lockfile commands: - npm install - name: lint - image: node:14 + image: node:16 depends_on: - install-deps commands: - npm run lint - name: build - image: node:14 + image: node:16 depends_on: - install-deps commands: - npm run build - name: export - image: node:14 + image: node:16 depends_on: - build commands: - npm run export +- name: deploy (staging) + image: node:16 + depends_on: + - export + environment: + TOKEN: + from_secret: STAGING_TOKEN + commands: + - 'curl -XPOST -H "Authorization: $TOKEN" -H "X-Branch: $DRONE_BRANCH" "https://csclub.uwaterloo.ca/~a3thakra/update-csc/"' + trigger: event: exclude: diff --git a/.eslintrc.js b/.eslintrc.js index 7a1058de..7beb8793 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,6 +9,9 @@ module.exports = { "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:import/errors", + "plugin:import/warnings", + "plugin:import/typescript", "plugin:react/recommended", "plugin:prettier/recommended", ], @@ -16,12 +19,37 @@ module.exports = { rules: { "prettier/prettier": "error", + "import/first": "error", + "import/order": [ + "error", + { + "newlines-between": "always", + "alphabetize": { + "order": "asc", + "caseInsensitive": true, + }, + "pathGroups": [ + { + "pattern": "@/**", + "group": "external", + "position": "after", + }, + { + "pattern": "./*.css", + "group": "index", + "position": "after", + } + ], + }, + ], + "react/prop-types": "off", "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "error", // Turn off these rules "@typescript-eslint/explicit-module-boundary-types": "off", + "import/no-unresolved": "off", }, settings: { react: { diff --git a/.vscode/settings.json b/.vscode/settings.json index 68d9b3b3..4867b9a0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,9 +4,7 @@ "eslint.codeActionsOnSave.mode": "all", "[css]": { "editor.suggest.insertMode": "replace", - "gitlens.codeLens.scopes": [ - "document" - ], + "gitlens.codeLens.scopes": ["document"], "editor.formatOnSave": true }, "[javascript]": { @@ -38,5 +36,10 @@ "files.exclude": { "node_modules": true }, - "editor.tabSize": 2 -} \ No newline at end of file + "editor.tabSize": 2, + "files.eol": "\n", + "[markdown]": { + "editor.wordWrap": "on", + "editor.quickSuggestions": false + } +} diff --git a/check-lockfile.js b/check-lockfile.js new file mode 100644 index 00000000..5215c499 --- /dev/null +++ b/check-lockfile.js @@ -0,0 +1,10 @@ +const lockfile = require('./package-lock.json') + +if (lockfile.lockfileVersion !== 2) { + console.error(` +Please upgrade to npm v7 and revert changes to the lockfile. + +- \`npm i -g npm\` to upgrade. +`.trim()) + process.exit(1) +} \ No newline at end of file diff --git a/components/Bubble.module.css b/components/Bubble.module.css index 3e0fc144..638c93b7 100644 --- a/components/Bubble.module.css +++ b/components/Bubble.module.css @@ -1,7 +1,71 @@ -.bubble { +.container { + position: relative; padding: calc(36rem / 16) 0; + overflow-x: clip; } -.bubble:nth-child(odd) { - background-color: var(--blue-1-20); +.bubble { + --border-radius: calc(5000rem / 16); + + display: flex; + flex-direction: row; + position: absolute; + top: 0; + height: 100%; + width: 100%; + justify-content: center; + align-items: flex-start; +} + +.bar { + height: 100%; + width: 100%; +} + +.decoration { + display: none; + width: calc(128rem / 16); +} + +.margin { + display: none; +} + +.content { + position: relative; + z-index: 1; +} + +.container:nth-child(odd) .bar { + background-color: var(--primary-accent-light); +} + +@media only screen and (min-width: calc(1350rem / 16)) { + .container:nth-child(odd) .decoration { + display: block; + position: absolute; + } + + .container:nth-child(4n + 1) .bar { + border-top-right-radius: var(--border-radius); + border-bottom-right-radius: var(--border-radius); + transform: translateX(-12.5vw); + } + + .container:nth-child(4n + 1) .decoration { + top: calc(-50rem / 16); + right: 8vw; + } + + .container:nth-child(4n + 3) .bar { + border-top-left-radius: var(--border-radius); + border-bottom-left-radius: var(--border-radius); + transform: translateX(12.5vw); + } + + .container:nth-child(4n + 3) .decoration { + top: calc(-50rem / 16); + left: 8vw; + transform: rotateY(180deg); + } } diff --git a/components/Bubble.tsx b/components/Bubble.tsx index 39d7094b..54691079 100644 --- a/components/Bubble.tsx +++ b/components/Bubble.tsx @@ -1,11 +1,24 @@ import React from "react"; + +import { Image } from "@/components/Image"; + import { DefaultLayout } from "./DefaultLayout"; + import styles from "./Bubble.module.css"; -export default function Bubble(props: { children: React.ReactNode }) { +export function Bubble(props: { children: React.ReactNode }) { return ( -
;
+}
diff --git a/components/ConnectWithUs.module.css b/components/ConnectWithUs.module.css
index 8160a48d..f2d940f5 100644
--- a/components/ConnectWithUs.module.css
+++ b/components/ConnectWithUs.module.css
@@ -1,8 +1,7 @@
.header {
- color: var(--blue-2);
+ color: var(--primary-accent);
font-weight: 600;
font-size: calc(36rem / 16);
- margin-bottom: calc(12rem / 16);
}
.socialLinks {
diff --git a/components/ConnectWithUs.tsx b/components/ConnectWithUs.tsx
index cef31144..7e9d333b 100644
--- a/components/ConnectWithUs.tsx
+++ b/components/ConnectWithUs.tsx
@@ -1,7 +1,9 @@
import React from "react";
-import styles from "./ConnectWithUs.module.css";
-import { SocialLinks } from "./SocialLinks";
+
import { Link } from "./Link";
+import { SocialLinks } from "./SocialLinks";
+
+import styles from "./ConnectWithUs.module.css";
export function ConnectWithUs() {
return (
diff --git a/components/DefaultLayout.module.css b/components/DefaultLayout.module.css
index 31cadd0b..5b18ff5f 100644
--- a/components/DefaultLayout.module.css
+++ b/components/DefaultLayout.module.css
@@ -2,5 +2,4 @@
margin: 0 auto;
max-width: calc(800rem / 16);
padding: 0 calc(20rem / 16);
- padding-bottom: calc(20rem / 16);
}
diff --git a/components/DefaultLayout.tsx b/components/DefaultLayout.tsx
index 1cc4fb4f..49992358 100644
--- a/components/DefaultLayout.tsx
+++ b/components/DefaultLayout.tsx
@@ -1,4 +1,5 @@
import React from "react";
+
import styles from "./DefaultLayout.module.css";
export function DefaultLayout(props: { children: React.ReactNode }) {
diff --git a/components/EmailSignup.module.css b/components/EmailSignup.module.css
index 0d9567c8..c44609b8 100644
--- a/components/EmailSignup.module.css
+++ b/components/EmailSignup.module.css
@@ -1,17 +1,13 @@
-.container form {
- box-sizing: border-box;
-}
-
.header {
- color: var(--blue-2);
+ color: var(--primary-accent);
font-weight: 600;
font-size: calc(36rem / 16);
- margin-bottom: calc(12rem / 16);
}
.button {
- margin-top: calc(34rem / 16);
+ margin-top: calc(26rem / 16);
display: block;
+ width: fit-content;
}
@media only screen and (max-width: calc(768rem / 16)) {
diff --git a/components/EmailSignup.tsx b/components/EmailSignup.tsx
index c5e3ba0e..064a3f13 100644
--- a/components/EmailSignup.tsx
+++ b/components/EmailSignup.tsx
@@ -1,19 +1,24 @@
import React from "react";
-import styles from "./EmailSignup.module.css";
+
import { Button } from "./Button";
-import { Input } from "./Input";
+
+import styles from "./EmailSignup.module.css";
export function EmailSignup() {
return (
+ Join our mailing list to receive email notifications about important + news and upcoming events! +
+{short}
- -View details {dropDownIcon}
+{short}
+