Skip to content

Commit 383af43

Browse files
authored
Merge pull request #852 from processing/teach
pre-final uiux design of /teach
2 parents 34620f1 + ec4b625 commit 383af43

File tree

10 files changed

+367
-14
lines changed

10 files changed

+367
-14
lines changed

i18n-tracking.yml

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
es:
22
src/data/en.yml:
3+
line 243: ' learn-title'
4+
line 256: teach
35
line 37: ' blmstatement1'
46
line 62: ' project-a-5-2-moon'
57
line 45: ' '
@@ -51,7 +53,6 @@ es:
5153
line 161: ' processing-transition3'
5254
line 162: ' processing-transition4'
5355
line 163: ' book1'
54-
line 270: ' showcase-intro1'
5556
line 271: ' showcase-intro2'
5657
line 272: ' showcase-intro3'
5758
line 273: ' showcase-intro4'
@@ -235,14 +236,38 @@ es:
235236
line 230: ' coordinate-system-simple-shapes-p1x1'
236237
line 239: ' p5.bots'
237238
line 248: ' Rotating knobs'
238-
line 256: ' '
239239
line 259: ' notes1'
240240
line 274: ' nominate-project'
241241
line 875: ' project-a-5-2-moon'
242+
243+
line 254: ' project-a-5-2-moon'
244+
line 255: ''
245+
line 500: ' teach-title2'
246+
line 501: ' teach-intro1'
247+
line 502: ' teach-intro2'
248+
line 503: ' teach-intro3'
249+
line 504: ' teach-intro4'
250+
line 505: ' teach-slider-title1'
251+
line 506: ' teach-slider-title2'
252+
line 507: ' teach-slider-title3'
253+
line 508: ' teach-results'
254+
line 878: ' teach-title2'
255+
line 879: ' teach-intro1'
256+
line 880: ' teach-intro2'
257+
line 881: ' teach-intro3'
258+
line 882: ' teach-intro4'
259+
line 883: ' teach-slider-title1'
260+
line 884: ' teach-slider-title2'
261+
line 885: ' teach-slider-title3'
262+
line 886: ' teach-results'
263+
242264
line 66: ' sketch_credits'
243265
line 67: ' sketch_info'
266+
244267
ko:
245268
src/data/en.yml:
269+
line 243: ' learn-title'
270+
line 256: teach
246271
line 37: ' blmstatement1'
247272
line 62: ' project-a-5-2-moon'
248273
line 45: ' '
@@ -478,14 +503,38 @@ ko:
478503
line 230: ' coordinate-system-simple-shapes-p1x1'
479504
line 239: ' p5.bots'
480505
line 248: ' Rotating knobs'
481-
line 256: ' '
482506
line 259: ' notes1'
483507
line 274: ' nominate-project'
484508
line 875: ' project-a-5-2-moon'
509+
510+
line 254: ' project-a-5-2-moon'
511+
line 255: ''
512+
line 500: ' teach-title2'
513+
line 501: ' teach-intro1'
514+
line 502: ' teach-intro2'
515+
line 503: ' teach-intro3'
516+
line 504: ' teach-intro4'
517+
line 505: ' teach-slider-title1'
518+
line 506: ' teach-slider-title2'
519+
line 507: ' teach-slider-title3'
520+
line 508: ' teach-results'
521+
line 878: ' teach-title2'
522+
line 879: ' teach-intro1'
523+
line 880: ' teach-intro2'
524+
line 881: ' teach-intro3'
525+
line 882: ' teach-intro4'
526+
line 883: ' teach-slider-title1'
527+
line 884: ' teach-slider-title2'
528+
line 885: ' teach-slider-title3'
529+
line 886: ' teach-results'
530+
485531
line 66: ' sketch_credits'
486532
line 67: ' sketch_info'
533+
487534
zh-Hans:
488535
src/data/en.yml:
536+
line 243: ' learn-title'
537+
line 256: teach
489538
line 37: ' blmstatement1'
490539
line 62: ' project-a-5-2-moon'
491540
line 45: ' '
@@ -721,9 +770,31 @@ zh-Hans:
721770
line 230: ' coordinate-system-simple-shapes-p1x1'
722771
line 239: ' p5.bots'
723772
line 248: ' Rotating knobs'
724-
line 256: ' '
725773
line 259: ' notes1'
726774
line 274: ' nominate-project'
727775
line 875: ' project-a-5-2-moon'
776+
777+
line 254: ' project-a-5-2-moon'
778+
line 255: ''
779+
line 500: ' teach-title2'
780+
line 501: ' teach-intro1'
781+
line 502: ' teach-intro2'
782+
line 503: ' teach-intro3'
783+
line 504: ' teach-intro4'
784+
line 505: ' teach-slider-title1'
785+
line 506: ' teach-slider-title2'
786+
line 507: ' teach-slider-title3'
787+
line 508: ' teach-results'
788+
line 878: ' teach-title2'
789+
line 879: ' teach-intro1'
790+
line 880: ' teach-intro2'
791+
line 881: ' teach-intro3'
792+
line 882: ' teach-intro4'
793+
line 883: ' teach-slider-title1'
794+
line 884: ' teach-slider-title2'
795+
line 885: ' teach-slider-title3'
796+
line 886: ' teach-results'
797+
728798
line 66: ' sketch_credits'
729799
line 67: ' sketch_info'
800+

