Skip to content

Commit 7c91a6d

Browse files
committed
Added hello p5 link
1 parent 290f709 commit 7c91a6d

File tree

10 files changed

+41
-129
lines changed

10 files changed

+41
-129
lines changed

src/components/PageHeader/HomePage.astro

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,26 @@ const { config } = Astro.props;
2525
<p
2626
class={`hero-caption text-body-caption pb-sm mt-0 ${i > 0 ? "hidden" : ""}`}
2727
>
28-
{im.caption}
28+
{im.linkTarget ? (
29+
<a href={im.linkTarget}>{im.caption}</a>
30+
) : (
31+
im.caption
32+
)}
2933
</p>
3034
))
3135
}
3236
</div>
3337

3438
{
3539
config.data.heroImages.map((im, i) => (
36-
<Image
37-
containerClass={`relative hero-image-container ${i > 0 ? "hidden" : ""}`}
38-
class={"hero-image"}
39-
aspectRatio="none"
40-
src={im.image}
41-
alt={im.altText}
42-
loading={i > 0 ? "lazy" : "eager"}
43-
/>
40+
<Image
41+
containerClass={`relative hero-image-container ${i > 0 ? "hidden" : ""}`}
42+
class={"hero-image"}
43+
aspectRatio="none"
44+
src={im.image}
45+
alt={im.altText}
46+
loading={i > 0 ? "lazy" : "eager"}
47+
/>
4448
))
4549
}
4650
</div>

src/content/homepage/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const homepageCollection = defineCollection({
1212
image: image(),
1313
altText: z.string(),
1414
caption: z.string(),
15+
linkTarget: z.string(),
1516
}),
1617
)
1718
.nonempty(),

src/content/homepage/en.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
11
title: p5.js
22
heroImages:
3-
- image: ./images/hero.webp
4-
altText: Lauren Lee McCarthy reading the Processing Community Catalog.
5-
caption: "Lauren Lee McCarthy reading the Processing Community Catalog. Photo credit: Maximo Xtravaganza."
6-
- image: ./images/p5for50plus.webp
7-
altText: Inhwa Yeom teaching p5.js to people aged 50+.
8-
caption: "Coding Club for people aged 50+ in Korea, led by Inhwa Yeom."
9-
- image: ./images/salon-2.webp
10-
altText: Qianqian Ye holding a mic next to a big t.v. screen that has a grid of p5.js contributor photos on it.
11-
caption: "Qianqian Ye introducing 600+ p5.js contributors at p5.js Community Salon. Photo credit: Ziyuan Lin."
12-
- image: ./images/ccfest2018.webp
13-
altText: p5.js workshop participants coding while showing their projects on screen.
14-
caption: "p5.js workshop at CC Fest NYC at ITP-NYU in November 2018."
15-
- image: ./images/tunapanda.webp
16-
altText: Students learning to code while checking a p5.js book.
17-
caption: "p5.js workshop at Tunapanda Institute in Nairobi. Photo credit: Tunapanda Institute."
18-
- image: ./images/contributor-conf-2019_10.webp
19-
altText: Person with a microphone speaking to fellow participants in front of text that reads p5.js will not add any new features except those that increase access.
20-
caption: "p5.js will not add any new features except those that increase access."
21-
- image: ./images/contributor-conf-2015.webp
22-
altText: Participants jump, smile and throw their hands in the air on a green lawn.
23-
caption: "p5.js Contributors Conference 2015."
24-
- image: ./images/contributor-conf-2019-17.webp
25-
altText: Participants sit around a table with their laptops and observe code on a screen.
26-
caption: "p5.js Contributors Conference 2019."
3+
- image: ./images/hello-p5-2024.png
4+
linkTarget: "https://hello.p5js.org"
5+
altText: A TODO-try the other image, wth a different ALT
6+
caption: "Hello, p5.js! Find out how to get started with animation, audio, WebGL, accessibility, and contribution to p5.js. This interactive video works best on a desktop browser:"
277
heroText: >
288
p5.js is a friendly tool for learning to code and make art. It is a free and open-source JavaScript library built by an inclusive, nurturing community. p5.js welcomes artists, designers, beginners, educators, and anyone else!
299
referenceHeaderText: Explore the p5.js library reference

