Skip to content

Commit f9ed099

Browse files
authored
Merge branch 'master' into linkoverflowingfix
2 parents c37e772 + 252af9e commit f9ed099

File tree

137 files changed

+1282
-756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1282
-756
lines changed

Gruntfile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ module.exports = function(grunt) {
8383
options: {
8484
expand: true,
8585
flatten: true,
86-
helpers: ['<%= config.src %>/assets/js/translation.js'],
8786
assets: '<%= config.dist %>/assets',
87+
helpers: ['<%= config.src %>/assets/js/translation.js', '<%= config.src %>/assets/js/cache-busting.js'],
8888
layout: '<%= config.src %>/templates/layouts/default.hbs',
8989
data: [
9090
'<%= config.src %>/data/**/*.{json,yml}',
@@ -408,10 +408,11 @@ module.exports = function(grunt) {
408408
'update-version',
409409
'exec',
410410
'clean',
411+
'requirejs:yuidoc_theme',
411412
'requirejs',
412413
'copy',
413-
'assemble',
414414
'optimize',
415+
'assemble',
415416
'file_append',
416417
'compress',
417418
'i18n',

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

i18n-tracking.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
es:
22
src/data/en.yml:
3+
line 480: ' notes3'
34
line 44: ' description-roni'
45
line 45: ' project-phuong'
56
line 17: Showcase
@@ -170,8 +171,16 @@ es:
170171
line 551: ' credit-moon-xin'
171172
line 552: ' description-moon-xin'
172173
line 669: ' credit-moon-xin'
174+
line 481: ' notes1'
175+
line 482: ' notes2'
176+
line 483: ' notes3'
177+
line 484: ' notes4'
178+
line 485: ' notes5'
179+
line 608: ' book-1-authors'
180+
line 617: ' book-2-authors'
173181
zh-Hans:
174182
src/data/en.yml:
183+
line 480: ' notes3'
175184
line 44: ' description-roni'
176185
line 45: ' project-phuong'
177186
line 17: Showcase
@@ -269,3 +278,10 @@ zh-Hans:
269278
line 551: ' credit-moon-xin'
270279
line 552: ' description-moon-xin'
271280
line 669: ' credit-moon-xin'
281+
line 481: ' notes1'
282+
line 482: ' notes2'
283+
line 483: ' notes3'
284+
line 484: ' notes4'
285+
line 485: ' notes5'
286+
line 608: ' book-1-authors'
287+
line 617: ' book-2-authors'

offline-reference/extra/css/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
padding: 0.4em;
9090
margin: 1em 1.75em 0 0;
9191
width: 18.65em;
92+
float: left;
9293
color: #333 !important;
9394
height:7.45em;
9495
position: relative;

offline-reference/extra/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686

8787
<script src="./js/p5.min.js"></script>
8888
<script src="./js/p5.sound.min.js"></script>
89-
<script src="./js/p5.dom.min.js"></script>
9089
<script src="./js/render.js"></script>
9190
<!-- prism for code highlighting -->
9291
<script src="./js/vendor/prism.js"></script>

offline-reference/extra/js/reference.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4595,7 +4595,7 @@ define('router',[
45954595
get: function(searchClass, searchItem) {
45964596

45974597
// if looking for a library page, redirect
4598-
if ((searchClass === 'p5.dom' || searchClass === 'p5.sound')
4598+
if (searchClass === 'p5.sound')
45994599
&& !searchItem) {
46004600
window.location.hash = '/libraries/'+searchClass;
46014601
return;
@@ -4743,7 +4743,7 @@ require([
47434743
'./documented-method'], function(App, DocumentedMethod) {
47444744

47454745
// Set collections
4746-
App.collections = ['allItems', 'classes', 'events', 'methods', 'properties', 'p5.sound', 'p5.dom'];
4746+
App.collections = ['allItems', 'classes', 'events', 'methods', 'properties', 'p5.sound'];
47474747

47484748
// Get json API data
47494749
var data = referenceData;
@@ -4767,9 +4767,6 @@ require([
47674767
if (m.name == "p5.sound") {
47684768
App.sound.module = m;
47694769
}
4770-
else if (m.name == "p5.dom") {
4771-
App.dom.module = m;
4772-
}
47734770
});
47744771

47754772

@@ -4803,12 +4800,6 @@ require([
48034800
if (el.module === "p5.sound") {
48044801
App.sound.items.push(el);
48054802
}
4806-
else if (el.module === "p5.dom" || el.module === 'DOM') {
4807-
if (el.class === 'p5.dom') {
4808-
el.class = 'p5';
4809-
}
4810-
App.dom.items.push(el);
4811-
}
48124803
}
48134804
});
48144805

src/assets/css/main.css

Lines changed: 82 additions & 16 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 {
@@ -224,6 +226,7 @@
224226
padding: 0.4em;
225227
margin: 0 1.75em 0 0;
226228
width: 18.65em;
229+
float: left;
227230
color: #333 !important;
228231
height: 7.45em;
229232
position: relative;
@@ -438,6 +441,14 @@ div.reference-subgroup {
438441
margin: 1em 0 0 0;
439442
}
440443

444+
#item ul {
445+
margin-top: 0.5em;
446+
}
447+
448+
#item li {
449+
margin-bottom: 1em;
450+
}
451+
441452
.description {
442453
clear: both;
443454
display: block;
@@ -452,7 +463,8 @@ div.reference-subgroup {
452463

453464
.paramname {
454465
display: inline-block;
455-
width: 8em;
466+
min-width: 25%;
467+
margin-right: 1%;
456468
font-size: 1.2em;
457469
}
458470

@@ -464,10 +476,18 @@ div.reference-subgroup {
464476
.paramtype {
465477
display: inline-block;
466478
font-size: 1.2em;
467-
width: 20em;
479+
width: 73%;
468480
vertical-align: top;
469481
}
470482

483+
#library-page .group-name{
484+
display: inline-block;
485+
}
486+
487+
#library-page .group-name:hover {
488+
color: #ED225D;
489+
}
490+
471491

472492
/* EXAMPLES IN REF */
473493

@@ -908,6 +928,10 @@ h3.contribute-title {
908928
position: relative;
909929
}
910930

931+
.label .nounderline img{
932+
margin: .5em 0 0 0
933+
}
934+
911935
.label h3 {
912936
color: white;
913937
position: absolute;
@@ -928,6 +952,10 @@ h3 {
928952
height: fit-content;
929953
}
930954

955+
#learn-page .info {
956+
display: inline-block;
957+
}
958+
931959
#exampleDisplay,
932960
#exampleFrame,
933961
#exampleEditor {
@@ -1228,6 +1256,14 @@ img.gallery-img {
12281256
transition: all 0.3s;
12291257
}
12301258

1259+
@media (max-width: 500px) {
1260+
#showcase-page .nominate a,
1261+
#showcase-page .nominate a:visited {
1262+
padding: 0.4em 0.3em;
1263+
font: 1.3rem "Montserrat", sans-serif;
1264+
}
1265+
}
1266+
12311267
#showcase-page .nominate a:hover {
12321268
top: 4px;
12331269
left: 4px;
@@ -1706,6 +1742,10 @@ ul {
17061742
list-style: none;
17071743
}
17081744

1745+
ol {
1746+
font-size: 1.2em;
1747+
}
1748+
17091749
li {
17101750
margin: 0;
17111751
padding: 0;
@@ -1719,6 +1759,10 @@ ul.list_view {
17191759
font-size: 1.2em;
17201760
}
17211761

1762+
ol ul.list_view {
1763+
font-size: 1em;
1764+
}
1765+
17221766
ul.inside {
17231767
margin: 0 0 0 2em;
17241768
padding: 0;
@@ -2103,9 +2147,7 @@ footer {
21032147
.column.group-name {
21042148
margin-bottom: 1em;
21052149
}
2106-
#library-page .group-name:hover {
2107-
color: #ED225D;
2108-
}
2150+
21092151
#library-page .group-name {
21102152
margin: 2em 0 0.5em 0;
21112153
}
@@ -2242,6 +2284,9 @@ footer {
22422284
footer {
22432285
font-size: 0.5em;
22442286
}
2287+
.paramtype {
2288+
width: 96%;
2289+
}
22452290
}
22462291

22472292
@media (max-width:400px) {
@@ -2389,15 +2434,15 @@ iframe {
23892434

23902435
#get-started-page #asterisk-design-element,
23912436
#community-page #asterisk-design-element {
2392-
top: -30%;
2393-
right: -40%;
2394-
height: 44em;
2395-
width: 44em;
2396-
-webkit-transform: rotate(9deg);
2397-
-moz-transform: rotate(9deg);
2398-
-ms-transform: rotate(9deg);
2399-
-o-transform: rotate(9deg);
2400-
transform: rotate(9deg);
2437+
top: 10%;
2438+
right: -20%;
2439+
height: 30em;
2440+
width: 30em;
2441+
-webkit-transform: rotate(2deg);
2442+
-moz-transform: rotate(2deg);
2443+
-ms-transform: rotate(2deg);
2444+
-o-transform: rotate(2deg);
2445+
transform: rotate(2deg);
24012446
}
24022447

24032448
#reference-page #asterisk-design-element,
@@ -2424,18 +2469,39 @@ iframe {
24242469
transition: border-bottom 30ms linear;
24252470
width: 13em;
24262471
}
2427-
.email-octopus-form-row-subscribe button, .email-octopus-form-row-hp {
2472+
2473+
.email-octopus-form-row-hp {
24282474
position: absolute;
24292475
left: -5000px;
24302476
}
2477+
2478+
.email-octopus-form-row button {
2479+
border: 1px solid #ED225D;
2480+
color: #ED225D;
2481+
padding: 0.4em 0.6em;
2482+
margin: 1em 0 0 0;
2483+
font-family: "Montserrat", sans-serif;
2484+
display: block;
2485+
}
2486+
2487+
.email-octopus-form-row button:hover {
2488+
background-color: #ED225D;
2489+
color: white;
2490+
}
2491+
24312492
.email-octopus-email-address::-webkit-input-placeholder { color:#ABABAB; }
24322493
.email-octopus-email-address::-moz-placeholder { color:#ABABAB; }
24332494
.email-octopus-email-address:-moz-placeholder { color:#ABABAB; }
24342495
.email-octopus-email-address:-ms-input-placeholder { color:#ABABAB; }
24352496

24362497
@media (min-width: 720px) {
24372498
.email-octopus-email-address {
2438-
width: 20em;
2499+
width: 16em;
24392500
}
24402501

2502+
.email-octopus-form-row button {
2503+
margin: 0;
2504+
margin-left: 0.5em;
2505+
display: inline;
2506+
}
24412507
}
135 KB
Loading
86.6 KB
Loading
54.2 KB
Loading

0 commit comments

Comments
 (0)