Skip to content

Commit d31cce1

Browse files
authored
Merge pull request #531 from mann27/master
added links to p5.sound and dom in libraries page
2 parents e3bf632 + e914303 commit d31cce1

File tree

5 files changed

+34
-35
lines changed

5 files changed

+34
-35
lines changed

i18n-tracking.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,4 @@ es:
288288
line 420: ' p5.shape.js'
289289
line 573: ' output15'
290290
zh-Hans:
291-
src/data/en.yml:
291+
src/data/en.yml: {}

src/data/en.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,6 @@ libraries:
443443
p5.3D: "3D Text and Images in WebGL."
444444
using-a-library-title: "Using a library"
445445
using-a-library1: "A p5.js library can be any JavaScript code that extends or adds to the p5.js core functionality. There are two categories of libraries. Core libraries ("
446-
using-a-library2: " and "
447446
using-a-library3: ") are part of the p5.js distribution, while contributed libraries are developed, owned, and maintained by members of the p5.js community."
448447
using-a-library4: "To include a library in your sketch, link it into your HTML file, after you have linked in p5.js. An example HTML file might look like this:"
449448
create-your-own-title: "Create Your Own"

src/data/es.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,6 @@ libraries:
446446
p5.3D: "3D Text and Images in WebGL. "
447447
using-a-library-title: "Usando una biblioteca"
448448
using-a-library1: "Una biblioteca p5.js puede ser cualquier código p5.js que extiende o añade a las funcionalidades centrales de p5.js. Existen dos tipos de bibliotecas. Las bibliotecas centrales ("
449-
using-a-library2: " y "
450449
using-a-library3: ") son parte de la distribución de p5.js, mientras que las bibliotecas contribuidas son mantenidas y desarrolladas por y de propiedad de los miembros de la comunidad de p5.js."
451450
using-a-library4: "Para incluir una biblioteca en tu bosquejo, enlázala en tu archivo HTML, después que hayas enlazado p5.js. Un archivo HTML como ejemplo podría lucir así:"
452451
create-your-own-title: "Crea tu propia biblioteca"

src/data/libraries/libraries.ejs

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ slug: libraries/
1414