src/assets/css/main.css

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,6 +1442,101 @@ h2.featuring{
14421442
font-size: 1.1rem;
14431443
}
14441444

1445+
.slidecontainer {
1446+
width: 100%; /* Width of the outside container */
1447+
}
1448+
1449+
/* ==========================================================================
1450+
Teach Page
1451+
========================================================================== */
1452+
#teach-page .accordion {
1453+
background-color: #eee;
1454+
color: #444;
1455+
cursor: pointer;
1456+
padding: 18px;
1457+
width: 100%;
1458+
text-align: left;
1459+
border: none;
1460+
outline: none;
1461+
transition: 0.4s;
1462+
}
1463+
1464+
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
1465+
#teach-page .active, .accordion:hover {
1466+
background-color: #ccc;
1467+
}
1468+
1469+
/* Style the accordion panel. Note: hidden by default */
1470+
#teach-page .panel {
1471+
padding: 0 18px;
1472+
background-color: white;
1473+
display: none;
1474+
overflow: hidden;
1475+
}
1476+
1477+
1478+
1479+
1480+
1481+
#teach-page .teach-intro p {
1482+
font: 200 1.4rem "Montserrat", sans-serif;
1483+
line-height: 1.5em;
1484+
}
1485+
1486+
#teach-page .teach-slider h2 {
1487+
font: 200 1.4rem "Montserrat", sans-serif;
1488+
color: #ed225d;
1489+
letter-spacing: 0.05rem;
1490+
}
1491+
1492+
#teach-page .teach-results {
1493+
border-bottom: 4px dotted #ed225d;
1494+
padding-bottom: 10px;
1495+
margin-bottom: 10px;
1496+
opacity: 1;
1497+
font: 400 1.4rem "Montserrat", sans-serif;
1498+
color: #ed225d;
1499+
line-height: 1.5em;
1500+
}
1501+
1502+
/* The slider itself */
1503+
.slider {
1504+
-webkit-appearance: none; /* Override default CSS styles */
1505+
appearance: none;
1506+
width: 80%; /* Full-width */
1507+
height: 0px; /* Specified height */
1508+
background: transparent; /* Grey background */
1509+
border-bottom: 4px dotted #ed225d; /* Remove outline */
1510+
opacity: .3; /* Set transparency (for mouse-over effects on hover) */
1511+
-webkit-transition: .2s; /* 0.2 seconds transition on hover */
1512+
transition: opacity .2s;
1513+
outline: none;
1514+
}
1515+
1516+
/* Mouse-over effects */
1517+
.slider:hover {
1518+
opacity: 1; /* Fully shown on mouse-over */
1519+
}
1520+
1521+
/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */
1522+
.slider::-webkit-slider-thumb {
1523+
/*-webkit-appearance: none; Override default look
1524+
appearance: none; */
1525+
width: 20px; /* Set a specific slider handle width */
1526+
height: 20px; /* Slider handle height */
1527+
background: url('../img/asterisk-01.png'); /* Green background */
1528+
cursor: pointer; /* Cursor on hover */
1529+
outline: none;
1530+
}
1531+
1532+
.slider::-moz-range-thumb {
1533+
width: 10px; /* Set a specific slider handle width */
1534+
height: 10px; /* Slider handle height */
1535+
background: url('../img/asterisk-01.png'); /* Green background */
1536+
cursor: pointer; /* Cursor on hover */
1537+
outline: none;
1538+
}
1539+
14451540
/* ==========================================================================
14461541
Chrome Frame prompt
14471542
========================================================================== */

