Skip to content

Commit 616cd10

Browse files
committed
address comments
1 parent 40f3fd6 commit 616cd10

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

_overviews/scala3-book/taste-hello-world.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ object hello {
3030
```
3131
> In this code, we defined a method named `main`, inside a Scala `object` named `hello`.
3232
> An `object` in Scala is similar to a `class`, but defines a singleton instance that you can pass around.
33-
> `main` takes an input parameter named `args` that must be typed as `Array[String]`, (ignore it for now).
33+
> `main` takes an input parameter named `args` that must be typed as `Array[String]`, (ignore `args` for now).
3434
3535
{% endtab %}
3636

_sass/components/tab.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@
122122
left: -999em;
123123
}
124124
}
125+
126+
blockquote {
127+
border: none;
128+
border-left: 4px solid $base-border-color-gray;
129+
padding: 4px 20px;
130+
}
125131
}
126132

127133
.tabsection>input:nth-child(1):checked~.tabcontent section:nth-child(1),

resources/js/functions.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ $(document).ready(function() {
403403
return ({
404404
getPreference(key, defaultValue) {
405405
const res = localStorage.getItem(`${namespace}.${key}`);
406-
return !res ? defaultValue : res;
406+
return res === null ? defaultValue : res;
407407
},
408408
setPreference(key, value, onChange) {
409409
const old = this.getPreference(key, null);
@@ -415,6 +415,14 @@ $(document).ready(function() {
415415
});
416416
};
417417

418+
/** Links all tabs created in Liquid templates with class ".tabs-scala-version"
419+
* on the page together, such that
420+
* changing a tab to `Scala 2` will activate all other tab sections to
421+
* also change to "Scala 2".
422+
* Also records a preference for the Scala version in localStorage, so
423+
* that when the page is refreshed, the same tab will be selected.
424+
* On page load, selects the tab corresponding to stored Scala version.
425+
*/
418426
function setupScalaVersionTabs(scalaVersionTabs) {
419427
const BookStorage = Storage('org.scala-lang.docs.scala3.book');
420428
const Scala3 = 'scala-3';

0 commit comments

Comments
 (0)