Skip to content

Commit 79b846d

Browse files
authored
Merge pull request #187 from bjc-edc/generate-new-summaries
Generate Summaries
2 parents 9237581 + dc558ea commit 79b846d

218 files changed

Lines changed: 13535 additions & 5834 deletions

File tree

Some content is hidden

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

.tool-versions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
ruby 3.3.7
1+
python 3.11.11
2+
ruby 3.3.9

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ group :development, :test do
2828
gem 'rackup'
2929
gem 'webrick'
3030
end
31+
32+
gem "htmlbeautifier", "~> 1.4"

Gemfile.lock

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ GEM
3636
base64 (0.3.0)
3737
benchmark (0.4.1)
3838
bigdecimal (3.2.2)
39-
byebug (12.0.0)
4039
camertron-eprun (1.1.1)
4140
capybara (3.40.0)
4241
addressable
@@ -52,7 +51,6 @@ GEM
5251
launchy
5352
childprocess (5.0.0)
5453
cldr-plurals-runtime-rb (1.1.0)
55-
coderay (1.1.3)
5654
coercible (1.0.0)
5755
descendants_tracker (~> 0.0.1)
5856
concurrent-ruby (1.3.5)
@@ -68,6 +66,7 @@ GEM
6866
dumb_delegator (1.1.0)
6967
erb (5.0.1)
7068
fileutils (1.7.3)
69+
htmlbeautifier (1.4.3)
7170
i18n (1.14.7)
7271
concurrent-ruby (~> 1.0)
7372
ice_nine (0.11.2)
@@ -83,7 +82,6 @@ GEM
8382
childprocess (~> 5.0)
8483
logger (1.7.0)
8584
matrix (0.4.2)
86-
method_source (1.1.0)
8785
mini_mime (1.1.5)
8886
mini_portile2 (2.8.9)
8987
minitest (5.25.5)
@@ -115,12 +113,6 @@ GEM
115113
prettyprint
116114
prettyprint (0.2.0)
117115
prism (1.4.0)
118-
pry (0.15.2)
119-
coderay (~> 1.1)
120-
method_source (~> 1.0)
121-
pry-byebug (3.11.0)
122-
byebug (~> 12.0)
123-
pry (>= 0.13, < 0.16)
124116
psych (5.2.6)
125117
date
126118
stringio
@@ -224,10 +216,10 @@ DEPENDENCIES
224216
capybara
225217
capybara-screenshot
226218
debug
227-
fileutils
219+
fileutils (~> 1.7)
220+
htmlbeautifier (~> 1.4)
228221
i18n
229222
nokogiri
230-
pry-byebug
231223
rack (~> 3)
232224
rackup
233225
rspec
@@ -238,7 +230,7 @@ DEPENDENCIES
238230
webrick
239231

240232
RUBY VERSION
241-
ruby 3.3.7p123
233+
ruby 3.3.9p170
242234

243235
BUNDLED WITH
244236
2.6.9

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,17 @@ To contribute:
6767

6868
Of course, submitting issues is always welcome and encouraged! These issues can be bugs, questions, improvements or anything you'd like to share.
6969

70+
## Index and Summary Pages
71+
72+
See `utilties/build-tools/README.md` for information on how to build the index and summary pages.
73+
74+
```sh
75+
ruby utilities/build-tools/rebuild-all.rb
76+
```
77+
7078
## UC Berkeley Deployment Process
7179

72-
The UC Berkeley version is the `live` branch of the repo beautyjoy/bjc-r on GitHub.
80+
@beautyjoy/bjc-r serves bjc.berkeley.edu/bjc-r from the `main` branch.
7381

7482
## License
7583
[CC-BY-NC-SA 3.0][cc]

course/bjc4nyc.es.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h2>La belleza y alegría de la informática&mdash;<em>BJC</em></h2>
4646
<a href="/bjc-r/cur/snap-cheat-sheet.es.html" title="Guía de referencia rápida de Snap!">Guía de referencia rápida de Snap<em>!</em></a>
4747
</div>&mdash;Snap<em>!</em> comparado con el lenguaje del examen de AP
4848
<div class="topic_link">
49-
<a href="/bjc-r/cur/programming/index.es.html" title="Índice del vocabulario de BJC">Índice de BJC</a>
49+
<a href="/bjc-r/cur/programming/vocab-index.es.html" title="Índice del vocabulario de BJC">Índice de BJC</a>
5050
</div>&mdash;Lista de todo el vocabulario de BJC
5151
</div></div>
5252
<div class="topic_link">