src/content/homepage/es.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,10 @@ title: p5.js
22
heroText: >
33
p5.js es una herramienta amigable para aprender a programar y hacer arte. Es una biblioteca de JavaScript libre y de código abierto construida por una comunidad inclusiva y solidaria. ¡p5.js da la bienvenida a artistas, diseñadores, principiantes, educadores y cualquier otra persona!
44
heroImages:
5-
- image: ./images/hero.webp
6-
altText: Lauren Lee McCarthy reading the Processing Community Catalog.
7-
caption: "Lauren Lee McCarthy reading the Processing Community Catalog. Photo credit: Maximo Xtravaganza."
8-
- image: ./images/p5for50plus.webp
9-
altText: Inhwa Yeom teaching p5.js to people aged 50+.
10-
caption: "Coding Club for people aged 50+ in Korea, led by Inhwa Yeom."
11-
- image: ./images/salon-2.webp
12-
altText: Qianqian Ye holding a mic next to a big t.v. screen that has a grid of p5.js contributor photos on it.
13-
caption: "Qianqian Ye introducing 600+ p5.js contributors at p5.js Community Salon. Photo credit: Ziyuan Lin."
14-
- image: ./images/ccfest2018.webp
15-
altText: p5.js workshop participants coding while showing their projects on screen.
16-
caption: "p5.js workshop at CC Fest NYC at ITP-NYU in November 2018."
17-
- image: ./images/tunapanda.webp
18-
altText: Students learning to code while checking a p5.js book.
19-
caption: "p5.js workshop at Tunapanda Institute in Nairobi. Photo credit: Tunapanda Institute."
20-
- image: ./images/contributor-conf-2019_10.webp
21-
altText: Person with a microphone speaking to fellow participants in front of text that reads p5.js will not add any new features except those that increase access.
22-
caption: "p5.js will not add any new features except those that increase access."
23-
- image: ./images/contributor-conf-2015.webp
24-
altText: Participants jump, smile and throw their hands in the air on a green lawn.
25-
caption: "p5.js Contributors Conference 2015."
26-
- image: ./images/contributor-conf-2019-17.webp
27-
altText: Participants sit around a table with their laptops and observe code on a screen.
28-
caption: "p5.js Contributors Conference 2019."
5+
- image: ./images/hero-cropped.png
6+
linkTarget: "http://hello.p5js.org"
7+
altText: This is a test
8+
caption: "This is a test <a href=hi>sdfasd</a> another test"
299
referenceHeaderText: Explore the p5.js library reference
3010
examplesHeaderText: Learn p5.js with examples
3111
communityHeaderText: See the p5.js community in action

