Navbar #2

Closed
opened 2021-04-25 15:53:38 -04:00 by a3thakra · 58 comments
a3thakra commented 2021-04-25 15:53:38 -04:00 (Migrated from git.uwaterloo.ca)

Create a Navbar and add it to _app.tsx to apply it to all pages.

Implement the dropdown for the Navbar as well.

It might be a good idea to use CSS position sticky for the Navbar

Create a Navbar and add it to _app.tsx to apply it to all pages. Implement the dropdown for the Navbar as well. It might be a good idea to use CSS position sticky for the Navbar
a3thakra commented 2021-04-25 15:55:42 -04:00 (Migrated from git.uwaterloo.ca)

changed the description

changed the description
q63xu commented 2021-04-26 18:34:27 -04:00 (Migrated from git.uwaterloo.ca)

Whoever is implementing this should build out both:

Desktop view:

image

Mobile view:

image

Whoever is implementing this should build out both: ## Desktop view: ![image](/uploads/3b5202bb9278f8295121b013152aa2c8/image.png) ## Mobile view: ![image](/uploads/3df0c71e50eb777131cf2609da74d3ee/image.png)
a258wang commented 2021-04-26 21:09:42 -04:00 (Migrated from git.uwaterloo.ca)

assigned to @a258wang

assigned to @a258wang
a3thakra commented 2021-05-08 02:58:18 -04:00 (Migrated from git.uwaterloo.ca)

changed the description

changed the description
a3thakra commented 2021-05-08 03:01:00 -04:00 (Migrated from git.uwaterloo.ca)

Let's not change this yet.

Let's not change this yet.
a3thakra commented 2021-05-08 03:28:49 -04:00 (Migrated from git.uwaterloo.ca)

requested review from @a3thakra

requested review from @a3thakra
a3thakra commented 2021-05-08 03:29:33 -04:00 (Migrated from git.uwaterloo.ca)

This should be in _app.css, and should be applied to all elements.

* {
  font-family: Poppins;
}
This should be in _app.css, and should be applied to all elements. ```css * { font-family: Poppins; } ```
a3thakra commented 2021-05-08 03:30:03 -04:00 (Migrated from git.uwaterloo.ca)

🤔 hmm....

:thinking: hmm....
a3thakra commented 2021-05-08 15:34:02 -04:00 (Migrated from git.uwaterloo.ca)

The style element must be in the <head> tag. @a258wang is working on using fonts correctly for everyone #23

The `style` element must be in the `<head>` tag. @a258wang is working on using fonts correctly for everyone #23
a3thakra commented 2021-05-08 15:35:53 -04:00 (Migrated from git.uwaterloo.ca)

We should use the <article> tag over here, instead of a <div> because it's semantically better.

We should use the `<article>` tag over here, instead of a `<div>` because it's semantically better.
a3thakra commented 2021-05-08 15:46:00 -04:00 (Migrated from git.uwaterloo.ca)

