Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0533439

Browse files
authoredSep 23, 2024··
Merge branch 'main' into feat/hamburger-menu
2 parents b5e2b99 + eb700bf commit 0533439

File tree

18 files changed

+93
-51
lines changed

18 files changed

+93
-51
lines changed
 

‎src/components/AuthorCard/index.astro

+7-4
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ const { author } = Astro.props;
1616
const BLOG_URL = Astro.site?.href;
1717
1818
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
19-
const { data: { avatar, avatarAlt, name }, body } = (await getEntry('authors', author))!;
19+
const { data: { avatar, avatarAlt, name, pronouns }, body } = (await getEntry('authors', author))!;
2020
const description = await parseMarkdown(body);
2121
---
2222
<div class="author-card" itemprop="author" itemscope itemtype="https://schema.org/Person">
2323
<a class="author-picture" href={`${BLOG_URL}authors/${author}`}>
2424
<Avatar image={avatar} imageAlt={avatarAlt} />
2525
</a>
2626

27-
<a class="p-author h-card author-name" rel="author" itemprop="url" href={`${BLOG_URL}authors/${author}`}>
28-
<h2 itemprop="name">{name}</h2>
29-
</a>
27+
<div class="author-name">
28+
<a class="p-author h-card" rel="author" itemprop="url" href={`${BLOG_URL}authors/${author}`}>
29+
<h2 itemprop="name">{name}</h2>
30+
</a>
31+
{pronouns && (<small>{pronouns}</small>)}
32+
</div>
3033

3134
<div class="author-bio">
3235
{/* eslint-disable-next-line astro/no-set-html-directive */}

‎src/components/PageHeader/index.astro

+4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
import './styles.css';
33
---
44
<header id="page-header">
5+
<slot name="header-picture"></slot>
56
<h1>
67
<slot></slot>
78
</h1>
9+
<aside>
10+
<slot name="header-extra"></slot>
11+
</aside>
812
</header>

‎src/components/PageHeader/styles.css

+30-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,37 @@
33
margin: 1.25rem auto;
44
padding: 0 1rem;
55
text-align: center;
6+
gap: var(--size-3);
7+
display: grid;
8+
grid-template-columns: auto auto;
9+
grid-template-rows: auto auto;
10+
grid-template-areas:
11+
'picture title'
12+
'picture aside'
13+
;
14+
}
15+
16+
#page-header > *:not(h1):not(aside) { grid-area: picture; }
17+
#page-header > h1 { grid-area: title; }
18+
#page-header > aside { grid-area: aside; }
619

7-
@media (min-width: 1024px) {
8-
.desktop\:px-9 {
9-
padding-left: 2.25rem;
10-
padding-right: 2.25rem;
11-
font-size: 2rem;
12-
font-weight: 300;
13-
}
20+
#page-header:has(> h1:first-child) {
21+
grid-template-columns: auto;
22+
grid-template-rows: auto auto;
23+
grid-template-areas:
24+
'title'
25+
'aside'
26+
;
1427
}
1528

29+
@media (max-width: 550px) {
30+
#page-header {
31+
grid-template-columns: auto;
32+
grid-template-rows: repeat(3, auto);
33+
grid-template-areas:
34+
'picture'
35+
'title'
36+
'aside'
37+
;
38+
}
1639
}

‎src/components/SiteFooter/index.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import './styles.css';
2121
class="footer-items"
2222
target="_blank"
2323
>
24-
Join Discord!
24+
Join Discord
2525
</a>
2626
</li>
2727
<li>

‎src/content/authors/drey.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: drey moreau
33
avatar: ./assets/drey.jpg
4+
pronouns: they/them
45
avatarAlt: A picture of drey's face at sunrise.
56
email: drey@torontojs.com
67
website: https://dreymoreau.netlify.app

‎src/content/authors/marco.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Marco Campos
33
avatar: ./assets/marco.jpg
4+
pronouns: he/him
45
avatarAlt: A picture of my face with a smile looking at the camera. I'm wearing aviator glasses, a fake fur winter hat and an orange scarf.
56
email: me@madcampos.dev
67
website: https://madcampos.dev/
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
title: New Blog!
33
summary: TorontoJS community content has a new home, this blog!
4-
createdAt: 2024-08-08T17:00:22.476-04:00
5-
draft: true
4+
createdAt: 2024-09-13T23:23:53.689Z
65
tags:
76
- Community
87
- blog
@@ -15,44 +14,38 @@ We have a new home! Expect more frequent content and more of the nice and quirky
1514

1615
![A gif of a TV test image saying "Please stand by"](./assets/giphy.gif)
1716

18-
It is very much needed a sorry for all the time that it took us to put the blog together, but also an explanation of everything that happened.
19-
2017
## The why
2118