1515
<h2>{{#i18n "using-a-library-title"}}{{/i18n}}</h2>
1616

17-
<p>{{#i18n "using-a-library1"}}{{/i18n}}<a href="{{root}}/reference/#/libraries/dom">p5.dom</a>
18-
{{#i18n "using-a-library2"}}{{/i18n}}
19-
<a href="{{root}}/reference/#/libraries/sound">p5.sound</a>
20-
{{#i18n "using-a-library3"}}{{/i18n}}</p>
17+
<p>{{#i18n "using-a-library1"}}{{/i18n}}<a
18+
href="{{root}}/reference/#/libraries/p5.sound">p5.sound</a>{{#i18n "using-a-library3"}}{{/i18n}}</p>
2119

2220
<p>{{#i18n "using-a-library4"}}{{/i18n}}</p>
2321
<pre><code class="language-markup">&lt;!doctype html&gt;
@@ -35,37 +33,41 @@ slug: libraries/
3533
<h2>{{#i18n "create-your-own-title"}}{{/i18n}}</h2>
3634

3735
<p>{{#i18n "create-your-own1"}}{{/i18n}}
38-
<a href="https://github.com/processing/p5.js/blob/master/contributor_docs/creating_libraries.md">
39-
{{#i18n "create-your-own2"}}{{/i18n}}</a>
36+
<a href="https://github.com/processing/p5.js/blob/master/contributor_docs/creating_libraries.md">
37+
{{#i18n "create-your-own2"}}{{/i18n}}</a>
4038
{{#i18n "create-your-own3"}}{{/i18n}}
41-
<a href="https://docs.google.com/forms/d/e/1FAIpQLSdWWb95cfvosaIFI7msA7XC5zOEVsNruaA5klN1jH95ESJVcw/viewform" target="_blank">{{#i18n "create-your-own4"}}{{/i18n}}</a></p>
39+
<a href="https://docs.google.com/forms/d/e/1FAIpQLSdWWb95cfvosaIFI7msA7XC5zOEVsNruaA5klN1jH95ESJVcw/viewform"
40+
target="_blank">{{#i18n "create-your-own4"}}{{/i18n}}</a></p>
4241

4342
<% let all; for(let p=0; p<2; p++) { %>
44-
<% if (p == 0) { all = core; %>
45-
<h2 class="tutorial-title">{{#i18n "core-libraries"}}{{/i18n}}</h2>
46-
<% } else { all = contributed; %>
47-
<h2 class="tutorial-title">{{#i18n "community-libraries"}}{{/i18n}}</h2>
43+
<% if (p == 0) { all = core; %>
44+
<h2 class="tutorial-title">{{#i18n "core-libraries"}}{{/i18n}}</h2>
45+
<% } else { all = contributed; %>
46+
<h2 class="tutorial-title">{{#i18n "community-libraries"}}{{/i18n}}</h2>
47+
<% } %>
48+
<% let col=0; for(let c in all) { %>
49+
<% if (col == 0) { %>
50+
<div class="left-column">
51+
<% } else { %>
52+
<div class="right-column">
53+
<% } %>
54+
<div class="label">
55+
<a class="nounderline" href="<%=all[c].url%>" target="_blank">
56+
<img alt="" src="{{assets}}/img/libraries/<%=all[c].name.replace(' ', '_')%>.jpg">
57+
<h3><%=all[c].name%></h3>
58+
</a>
59+
</div>
60+
<p>{{#i18n "<%=all[c].name%>"}}{{/i18n}} <% if (all[c].authors) { %>{{#i18n "libraries-created-by" }}{{/i18n}}
61+
<% for(let i in all[c].authors) { %><a href="<%=all[c].authors[i].url%>"
62+
target="_blank"><%=all[c].authors[i].name%></a><% if (i != all[c].authors.length - 1) { %>, <% } } } %>
63+
</p>
64+
</div>
65+
<% if (col == 1 || c == all.length - 1) { %>
66+
<div class="spacer"></div>
67+
<% } %>
68+
<% col = (col+1)%2; %>
4869
<% } %>
49-
<% let col=0; for(let c in all) { %>
50-
<% if (col == 0) { %>
51-
<div class="left-column">
52-
<% } else { %>
53-
<div class="right-column">
54-
<% } %>
55-
<div class="label">
56-
<a class="nounderline" href="<%=all[c].url%>" target="_blank">
57-
<img alt="" src="{{assets}}/img/libraries/<%=all[c].name.replace(' ', '_')%>.jpg">
58-
<h3><%=all[c].name%></h3>
59-
</a>
60-
</div>
61-
<p>{{#i18n "<%=all[c].name%>"}}{{/i18n}} <% if (all[c].authors) { %>{{#i18n "libraries-created-by" }}{{/i18n}} <% for(let i in all[c].authors) { %><a href="<%=all[c].authors[i].url%>" target="_blank"><%=all[c].authors[i].name%></a><% if (i != all[c].authors.length - 1) { %>, <% } } } %></p>
62-
</div>
63-
<% if (col == 1 || c == all.length - 1) { %>
64-
<div class="spacer"></div>
65-
<% } %>
66-
<% col = (col+1)%2; %>
6770
<% } %>
68-
<% } %>
6971
7072
7173
</main>
@@ -75,4 +77,4 @@ slug: libraries/
7577
7678
{{> asterisk}}
7779
78-
</div><!-- end id="get-started-page" -->
80+
</div><!-- end id="get-started-page" -->

src/data/zh-Hans.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,6 @@ libraries:
443443
p5.3D: "WebGL 3D 文字及图像。"
444444
using-a-library-title: "如何使用程式库"
445445
using-a-library1: "p5.js 程式库可以是任何扩展或延伸 p5.js 核心功能的 JavaScript 代码,它们主要分为两种。核心程式库("
446-
using-a-library2: ""
447446
using-a-library3: ")是 p5.js 正式发布组的一部分,而社群贡献程式库是由 p5.js 社群成员持有、开发及维持的。"
448447
using-a-library4: "如果您想在您的绘图内加入任何附加程式库,您只需在 HTML 文件内添加程式库的链接,此链接必须发生在 p5.js 的链接之后。一个 HTML 范例如下:"
449448
create-your-own-title: "制作附加程式库"

0 commit comments

Comments
 (0)