This is a heading, and we should be using semantic html tags. This looks like an h3 (Page heading (h1) -> News (h2) -> Date (h3)

This is a heading, and we should be using semantic html tags. This looks like an `h3` (Page heading (h1) -> News (h2) -> Date (h3)
a3thakra commented 2021-05-08 15:46:15 -04:00 (Migrated from git.uwaterloo.ca)
Wrap this with a time tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time
a3thakra commented 2021-05-08 15:56:37 -04:00 (Migrated from git.uwaterloo.ca)
Use the `<address>` tag to wrap author: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address
a3thakra commented 2021-05-08 16:02:33 -04:00 (Migrated from git.uwaterloo.ca)

Use named exports instead.

Benefits:

  • Reduce typos while importing (eg: it's totally valid to do import NewsCrad from 'components/NewsCard', but notice that we accidentally misspelled NewsCard)
  • Tools can provide auto import suggestions

How to use named exports?

  • export const NewsCard .... on line 12. (preferred)
  • export {NewsCard}
Use named exports instead. Benefits: - Reduce typos while importing (eg: it's totally valid to do `import NewsCrad from 'components/NewsCard'`, but notice that we accidentally misspelled `NewsCard`) - Tools can provide auto import suggestions How to use named exports? - `export const NewsCard ....` on line 12. (preferred) - `export {NewsCard}`
a3thakra commented 2021-05-08 16:10:56 -04:00 (Migrated from git.uwaterloo.ca)

The mobile version does not have a white background. Let's only change the background color in a media query.

Resources:

The mobile version does not have a white background. Let's only change the background color in a media query. Resources: - https://css-tricks.com/a-complete-guide-to-css-media-queries/ - https://css-tricks.com/snippets/css/media-queries-for-standard-devices/ (you don't need to add a media query for each and every device, so feel free to fix and match)
a3thakra commented 2021-05-08 16:24:43 -04:00 (Migrated from git.uwaterloo.ca)

Use rem (and not px) for font size and spacing. 16px = 1rem.

Use `rem` (and not `px`) for font size and spacing. `16px = 1rem`.
a3thakra commented 2021-05-08 16:26:40 -04:00 (Migrated from git.uwaterloo.ca)

This might work when props.children is a string, but let's not do this if props.children is a ReactElement.

This might work when `props.children` is a `string`, but let's not do this if `props.children` is a `ReactElement`.
a3thakra commented 2021-05-08 16:27:14 -04:00 (Migrated from git.uwaterloo.ca)

#23 @a258wang is doing this.

#23 @a258wang is doing this.
a3thakra commented 2021-05-08 16:53:09 -04:00 (Migrated from git.uwaterloo.ca)

Most of the comments are for using semantic html over generic elements. Good job overall!

Most of the comments are for using semantic html over generic elements. Good job overall!
dora commented 2021-05-09 21:32:29 -04:00 (Migrated from git.uwaterloo.ca)

added 5 commits

  • abf75af4 - 1 commit from branch main
  • 5118b4b6 - Created NewsCard component w/ font/colour styling
  • 6c6a126b - Style NewsCard + index.mdx
  • 2f96f9dc - Change component to use props.children
  • 73eb475b - Change component to use props.children

Compare with previous version

added 5 commits <ul><li>abf75af4 - 1 commit from branch <code>main</code></li><li>5118b4b6 - Created NewsCard component w/ font/colour styling</li><li>6c6a126b - Style NewsCard + index.mdx</li><li>2f96f9dc - Change component to use props.children</li><li>73eb475b - Change component to use props.children</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=54976&start_sha=88b21ff107ec39d29b9d164a9bbb1a75f9996edc)
dora commented 2021-05-14 00:26:48 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in version 3 of the diff
dora commented 2021-05-14 00:26:48 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#849e9afae1a5fea60df8e7867e2c204d5c9e5cb5_18_23)
dora commented 2021-05-14 00:26:48 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#70a8ea959afc7e5518a02decf6992a0d04fe4722_1_1)
dora commented 2021-05-14 00:26:48 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#70a8ea959afc7e5518a02decf6992a0d04fe4722_19_14)
dora commented 2021-05-14 00:26:48 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#70a8ea959afc7e5518a02decf6992a0d04fe4722_16_14)
dora commented 2021-05-14 00:26:48 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#70a8ea959afc7e5518a02decf6992a0d04fe4722_22_18)
dora commented 2021-05-14 00:26:49 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#70a8ea959afc7e5518a02decf6992a0d04fe4722_23_18)
dora commented 2021-05-14 00:26:49 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#70a8ea959afc7e5518a02decf6992a0d04fe4722_33_28)
dora commented 2021-05-14 00:26:49 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#62cc73a2989ed6506031d91aa8d93b1fd998a876_2_1)
dora commented 2021-05-14 00:26:49 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#62cc73a2989ed6506031d91aa8d93b1fd998a876_5_1)
dora commented 2021-05-14 00:26:49 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56#62cc73a2989ed6506031d91aa8d93b1fd998a876_23_21)
dora commented 2021-05-14 00:26:49 -04:00 (Migrated from git.uwaterloo.ca)

added 7 commits

  • 73eb475b...efd9eecd - 3 commits from branch main
  • 941e9103 - Created NewsCard component w/ font/colour styling
  • 36ccadcf - Style NewsCard + index.mdx
  • 18a4034b - Change component to use props.children
  • 22b2a245 - Resolve Adi's comments

Compare with previous version

added 7 commits <ul><li>73eb475b...efd9eecd - 3 commits from branch <code>main</code></li><li>941e9103 - Created NewsCard component w/ font/colour styling</li><li>36ccadcf - Style NewsCard + index.mdx</li><li>18a4034b - Change component to use props.children</li><li>22b2a245 - Resolve Adi&#39;s comments</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55227&start_sha=73eb475bf5d0e668b804a58e00244894dcb4fe56)
dora commented 2021-05-14 00:28:33 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>aee54dc2 - Add news demo</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55228&start_sha=22b2a2450b2cd9acfad68beec8368a9fd673e6ff)
a3thakra commented 2021-05-14 01:38:21 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>6da88cf7 - Fix module declarations</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55229&start_sha=aee54dc2b3f5f462c8bc6377189b2c6d9713193c)
a3thakra commented 2021-05-14 01:48:05 -04:00 (Migrated from git.uwaterloo.ca)