2219
Last year we were writing the TL;DR newsletter in a very nice trio using the substack platform. In a turn of events we found out that the platform was _supporting neo-nazi propaganda_ by keeping newsletters up and running and even monetizing them!
2320

24-
As hate speech goes against our [Code of Conduct](https://torontojs.com/code_of_conduct) and two of the writers are queer, continuing to use the platform created an ethical problem. To resolve that we wrapped the content for 2023 for the newsletter and went searching for another platform.
21+
As hate speech goes against our [Code of Conduct](https://torontojs.com/code_of_conduct) continuing to use the platform created an ethical problem. To resolve that we wrapped the content for 2023 for the newsletter and went searching for another platform.
2522

2623
## Combining ideas
2724

2825
At the same time two other things happened in parallel:
29-
- Discussions about a blog for general posts from and to the community.
30-
- A RFC style proposals system for improvements.
26+
- Discussions about a blog for general posts from and to the community
27+
- A Request For Comment (RFC) style proposals system for improvements
3128

32-
On the organizers group, we started discussing that it may be very nice and useful to have a blog to post the newsletter there and then fire email notifications to people.
29+
On the organizers group, we started discussing that it may be very nice and useful to have a blog to post the newsletter, as well as a way to send emails!!!
3330

3431
That also gives us a venue to post community content, from anyone that is interested in writing something cool and sharing that with others. Basically a more permanent and longer form version of the `#show-and-tell` channel on Slack.
3532

3633
The blog also opens up space to post reports and pictures of events that we run, along with summaries. Very old school and [Indie Web](https://indieweb.org/) style. (Keep an eye out for a webring haha)
3734

3835
Along side to that, the organizers group changed, we saw the departure of Jen Chan as the main organizer and the succession by Dann Toliver on that role. At the same time we saw an influx of people who were _de facto_ organizers getting the title.
3936

40-
All the change brought with it exciting new ideas and we wanted a way to organize and be more open for improving the community. Because we are very influenced by the engineering side of things (although it is changing) the best idea on how to implement "proposals for improving the community" was a Request For Comments (RFC) process.
41-
42-
To test out the proposals system, we thought it would be a good idea use the blog. So we could have a first proposal and see it to completion.
43-
44-
## Writing a blog
37+
The change brought exciting new ideas and we wanted a way to organize and be more open for improving the community. Since we are very influenced by the engineering side of things (although it is changing), the best idea on how to implement "proposals for improving the community" was a RFC process.
4538

46-
Based on the experience I had building my blog and testing tools, we decided to go with [Astro](https://astro.build/) for two reasons:
47-
1. It builds statically, so no JS on the client (ironic that we are Toronto... _**JS**_ and try to get rid of JS).
48-
2. It has nice components so we are not maintaining a thousand times the same lines of code and repeating ourselves.
39+
To test out the proposals system, we thought it would be a good idea use the blog.
4940

50-
To make things easier, we used the structure and some code of my personal blog and then went to design how the TorontoJS blog would look like. Turns out it is very hard to design things and our shade of red is _very difficult_ to pair with other colours. To make things even worse it is not a very accessible shade.
41+
## Building a blog
5142

52-
With all of those problems, actually building the blog took some time.
43+
We decided to go with [Astro](https://astro.build/) for two reasons:
44+
1. It builds statically, so no JS on the client (ironic that we are Toronto... _**JS**_ and try to get rid of JS) hehe.
45+
2. It has nice built in components, so we are not having to maintain the same lines of code.
5346

5447
## What now?
5548

5649
The blog is live, welcome to it and enjoy!
5750

58-
Now we have an open place to share ideas and write articles. If you would be interested in doing so, please reach us on Slack!
51+
Now we have an open place to share ideas and write articles. If you would be interested in doing so, please reach out to us on Slack!
Binary file not shown.

‎src/content/docs/contributing.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If you are looking for instructions on how to _write posts_ for the blog, please
88

99
We recommend creating a fork of the project, that can be easily done by clicking the "Fork" button on the top right corner of the repository page.
1010

11-
![A closeup screenshot showing the "Fork" button on Github.](./assets/Pasted image 20240325194226.png)
11+
![A closeup screenshot showing the "Fork" button on Github.](./assets/fork-button.png)
1212

1313
After forking the project, you can clone your forked repository to your local machine by running the following command:
1414

@@ -18,7 +18,7 @@ git clone <your forked repository URL>
1818

1919
Replace `<your forked repository URL>` with the URL of your forked repository. You can find the URL by clicking the "Code" button on the top right corner of your forked repository page.
2020

21-
![A close up screenshot of the "Code" button on Github showing the popup with the URL for cloning your local fork.](./assets/Pasted image 20240325194352.png)
21+
![A close up screenshot of the "Code" button on Github showing the popup with the URL for cloning your local fork.](./assets/code-button.png)
2222

2323
## Creating a branch
2424

@@ -38,10 +38,10 @@ Once you have made your changes, commit them all and push your branch to the rem
3838

3939
Open your fork's page on GitHub and you will see a message with a button saying "Compare & pull request"
4040

41-
![A screenshot showing the top of the page of a fork from TorontoJS' blog. It shows a message suggesting the creation of a Pull Request.](./assets/Pasted image 20240325194853.png)
41+
![A screenshot showing the top of the page of a fork from TorontoJS' blog. It shows a message suggesting the creation of a Pull Request.](./assets/pull-request-button.png)
4242

4343
You can also create a Pull Request by going to the [original repository](https://github.com/torontojs/blog), going to the "Pull Requests" tab and then clicking "New Pull Request". Once there, click on the link called "compare across forks" and it will allow you to see the changes between your fork and the original repository.
4444

45-
![A screenshot showcasing the "compare across forks" option on GitHub, with the TorontoJS as base and the fork as the head branch.](assets/Pasted image 20240325195441.png)
45+
![A screenshot showcasing the "compare across forks" option on GitHub, with the TorontoJS as base and the fork as the head branch.](./assets/compare-across-forks.png)
4646

4747
After creating the Pull Request, we will review your changes and merge them into the main branch if they are approved.

‎src/layouts/InternalPage/index.astro

+2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ const {
4848
<SkipToContent slot="header" />
4949
<SiteNav slot="header" />
5050
<PageHeader slot="header">
51+
<slot name="header-picture" slot="header-picture"></slot>
5152
<slot name="header"></slot>
53+
<slot name="header-extra" slot="header-extra"></slot>
5254
</PageHeader>
5355

5456
<div id="contents">

‎src/pages/authors/[author].astro

+19-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ export const getStaticPaths = (async () => (await getCollection('authors')).map(
2020
const {
2121
name,
2222
body,
23-
avatar, avatarAlt
23+
avatar, avatarAlt,
24+
pronouns,
25+
socialMedia
2426
} = Astro.props;
2527
const description = await parseMarkdown(body);
2628
@@ -35,11 +37,22 @@ const description = await parseMarkdown(body);
3537
pageSchema="ProfilePage"
3638
>
3739

38-
<Fragment slot="header">
39-
<a id="author-picture" class="p-author h-card author-name" rel="author" itemprop="url" href={Astro.url}>
40-
<Avatar image={avatar} imageAlt={avatarAlt} />
41-
</a>
42-
<a href={Astro.url}>{name}</a>
40+
<a
41+
slot="header-picture"
42+
id="author-picture"
43+
class="p-author h-card author-name"
44+
rel="author"
45+
itemprop="url"
46+
href={Astro.url}
47+
>
48+
<Avatar image={avatar} imageAlt={avatarAlt} />
49+
</a>
50+
<a slot="header" href={Astro.url}>{name}</a>
51+
<Fragment slot="header-extra">
52+
{pronouns && (<p>{pronouns}</p>)}
53+
<ul>
54+
{Object.entries(socialMedia ?? {}).map(([name, url]) => (<li><a href={url} rel="nofollow noopener noreferrer">{name}</a></li>))}
55+
</ul>
4356
</Fragment>
4457

4558
<div id="contents" itemprop="about mainEntity" itemscope itemtype="https://schema.org/Person">

‎src/schemas/authors.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { type SchemaContext, z as zod } from 'astro:content';
22

33
export const authorsSchema = ({ image }: SchemaContext) => zod.object({
44
name: zod.string().describe('The author\'s name.'),
5+
pronouns: zod.string().optional().describe('The author\'s pronouns.'),
56
avatar: image().describe('The avatar image to use when displaying cards.'),
67
avatarAlt: zod.string().describe('The avatar image alt text.'),
78
email: zod.string().email().optional().describe('The author\'s email, if they want to share.'),

‎src/styles/authors.css

+11-10
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@
1010
padding: var(--size-2);
1111
}
1212

13-
#page-header h1 {
14-
display: flex;
15-
gap: var(--size-3);
16-
}
17-
1813
#page-header a {
1914
color: var(--title-color);
2015
text-shadow: var(--size-1) var(--size-1) var(--size-1) var(--gray-12);
2116
text-decoration-color: var(--tjs-red-7);
2217
text-underline-offset: var(--size-2);
2318
}
2419

25-
@media (max-width: 550px) {
26-
#page-header h1 {
27-
flex-direction: column;
28-
align-items: center;
29-
}
20+
#page-header ul {
21+
display: flex;
22+
flex-wrap: wrap;
23+
padding: 0;
24+
justify-content: center;
25+
gap: var(--size-3);
26+
}
27+
28+
#page-header li {
29+
list-style: none;
30+
padding: 0;
3031
}

0 commit comments

Comments
 (0)
Please sign in to comment.