Skip to content

Commit 967017e

Browse files
committed
Merge branch 'master' of github.com:processing/p5.js-website
2 parents 3f1f857 + 73beae2 commit 967017e

File tree

9 files changed

+39
-12
lines changed

9 files changed

+39
-12
lines changed

contributor_docs/i18n_contribution.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ p5.js-website/
136136
```
137137
4. Duplicate `en.yml` - stored under `src/data/` - and name it `language_abbreviation.yml`. For example, when the Spanish version was created it was named `es.yml`. Check [How the website works](#how-the-website-works) and [File Structure](#file-structure) for further information.
138138
5. Duplicate `es.json` - stored under `src/data/reference/` - and name it `[language_abbreviation].json`.
139-
6. Add a new menu entry in [`src/templates/partials/i18n.hbs`](https://github.com/processing/p5.js-website/blob/master/src/templates/partials/i18n.hbs#L8) like so `<li><a href='#' lang='[language_abbreviation]' data-lang='[language_abbreviation]'>[language_name]</a></li>`.
139+
6. Duplicate `en` folder - stored under `src/data/examples` - and name it `language_abbreviation`.
140+
7. Add a new menu entry in [`src/templates/partials/i18n.hbs`](https://github.com/processing/p5.js-website/blob/master/src/templates/partials/i18n.hbs#L8) like so `<li><a href='#' lang='[language_abbreviation]' data-lang='[language_abbreviation]'>[language_name]</a></li>`.
140141
141142
## Working on existing translations
142143

src/assets/css/main.css

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
.sidebar-menu a {
8888
display: block;
8989
text-align: center;
90+
padding-bottom: 0.11em;
91+
border-bottom: 0.11em dashed transparent;
9092
}
9193

9294
.sidebar-menu-icon {
@@ -469,6 +471,14 @@ div.reference-subgroup {
469471
vertical-align: top;
470472
}
471473

474+
#library-page .group-name{
475+
display: inline-block;
476+
}
477+
478+
#library-page .group-name:hover {
479+
color: #ED225D;
480+
}
481+
472482

473483
/* EXAMPLES IN REF */
474484

@@ -909,6 +919,10 @@ h3.contribute-title {
909919
position: relative;
910920
}
911921

922+
.label .nounderline img{
923+
margin: .5em 0 0 0
924+
}
925+
912926
.label h3 {
913927
color: white;
914928
position: absolute;
@@ -1711,6 +1725,10 @@ ul {
17111725
list-style: none;
17121726
}
17131727

1728+
ol {
1729+
font-size: 1.2em;
1730+
}
1731+
17141732
li {
17151733
margin: 0;
17161734
padding: 0;
@@ -1724,6 +1742,10 @@ ul.list_view {
17241742
font-size: 1.2em;
17251743
}
17261744

1745+
ol ul.list_view {
1746+
font-size: 1em;
1747+
}
1748+
17271749
ul.inside {
17281750
margin: 0 0 0 2em;
17291751
padding: 0;
@@ -2108,9 +2130,7 @@ footer {
21082130
.column.group-name {
21092131
margin-bottom: 1em;
21102132
}
2111-
#library-page .group-name:hover {
2112-
color: #ED225D;
2113-
}
2133+
21142134
#library-page .group-name {
21152135
margin: 2em 0 0.5em 0;
21162136
}

src/templates/layouts/default.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width">
77
<meta name="description" content="p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.">
88
<title tabindex="1">{{title}} | p5.js</title>
9-
<link rel="stylesheet" href="/{{assets}}/css/all.css?v=1.0.0">
9+
<link rel="stylesheet" href="/{{assets}}/css/all.css?v=1.0.1">
1010
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet">
1111

1212
<link rel="shortcut icon" href="/{{assets}}/img/favicon.ico">
@@ -17,7 +17,7 @@
1717
<script src="/{{assets}}/js/vendor/ace-nc/ace.js"></script>
1818
<script src="/{{assets}}/js/vendor/ace-nc/mode-javascript.js"></script>
1919
<script src="/{{assets}}/js/vendor/prism.js"></script>
20-
<script src="/{{assets}}/js/init.js?v=1.0.0"></script>
20+
<script src="/{{assets}}/js/init.js?v=1.0.1"></script>
2121

2222
{{#ifLowerCaseEquals language "zh-Hans"}}
2323
<script src="/{{assets}}/js/vendor/pangu.min.js"></script>

src/templates/pages/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ slug: /
1818
<h1>{{#i18n "p1xh1"}}{{/i18n}}</h1>
1919
<p style="margin-top:1em">{{#i18n "p1x1"}}{{/i18n}}</p>
2020
<p>{{#i18n "p1x2"}}{{/i18n}}</p>
21-
<span class='button_box'><a href="https://editor.p5js.org">{{#i18n "start-creating"}}{{/i18n}}</a></span>
21+
<a href="https://editor.p5js.org"><span class='button_box'>{{#i18n "start-creating"}}{{/i18n}}</span></a>
2222

2323
<h2>{{#i18n "p2xh2"}}{{/i18n}}</h2>
2424
<p>{{#i18n "p2x1"}}{{/i18n}}</p>

src/templates/pages/learn/coordinate-system-and-shapes.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function setup(){
8787
rectMode(CORNERS);
8888
}
8989
function draw(){
90-
rect(10, 10, 50, 30); // rect(x, y, width, height)
90+
rect(10, 10, 50, 30); // rect(x1, y1, x2, y2)
9191
}
9292
</script>
9393

@@ -118,7 +118,7 @@ function setup(){
118118
ellipseMode(CORNERS);
119119
}
120120
function draw(){
121-
ellipse(10, 10, 40, 50); // ellipse(x, y, width, height)
121+
ellipse(10, 10, 40, 50); // ellipse(x1, y1, x2, y2)
122122
}
123123
</script>
124124

src/templates/pages/reference/assets/js/reference.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/templates/pages/reference/assets/js/reference.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/yuidoc-p5-theme-src/scripts/tpl/library.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h3><%= module.name %> library</h3>
1313
<% if (group.name !== module.name && group.name !== 'p5') { %>
1414
<% if (group.hash) { %> <a href="<%=group.hash%>" <% if (group.module !== module.name) { %>class="core"<% } %>><% } %>
1515
<h4 class="group-name <% if (t == 0) { %> first<%}%>"><%=group.name%></h4>
16-
<% if (group.hash) { %> </a> <% } %>
16+
<% if (group.hash) { %> </a><br> <% } %>
1717
<% } %>
1818
<% _.each(group.items.filter(function(item) {return item.access !== 'private'}), function(item) { %>
1919
<a href="<%=item.hash%>" <% if (item.module !== module.name) { %>class="core"<% } %>><%=item.name%><% if (item.itemtype === 'method') { %>()<%}%></a><br>

src/yuidoc-p5-theme-src/scripts/views/listView.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ define([
4141
}
4242
var hash = App.router.getHash(item);
4343

44+
// fixes broken links for #/p5/> and #/p5/>=
45+
item.hash = item.hash.replace('>', '&gt;');
46+
4447
// Create a group list
4548
if (!self.groups[group]) {
4649
self.groups[group] = {

0 commit comments

Comments
 (0)