The address tag automatically changes the font-style to italic. We should change this back to normal to match design. font-style: normal;

  color: var(--purple-1);
  font-style: normal;
The `address` tag automatically changes the `font-style` to `italic`. We should change this back to normal to match design. `font-style: normal;` ```suggestion:-0+0 color: var(--purple-1); font-style: normal; ```
a3thakra commented 2021-05-14 01:49:23 -04:00 (Migrated from git.uwaterloo.ca)
```suggestion:-0+0 ```
a3thakra commented 2021-05-14 01:50:14 -04:00 (Migrated from git.uwaterloo.ca)

delete this entire file, it's not needed right now :)

delete this entire file, it's not needed right now :)
a3thakra commented 2021-05-14 01:50:32 -04:00 (Migrated from git.uwaterloo.ca)

LOL 😂

LOL :joy:
a3thakra commented 2021-05-14 01:56:53 -04:00 (Migrated from git.uwaterloo.ca)

We're getting very close! I think we can merge it tomorrow/soon. 🎉

1 more thing: Make sure that the basename for the files ending with .module.css and .tsx is the exactly the same. It's more or a convention, than an error. (So you would name the files NewsCard.module.css and NewsCard.tsx - they are case sensitive)

We're getting very close! I think we can merge it tomorrow/soon. :tada: 1 more thing: Make sure that the basename for the files ending with `.module.css` and `.tsx` is the exactly the same. It's more or a convention, than an error. (So you would name the files `NewsCard.module.css` and `NewsCard.tsx` - they are case sensitive)
a3thakra commented 2021-05-14 01:57:52 -04:00 (Migrated from git.uwaterloo.ca)

git checkout main -- package.json package-lock.json to restore these two files.

`git checkout main -- package.json package-lock.json` to restore these two files.
dora commented 2021-05-14 03:21:32 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55232&start_sha=6da88cf712b6786f7c099ca6f3e6b41b42b459af#70a8ea959afc7e5518a02decf6992a0d04fe4722_17_10)
dora commented 2021-05-14 03:21:32 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55232&start_sha=6da88cf712b6786f7c099ca6f3e6b41b42b459af#849e9afae1a5fea60df8e7867e2c204d5c9e5cb5_1_1)
dora commented 2021-05-14 03:21:32 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55232&start_sha=6da88cf712b6786f7c099ca6f3e6b41b42b459af#7030d0b2f71b999ff89a343de08c414af32fc93a_15_15)
dora commented 2021-05-14 03:21:33 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>4b8de4e3 - Fix date error + clean code</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55232&start_sha=6da88cf712b6786f7c099ca6f3e6b41b42b459af)
dora commented 2021-05-14 03:30:40 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 174a2802 - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>174a2802 - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55233&start_sha=4b8de4e3ef7c5fc06245b4669c671d06ef3e3832)
dora commented 2021-05-14 03:30:52 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 8 of the diff