src/assets/js/teach.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var acc = document.getElementsByClassName("accordion");
2+
var i;
3+
4+
for (i = 0; i < acc.length; i++) {
5+
acc[i].addEventListener("click", function() {
6+
this.classList.toggle("active");
7+
var panel = this.nextElementSibling;
8+
if (panel.style.maxHeight) {
9+
panel.style.maxHeight = null;
10+
} else {
11+
panel.style.maxHeight = panel.scrollHeight + "px";
12+
}
13+
});
14+
}

src/data/en.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ download:
228228
support-31-alt: ""
229229

230230
learn:
231-
learn-title: "Learn"
231+
learn-title: "Learn & "
232+
teach-title2: "Teach"
232233
learn1: "These tutorials provide more in-depth or step-by-step overviews of particular topics. Check out the "
233234
learn2: "examples page"
234235
learn3: "to explore short demonstrations of various p5.js topics."
@@ -858,4 +859,15 @@ showcase:
858859
project-a-3-4-moon: ". I was able to use and to teach this tool to visualize various ideas about time in motion."
859860
project-a-4-1-moon: "It was challenging for me, a beginner, to understand the overall structure of p5.js and how code works in general. I had to repeat the p5.js basics a couple of times, and then I drew a chart to memorize and to teach the way I understood the p5.js structure and code with strong constraints I set up. It was an excellent teaching and learning experience."
860861
project-a-5-1-moon: "Check out the "
861-
project-a-5-2-moon: " in Milan, Italy."
862+
project-a-5-2-moon: " in Milan, Italy."
863+
864+
teach:
865+
teach-title2: "Teach"
866+
teach-intro1: "intro1"
867+
teach-intro2: "intro2"
868+
teach-intro3: "intro3"
869+
teach-intro4: "intro4"
870+
teach-slider-title1: "Year"
871+
teach-slider-title2: "Region"
872+
teach-slider-title3: "Type"
873+
teach-results: "Results"

src/data/es.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ download:
228228
support-31-alt: ""
229229

230230
learn:
231-
learn-title: "Aprender"
231+
learn-title: "Aprender & "
232+
teach-title2: "Teach"
232233
learn1: "Estos tutoriales proveen una revisión en mayor profundidad o paso a paso sobre temas particulares. Revisa la "
233234
learn2: "página de ejemplos"
234235
learn3: " para explorar demostraciones cortas sobre diversos temas de p5.js."
@@ -857,4 +858,15 @@ showcase:
857858
project-a-3-4-moon: ". Pude usar y enseñar esta herramienta para visualizar varias ideas sobre el tiempo en movimiento."
858859
project-a-4-1-moon: "Para mí, un principiante, fue un desafío comprender la estructura general de p5.js y cómo funciona el código en general. Tuve que repetir los conceptos básicos de p5.js un par de veces, y luego dibujé un cuadro para memorizar y enseñar la forma en que entendí la estructura y el código de p5.js con fuertes restricciones que configuré. Fue una excelente experiencia de enseñanza y aprendizaje."
859860
project-a-5-1-moon: "Echa un vistazo a "
860-
project-a-5-2-moon: " en Milán, Italia."
861+
project-a-5-2-moon: " en Milán, Italia."
862+
863+
teach:
864+
teach-title2: "Teach"
865+
teach-intro1: "intro1"
866+
teach-intro2: "intro2"
867+
teach-intro3: "intro3"
868+
teach-intro4: "intro4"
869+
teach-slider-title1: "Year"
870+
teach-slider-title2: "Region"
871+
teach-slider-title3: "Type"
872+
teach-results: "Results"

