Skip to content

Commit b4b6968

Browse files
authored
Merge pull request #2424 from bishabosha/add-discord-help-get-started
2 parents d240f10 + 9ef32aa commit b4b6968

File tree

6 files changed

+60
-19
lines changed

6 files changed

+60
-19
lines changed

_includes/getting-started.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
The instructions below cover both Scala 2 and Scala 3.
22

3+
<div class="inline-sticky-top">
4+
{% altDetails need-help-info-box 'Need Help?' class=help-info %}
5+
*If you are having trouble with setting up Scala, feel free to ask for help in the `#scala-users` channel of
6+
[our Discord](https://discord.com/invite/scala).*
7+
{% endaltDetails %}
8+
</div>
9+
310
## Try Scala without installing anything
411

512
To start experimenting with Scala right away, use <a href="https://scastie.scala-lang.org/pEBYc5VMT02wAGaDrfLnyw" target="_blank">“Scastie” in your browser</a>.

_plugins/alt-details-lib/alt-details.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Jekyll
44
module AltDetails
55
class AltDetailsBlock < Liquid::Block
6-
SYNTAX = /^\s*(#{Liquid::QuotedFragment})\s+(#{Liquid::QuotedFragment})/o
6+
SYNTAX = /^\s*(#{Liquid::QuotedFragment})\s+(#{Liquid::QuotedFragment})(?=\s+class=(#{Liquid::QuotedFragment}))?/o
77
Syntax = SYNTAX
88

99
alias_method :render_block, :render
@@ -18,6 +18,11 @@ def initialize(block_name, markup, tokens)
1818
if markup =~ SYNTAX
1919
@name = unquote($1)
2020
@title = unquote($2)
21+
@css_classes = ""
22+
if $3
23+
# append $3 to @css_classes
24+
@css_classes = "#{@css_classes} #{unquote($3)}"
25+
end
2126
else
2227
raise SyntaxError.new("Block #{block_name} requires an id and a title")
2328
end

_plugins/alt-details-lib/template.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="place-inline">
2-
<div id="<%= @name %>" class="alt-details">
2+
<div id="<%= @name %>" class="alt-details<%= @css_classes %>">
33
<input class="alt-details-control" type="checkbox" id="<%= @name %>__control" hidden aria-hidden="true">
44
<label class="alt-details-toggle" for="<%= @name %>__control"><%= @title %></label>
55
<div class="alt-details-detail">

_sass/base/helper.scss

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,45 @@
33
//------------------------------------------------
44

55
.wrap {
6-
@include outer-container;
7-
@include padding(0 20px);
6+
@include outer-container;
7+
@include padding(0 20px);
88
}
99

1010
.place-inline {
11-
// add vertical margin
12-
@include outer-container;
13-
@include margin(20px 0);
11+
// add vertical margin
12+
@include outer-container;
13+
@include margin(20px 0);
14+
}
15+
16+
.inline-sticky-top {
17+
position: sticky;
18+
top: 15px;
19+
background: #fff;
20+
-webkit-box-shadow: 0 0 18px 20px #fff;
21+
-moz-box-shadow: 0 0 18px 20px #fff;
22+
box-shadow: 0 0 18px 20px #fff;
23+
z-index: 999;
1424
}
1525

1626
.wrap-inline {
17-
// add vertical padding
18-
@include outer-container;
19-
@include padding(20px 0);
27+
// add vertical padding
28+
@include outer-container;
29+
@include padding(20px 0);
2030
}
2131

2232
.wrap-tab {
23-
@extend .wrap-narrow;
24-
margin-top: 20px;
25-
margin-bottom: 20px;
33+
@extend .wrap-narrow;
34+
margin-top: 20px;
35+
margin-bottom: 20px;
2636
}
2737

2838
.wrap-narrow {
29-
@include outer-container;
30-
@include padding(0 10px);
39+
@include outer-container;
40+
@include padding(0 10px);
3141
}
3242

3343
.dot {
34-
font-size: 10px;
35-
color: rgba($base-font-color-light, 0.6);
36-
margin: 0 3px;
44+
font-size: 10px;
45+
color: rgba($base-font-color-light, 0.6);
46+
margin: 0 3px;
3747
}

_sass/components/alt-details.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
//------------------------------------------------
33
//------------------------------------------------
44

5+
.alt-details.help-info {
6+
.alt-details-toggle {
7+
background-color: $brand-primary;
8+
color: white;
9+
10+
&:hover {
11+
background-color: darken($brand-primary, 15%);
12+
}
13+
}
14+
15+
.alt-details-detail {
16+
background: #fae6e6
17+
}
18+
}
19+
520
.alt-details {
621
@include span-columns(12);
722

@@ -35,6 +50,10 @@
3550

3651
}
3752

53+
.alt-details-control {
54+
margin: 0;
55+
}
56+
3857
.alt-details-control+.alt-details-toggle+.alt-details-detail {
3958
// by default, hide the details
4059
position: absolute;

_sass/layout/footer.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
text-align: center;
8585
z-index: 2;
8686
color: #f0f3f3;
87-
background-color: #dc322f;
87+
background-color: $brand-primary;
8888
border-radius: 50%;
8989
display: none;
9090

0 commit comments

Comments
 (0)