src/content/homepage/hi.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,10 @@ title: p5.js
22
heroText: >
33
p5.js कोड करना और कला बनाना सीखने के लिए एक अनुकूल उपकरण है। यह एक नि:शुल्क और ओपन-सोर्स जावास्क्रिप्ट लाइब्रेरी है जो एक समावेशी, पोषित समुदाय द्वारा बनाई गई है। p5.js कलाकारों, डिज़ाइनरों, नौसिखिया, शिक्षकों और किसी अन्य का भी स्वागत करता है!
44
heroImages:
5-
- image: ./images/hero.webp
6-
altText: Lauren Lee McCarthy reading the Processing Community Catalog.
7-
caption: "Lauren Lee McCarthy reading the Processing Community Catalog. Photo credit: Maximo Xtravaganza."
8-
- image: ./images/p5for50plus.webp
9-
altText: Inhwa Yeom teaching p5.js to people aged 50+.
10-
caption: "Coding Club for people aged 50+ in Korea, led by Inhwa Yeom."
11-
- image: ./images/salon-2.webp
12-
altText: Qianqian Ye holding a mic next to a big t.v. screen that has a grid of p5.js contributor photos on it.
13-
caption: "Qianqian Ye introducing 600+ p5.js contributors at p5.js Community Salon. Photo credit: Ziyuan Lin."
14-
- image: ./images/ccfest2018.webp
15-
altText: p5.js workshop participants coding while showing their projects on screen.
16-
caption: "p5.js workshop at CC Fest NYC at ITP-NYU in November 2018."
17-
- image: ./images/tunapanda.webp
18-
altText: Students learning to code while checking a p5.js book.
19-
caption: "p5.js workshop at Tunapanda Institute in Nairobi. Photo credit: Tunapanda Institute."
20-
- image: ./images/contributor-conf-2019_10.webp
21-
altText: Person with a microphone speaking to fellow participants in front of text that reads p5.js will not add any new features except those that increase access.
22-
caption: "p5.js will not add any new features except those that increase access."
23-
- image: ./images/contributor-conf-2015.webp
24-
altText: Participants jump, smile and throw their hands in the air on a green lawn.
25-
caption: "p5.js Contributors Conference 2015."
26-
- image: ./images/contributor-conf-2019-17.webp
27-
altText: Participants sit around a table with their laptops and observe code on a screen.
28-
caption: "p5.js Contributors Conference 2019."
5+
- image: ./images/hero-cropped.png
6+
linkTarget: "http://hello.p5js.org"
7+
altText: This is a test
8+
caption: "This is a test <a href=hi>sdfasd</a> another test"
299
referenceHeaderText: Explore the p5.js library reference
3010
examplesHeaderText: Learn p5.js with examples
3111
communityHeaderText: See the p5.js community in action

src/content/homepage/images/grid.png

8.45 MB
Loading
1.04 MB
Loading

src/content/homepage/ko.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,10 @@ title: p5.js
22
heroText: >
33
p5.js는 코딩을 배우고 예술을 만드는 친근한 도구입니다. 이는 포용적이고 육성적인 커뮤니티에 의해 만들어진 무료 오픈소스 자바스크립트 라이브러리입니다. p5.js는 예술가, 디자이너, 초심자, 교육자 및 여러분 모두를 환영합니다!
44
heroImages:
5-
- image: ./images/hero.webp
6-
altText: Lauren Lee McCarthy reading the Processing Community Catalog.
7-
caption: "Lauren Lee McCarthy reading the Processing Community Catalog. Photo credit: Maximo Xtravaganza."
8-
- image: ./images/p5for50plus.webp
9-
altText: Inhwa Yeom teaching p5.js to people aged 50+.
10-
caption: "Coding Club for people aged 50+ in Korea, led by Inhwa Yeom."
11-
- image: ./images/salon-2.webp
12-
altText: Qianqian Ye holding a mic next to a big t.v. screen that has a grid of p5.js contributor photos on it.
13-
caption: "Qianqian Ye introducing 600+ p5.js contributors at p5.js Community Salon. Photo credit: Ziyuan Lin."
14-
- image: ./images/ccfest2018.webp
15-
altText: p5.js workshop participants coding while showing their projects on screen.
16-
caption: "p5.js workshop at CC Fest NYC at ITP-NYU in November 2018."
17-
- image: ./images/tunapanda.webp
18-
altText: Students learning to code while checking a p5.js book.
19-
caption: "p5.js workshop at Tunapanda Institute in Nairobi. Photo credit: Tunapanda Institute."
20-
- image: ./images/contributor-conf-2019_10.webp
21-
altText: Person with a microphone speaking to fellow participants in front of text that reads p5.js will not add any new features except those that increase access.
22-
caption: "p5.js will not add any new features except those that increase access."
23-
- image: ./images/contributor-conf-2015.webp
24-
altText: Participants jump, smile and throw their hands in the air on a green lawn.
25-
caption: "p5.js Contributors Conference 2015."
26-
- image: ./images/contributor-conf-2019-17.webp
27-
altText: Participants sit around a table with their laptops and observe code on a screen.
28-
caption: "p5.js Contributors Conference 2019."
5+
- image: ./images/hero-cropped.png
6+
linkTarget: "http://hello.p5js.org"
7+
altText: This is a test
8+
caption: "This is a test <a href=hi>sdfasd</a> another test"
299
referenceHeaderText: Explore the p5.js library reference
3010
examplesHeaderText: Learn p5.js with examples
3111
communityHeaderText: See the p5.js community in action