src/data/ko.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ download:
228228
support-31-alt: ""
229229

230230
learn:
231-
learn-title: "배우기"
231+
learn-title: "배우기 & "
232+
teach-title2: "가르치기"
232233
learn1: "깊이있고 순차적인 설명과 튜토리얼을 주제별로 제공합니다. p5.js 함수를 종류별로 알고싶다면 "
233234
learn2: "예제"
234235
learn3: "를 클릭하세요."
@@ -858,4 +859,15 @@ showcase:
858859
project-a-3-4-moon: ". I was able to use and to teach this tool to visualize various ideas about time in motion."
859860
project-a-4-1-moon: "It was challenging for me, a beginner, to understand the overall structure of p5.js and how code works in general. I had to repeat the p5.js basics a couple of times, and then I drew a chart to memorize and to teach the way I understood the p5.js structure and code with strong constraints I set up. It was an excellent teaching and learning experience."
860861
project-a-5-1-moon: "Check out the "
861-
project-a-5-2-moon: " in Milan, Italy."
862+
project-a-5-2-moon: " in Milan, Italy."
863+
864+
teach:
865+
teach-title2: "가르치기"
866+
teach-intro1: "intro1"
867+
teach-intro2: "intro2"
868+
teach-intro3: "intro3"
869+
teach-intro4: "intro4"
870+
teach-slider-title1: "Year"
871+
teach-slider-title2: "Region"
872+
teach-slider-title3: "Type"
873+
teach-results: "Results"

src/data/zh-Hans.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Community: "社群"
1515
Contribute: "贡献"
1616
Forum: "论坛"
1717
Showcase: "Showcase"
18-
1918
footerxh1: "归功于"
2019
footer1: "p5.js 的原"
2120
footer2: "并在"
@@ -228,7 +227,8 @@ download:
228227
support-31-alt: ""
229228

230229
learn:
231-
learn-title: "学习"
230+
learn-title: "学习 & "
231+
teach-title2: "Teach"
232232
learn1: "以下教程将提供更多深入及详细的步骤,专注于特定的主题。请参考"
233233
learn2: "范例页面"
234234
learn3: "以查看 p5.js 多种功能的简单范例。"
@@ -858,4 +858,15 @@ showcase:
858858
project-a-3-4-moon: ". I was able to use and to teach this tool to visualize various ideas about time in motion."
859859
project-a-4-1-moon: "It was challenging for me, a beginner, to understand the overall structure of p5.js and how code works in general. I had to repeat the p5.js basics a couple of times, and then I drew a chart to memorize and to teach the way I understood the p5.js structure and code with strong constraints I set up. It was an excellent teaching and learning experience."
860860
project-a-5-1-moon: "Check out the "
861-
project-a-5-2-moon: " in Milan, Italy."
861+
project-a-5-2-moon: " in Milan, Italy."
862+
863+
teach:
864+
teach-title2: "Teach"
865+
teach-intro1: "intro1"
866+
teach-intro2: "intro2"
867+
teach-intro3: "intro3"
868+
teach-intro4: "intro4"
869+
teach-slider-title1: "Year"
870+
teach-slider-title2: "Region"
871+
teach-slider-title3: "Type"
872+
teach-results: "Results"

src/templates/pages/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ slug: /
3737
<h2 id="involvement-options" class="sr-only">{{#i18n "p4xp2"}}{{/i18n}}</h2>
3838
<ul aria-labelledby="involvement-options" class="list_view bullets">
3939
<li>{{#i18n "p4xp3"}}{{/i18n}}</li>
40-
<li>{{#i18n "p4xp4"}}{{/i18n}}</li>
40+
<li><a href="{{root}}/teach">{{#i18n "p4xp4"}}{{/i18n}}</a></li>
4141
<li><a href="https://day.processing.org" target="_blank">{{#i18n "p4xp5"}}{{/i18n}}</a></li>
4242
<li><a href="https://github.com/processing/p5.js/tree/main/contributor_docs"
4343
target="_blank">{{#i18n "p4xp6"}}{{/i18n}}</a></li>

0 commit comments

Comments
 (0)