course/bjc4nyc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ <h2>Welcome to the Beauty and Joy of Computing—<em>BJC</em></h2>
9696
title="Snap! Cheat Sheet">Snap<em>!</em> Cheat Sheet</a></span>&mdash;Snap<em>!</em> vs. AP exam language
9797
</p>
9898
<p>
99-
<span class="topic_link" style="text-align: center"><a href="/bjc-r/cur/programming/summaries/vocab-index.html" title="BJC Vocabulary Index">BJC Index</a></span>&mdash;list of all BJC Vocabulary
99+
<span class="topic_link" style="text-align: center"><a href="/bjc-r/cur/programming/vocab-index.html" title="BJC Vocabulary Index">BJC Index</a></span>&mdash;list of all BJC Vocabulary
100100
</p>
101101
</div>
102102
<div class="topic_link">

course/sparks.html

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,24 @@
1010
<h2>Beauty and Joy of Computing Sparks</h2>
1111
<p>Welcome to BJC! This class teaches computer programming using the <a href="https://snap.berkeley.edu/" title="Snap! programming language" target="_blank">Snap<em>!</em> programming language</a>, which lets you do powerful programming without worrying about punctuation as you would in a text-based language. You'll build projects about story-writing, music, secret messages, artificial intelligence (AI), and more! And you'll learn to use electronics to connect your code to the real world.</p>
1212

13+
<div class="sidenote">
14+
<p>
15+
<span class="topic_link" style="text-align: center"><a href="/bjc-r/sparks/student-pages/vocab-index.html" title="BJC Vocabulary Index">BJC Sparks Index</a></span>&mdash;list of all BJC Vocabulary
16+
</p>
17+
</div>
1318
<div style="float:right; padding-top:0px;">
14-
<div style="text-align:center;">
15-
<img src="/bjc-r/img/web/bjc-logo.png" alt="Beauty and Joy of Computing" title="Beauty and Joy of Computing" />
16-
</div>
19+
<div style="text-align:center;">
20+
<img src="/bjc-r/img/web/bjc-logo.png" alt="Beauty and Joy of Computing" title="Beauty and Joy of Computing" />
21+
</div>
1722
</div>
1823

1924

2025
<div class="topic_container">
2126
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/1-functions-data.topic" title="Unit 1: Functions and Data">Unit 1: Functions and Data</a></div>
22-
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/2-sequencing-iteration.topic" title="Unit 2: Sequencing and Iteration">Unit 2: Sequencing and Iteration</a></div>
23-
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/3-hardware.topic" title="Unit 3: Hardware">Unit 3: Hardware</a></div>
24-
</div>
27+
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/2-sequencing-iteration.topic" title="Unit 2: Sequencing and Iteration">Unit 2: Sequencing and Iteration</a></div>
28+
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/3-hardware.topic" title="Unit 3: Hardware">Unit 3: Hardware</a></div>
29+
</div>
30+
31+
2532
</body>
2633
</html>

css/bjc.css

100755100644
Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ h4, .h4 {
3131
padding: 5px 0px 0px 0px;
3232
}
3333

34+
/* Override some bootstrap defaults we don't want */
35+
label {
36+
margin-bottom: unset;
37+
font-weight: normal;
38+
}
39+
40+
3441
/* Roughly visually aligns with the default h4 style
3542
* To be used in curriculum boxes which contain subheadings.
3643
*/
@@ -41,16 +48,20 @@ h4, .h4 {
4148
padding: 5px 0px 0px 0px;
4249
}
4350

44-
.anchor {
45-
padding-top: 80px;
46-
margin-top: -80px;
47-
}
48-
4951
/* should have >= 3:1 contrast with black, 4.5:1 with white */
5052
a:visited:not(.btn-primary):not(.btn-nav) {
5153
color: #297694;
5254
}
5355