src/content/homepage/zh-Hans.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,10 @@ title: p5.js
22
heroText: >
33
p5.js 是一款旨在帮助人们学习编程并进行艺术创作的友好工具。作为一个免费的开源 JavaScript 库,它由一个充满包容和关怀的社区共同打造。无论是艺术家、设计师、初学者、教育者,还是其他任何人,p5.js 都欢迎你的加入!
44
heroImages:
5-
- image: ./images/hero.webp
6-
altText: Lauren Lee McCarthy reading the Processing Community Catalog.
7-
caption: "Lauren Lee McCarthy reading the Processing Community Catalog. Photo credit: Maximo Xtravaganza."
8-
- image: ./images/p5for50plus.webp
9-
altText: Inhwa Yeom teaching p5.js to people aged 50+.
10-
caption: "Coding Club for people aged 50+ in Korea, led by Inhwa Yeom."
11-
- image: ./images/salon-2.webp
12-
altText: Qianqian Ye holding a mic next to a big t.v. screen that has a grid of p5.js contributor photos on it.
13-
caption: "Qianqian Ye introducing 600+ p5.js contributors at p5.js Community Salon. Photo credit: Ziyuan Lin."
14-
- image: ./images/ccfest2018.webp
15-
altText: p5.js workshop participants coding while showing their projects on screen.
16-
caption: "p5.js workshop at CC Fest NYC at ITP-NYU in November 2018."
17-
- image: ./images/tunapanda.webp
18-
altText: Students learning to code while checking a p5.js book.
19-
caption: "p5.js workshop at Tunapanda Institute in Nairobi. Photo credit: Tunapanda Institute."
20-
- image: ./images/contributor-conf-2019_10.webp
21-
altText: Person with a microphone speaking to fellow participants in front of text that reads p5.js will not add any new features except those that increase access.
22-
caption: "p5.js will not add any new features except those that increase access."
23-
- image: ./images/contributor-conf-2015.webp
24-
altText: Participants jump, smile and throw their hands in the air on a green lawn.
25-
caption: "p5.js Contributors Conference 2015."
26-
- image: ./images/contributor-conf-2019-17.webp
27-
altText: Participants sit around a table with their laptops and observe code on a screen.
28-
caption: "p5.js Contributors Conference 2019."
5+
- image: ./images/hero-cropped.png
6+
linkTarget: "http://hello.p5js.org"
7+
altText: This is a test
8+
caption: "This is a test <a href=hi>sdfasd</a> another test"
299
referenceHeaderText: Explore the p5.js library reference
3010
examplesHeaderText: Learn p5.js with examples
3111
communityHeaderText: See the p5.js community in action

src/content/text-detail/en/about.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ p5.js is a friendly tool for learning to code and make art. It is a free and ope
1111
p5.js prioritizes accessibility, inclusivity, community, and joy. It makes sketching with code as intuitive as sketching in a notebook. p5.js supports audio-visual, interactive, and experimental works for the web. It is accessible in many languages and has expansive documentation with visual examples. You can start coding right now in the web editor, and there are lots of tutorials to help. You can also expand p5.js with many community-created libraries. p5.js is always looking for contributors and appreciates involvement in all forms.
1212

1313
p5.js encourages iterative coding for creative expression. We value open source and access for all. Our community provides inspiration and support to learn, create, imagine, design, share, and code freely.
14+
15+
Find out how to get started with animation, audio, WebGL, accessibility, and contribution to p5.js in this <a href='https://hello.p5js.org/'>interactive video</a> (works best on a desktop web browser):
16+
17+
18+
<div class='mt-xl'>
19+
<LinkButton variant='link' url='https://hello.p5js.org/'>Hello p5.js!</LinkButton>
20+
</div>
1421
</div>
1522

1623
<hr class='full-bleed'/>

0 commit comments

Comments
 (0)