changed this line in [version 8 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55234&start_sha=174a2802976fbb1d4a8287b6f0ee45e5d26a2624#d0aefa89ef70566d4de4f9214ef7775585e10e18_9_9)
dora commented 2021-05-14 03:30:52 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 20c23b95 - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>20c23b95 - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55234&start_sha=174a2802976fbb1d4a8287b6f0ee45e5d26a2624)
dora commented 2021-05-14 03:36:31 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 121defb3 - Delete index.module.css + follow naming convention

Compare with previous version

added 1 commit <ul><li>121defb3 - Delete index.module.css + follow naming convention</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55235&start_sha=20c23b95532fd4beb763bb51d95a38db89b058be)
dora commented 2021-05-14 03:45:23 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 10 of the diff

changed this line in [version 10 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55236&start_sha=121defb32a932fe783798fad89678f9925a74cf3#62cc73a2989ed6506031d91aa8d93b1fd998a876_15_0)
dora commented 2021-05-14 03:45:23 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>54026a4a - Rename newscard.module.css</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55236&start_sha=121defb32a932fe783798fad89678f9925a74cf3)
a3thakra commented 2021-05-14 03:56:10 -04:00 (Migrated from git.uwaterloo.ca)
        <time className={styles.date} datetime={date.toISOString()}>

From the usage notes:

If the element does not have a datetime attribute, it must not have any element descendants, and the datetime value is the element’s child text content.

```suggestion:-0+0 <time className={styles.date} datetime={date.toISOString()}> ``` From the [usage notes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#usage_notes): > If the element does not have a datetime attribute, it must not have any element descendants, and the datetime value is the element’s child text content.
a3thakra commented 2021-05-14 03:57:21 -04:00 (Migrated from git.uwaterloo.ca)

changed this line in version 11 of the diff

changed this line in [version 11 of the diff](/csc/website/-/merge_requests/2/diffs?diff_id=55237&start_sha=54026a4a575d5cbe9c97207875531e372bd0e07a#70a8ea959afc7e5518a02decf6992a0d04fe4722_18_18)
a3thakra commented 2021-05-14 03:57:22 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

  • 66c87fea - Apply 1 suggestion(s) to 1 file(s)

Compare with previous version

added 1 commit <ul><li>66c87fea - Apply 1 suggestion(s) to 1 file(s)</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55237&start_sha=54026a4a575d5cbe9c97207875531e372bd0e07a)
a3thakra commented 2021-05-14 03:58:04 -04:00 (Migrated from git.uwaterloo.ca)

approved this merge request

approved this merge request
a3thakra commented 2021-05-14 04:00:27 -04:00 (Migrated from git.uwaterloo.ca)

added 1 commit

Compare with previous version

added 1 commit <ul><li>618e0239 - Fix attribute name on &lt;time&gt;</li></ul> [Compare with previous version](/csc/website/-/merge_requests/2/diffs?diff_id=55238&start_sha=66c87feaefc88ae3229afbe42ea5659012444358)
a3thakra commented 2021-05-14 04:01:22 -04:00 (Migrated from git.uwaterloo.ca)

enabled an automatic merge when the pipeline for 618e02392b succeeds

enabled an automatic merge when the pipeline for 618e02392bba7ce078d28ac7a971a8a9b90c179f succeeds
a258wang commented 2021-06-05 13:00:14 -04:00 (Migrated from git.uwaterloo.ca)

marked this issue as related to #30

marked this issue as related to #30
a258wang commented 2021-06-24 17:34:55 -04:00 (Migrated from git.uwaterloo.ca)

mentioned in merge request !32

mentioned in merge request !32
a258wang referenced this issue from a commit 2021-07-07 18:13:40 -04:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: www/www-new#2
No description provided.