56+
.panel-heading a {
57+
color: #FFF;
58+
}
59+
60+
/* Need to keep the :not() selectors so this is more specific than the above one... */
61+
.panel-heading a:visited:not(.btn-primary):not(.btn-nav) {
62+
color: #FFF;
63+
}
64+
5465
a,
5566
.dialogue a {
5667
color: #3056AA; /* color: #28499F; */
@@ -256,10 +267,8 @@ code.break {
256267
/* a11y: TODO: this color matches Snap!, but does not have enough contrast with white. */
257268
var {
258269
padding: 0px;
259-
/* color: #f3761d; */
260270
color: #f1661d;
261271
font-weight: bold;
262-
font-size: 14pt;
263272
}
264273

265274
.classIndent {
@@ -714,6 +723,19 @@ table.truth tr td {
714723
width: 40%;
715724
}
716725

726+
/* These boxes are used on idex/summary pages for all vocab, AP exam, atwork, etc. *
727+
We should use `.vacab.summaryBox` instead of `.vocabSummary` and so on. */
728+
.summaryBox {
729+
width: 95%;
730+
margin-left: auto;
731+
margin-top: 0.5em;
732+
padding: 20px;
733+
text-indent: 0em;
734+
overflow: hidden;
735+
}
736+
737+
/* TODO-MB: We need to separate these into multiple composable classes. */
738+
/* TODO: After merging in new sumamries remove vocabSummary, examSummary, etc. */
717739
.vocabFullWidth,
718740
.examFullWidth,
719741
.vocabSummary,
@@ -726,11 +748,15 @@ table.truth tr td {
726748
text-indent: 0em;
727749
overflow: hidden;
728750
}
751+
729752
.vocabSummary,
730753
.examSummary {
731754
margin-right: auto;
732755
}
733756

757+
.summary .todo,
758+
.summary .comment,
759+
.summary .commentBig,
734760
.vocabSummary .todo,
735761
.vocabSummary .comment,
736762
.vocabSummary .commentBig,
@@ -754,7 +780,7 @@ table.truth tr td {
754780
.examBig:before,
755781
.examFullWidth:before,
756782
.examSummary:before {
757-
content: "On the AP Exam...";
783+
content: "On the AP Exam... ";
758784
font-size: 16px;
759785
font-weight: bold;
760786
line-height: 1.5em;
@@ -768,11 +794,24 @@ table.truth tr td {
768794
line-height: 1.5em;
769795
}
770796

797+
/* Override some basic vocab only settings */
798+
.vocab.summaryBox,
799+
.exam.summaryBox,
800+
.atwork.summaryBox {
801+
float: none;
802+
clear: both;
803+
}
804+
805+
/* TODO: Consider atwork and on the exam boxes. */
806+
.vocab.summaryBox:before,
807+
html[lang="es"] .vocab.summaryBox:before {
808+
content: none;
809+
}
810+
771811
html[lang="es"] .exam:before,
772812
html[lang="es"] .examBig:before,
773-
html[lang="es"] .examFullWidth:before,
774-
html[lang="es"] .examSummary:before {
775-
content: "En el examen AP...";
813+
html[lang="es"] .examFullWidth:before {
814+
content: "En el examen AP... ";
776815
}
777816

778817
html[lang="es"] .atwork:before,
@@ -782,8 +821,7 @@ html[lang="es"] .atworkFullWidth:before {
782821

783822
html[lang="es"] .vocab:before,
784823
html[lang="es"] .vocabBig:before,
785-
html[lang="es"] .vocabFullWidth:before,
786-
html[lang="es"] .vocabSummary:before {
824+
html[lang="es"] .vocabFullWidth:before {
787825
content: "Vocabulario";
788826
}
789827

@@ -1137,9 +1175,11 @@ div.map-links {
11371175
margin-bottom: 25px;
11381176
}
11391177

1140-
div.index-letter-link a {
1178+
div.index-letter-link a,
1179+
div.index-letter-link span {
11411180
font-size: 3em;
11421181
}
1182+
11431183
div.map-links a {
11441184
font-size: 1.2em;
11451185
}

cur/programming/1-introduction/3-drawing/7-programming-journal.es.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h2>Mantener un diario de programación</h2>
4343
</div>
4444

4545
<p>
46-
<!--<div class="sidenoteBig">No necesitas copiar cosas del plan de estudios en tu diario; siempre puedes buscarlas en el <a href="/bjc-r/cur/programming/summaries/vocab-index.es.html?course=bjc4nyc.es.html&novideo&noassignment" title="curriculum index">índice</a>.</div>-->
46+
<div class="sidenoteBig">No necesitas copiar cosas del plan de estudios en tu diario; siempre puedes buscarlas en el <a href="//bjc-r/cur/programming/vocab-index.es.html?course=bjc4nyc.es.html" title="curriculum index">índice</a>.</div>
4747
<strong>El diario es para ti, no para tu maestro/a.</strong> No serás calificado por lo que escribas o no escribas en él. El diario no se califica porque es un registro de las cosas que solo tú experimentas en la clase, no un registro de las ideas del plan de estudios. El diario será diferente para cada compañero.
4848
</p>
4949

cur/programming/1-introduction/3-drawing/7-programming-journal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h2>Keeping a Programming Journal</h2>
4242
</ul>
4343
</div>
4444

45-
<p><div class="sidenoteBig">You don't need to copy things out of the curriculum into your journal; you can always look those up in the <a href="/bjc-r/cur/programming/summaries/vocab-index.html?course=bjc4nyc.html&novideo&noassignment" title="curriculum index">index</a>.</div><strong>The journal is for you, not for your teacher.</strong> You won't be graded on what you do or don't put in it. The journal isn't graded because it's a record of the things only you experience in the class, not a record of the ideas in the curriculum. Everyone's journal will be different.</p>
45+
<p><div class="sidenoteBig">You don't need to copy things out of the curriculum into your journal; you can always look those up in the <a href="/bjc-r/cur/programming/vocab-index.html?course=bjc4nyc.html" title="curriculum index">index</a>.</div><strong>The journal is for you, not for your teacher.</strong> You won't be graded on what you do or don't put in it. The journal isn't graded because it's a record of the things only you experience in the class, not a record of the ideas in the curriculum. Everyone's journal will be different.</p>
4646

4747
</body>
4848
</html>

0 commit comments

Comments
 (0)