Skip to content

Commit ac67bfe

Browse files
authored
Merge pull request #1504 from scala/governance-block
Governance section
2 parents e9c6ab0 + e983985 commit ac67bfe

File tree

8 files changed

+233
-18
lines changed

8 files changed

+233
-18
lines changed

_data/governance.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
introText: The development of this page is in progress.
2+
cards:
3+
- title: "Scala Improvement Process"
4+
description: "The SIP is the primary mechanism for evolving the Scala language."
5+
expandText: "Process & People"
6+
links:
7+
- text: "This process aims to evolve Scala openly and collaboratively. Anyone from the community is welcome to submit a Scala Improvement Proposal (SIP), which is then reviewed and discussed by a Committee. Every month, the Committee votes on the proposals to accept in the language."
8+
- name: SIP Homepage
9+
url: https://docs.scala-lang.org/sips/index.html
10+
- name: SIP Committee Members
11+
url: https://docs.scala-lang.org/sips/process-specification.html#the-sip-committee
12+
- name: SIP Process Specification
13+
url: https://docs.scala-lang.org/sips/process-specification.html
14+
- title: "Scala 3 Maintenance"
15+
description: "Managing the Scala 3 compiler, standard library and documentation."
16+
expandText: "Process & People"
17+
links:
18+
- name: Core Maintainers
19+
url: https://github.com/lampepfl/dotty/blob/main/MAINTENANCE.md#compiler
20+
- name: Maintenance Procedures
21+
url: https://github.com/lampepfl/dotty/blob/main/MAINTENANCE.md
22+
- title: "Tooling"
23+
description: "Managing build tools, linters, IDEs, and other tools."
24+
expandText: "Process & People"
25+
links:
26+
- text: "Process and People are TBD, please stay tuned! However you can read below about the Scala Tooling Summit:"
27+
- name: "Scala Tooling Summit of March 2023"
28+
url: https://www.scala-lang.org/blog/2023/04/11/march-2023-scala-tooling-summit.html
29+
- title: "Moderation"
30+
description: "Learn how the Scala community is moderated."
31+
expandText: "Process & People"
32+
links:
33+
- text: "The Scala community is moderated by the Moderation Team over all the official communication channels. The moderation is governed by the Code of Conduct."
34+
- name: "Moderation Team"
35+
url: https://www.scala-lang.org/conduct/#contact
36+
- name: Code of Conduct
37+
url: https://www.scala-lang.org/conduct/
38+
- name: "Inclusive Language Guide"
39+
url: https://docs.scala-lang.org/contribute/inclusive-language-guide.html
40+
- name: "Communication Channels"
41+
url: https://docs.scala-lang.org/community/
42+
- title: "Scala Center"
43+
description: "The organization fostering the Scala community, education, and OSS library development."
44+
expandText: "Learn More"
45+
links:
46+
- name: "Homepage"
47+
url: https://scala.epfl.ch/
48+
- name: Team
49+
url: https://scala.epfl.ch/team.html
50+
- name: "Advisory Board"
51+
url: https://github.com/scalacenter/advisoryboard#the-scala-center-advisory-board
52+
- name: "5 Year Report"
53+
url: https://scala.epfl.ch/records/first-five-years/
54+
- title: "Scala 2 Maintenance"
55+
description: "Who maintains the Scala 2 compiler?"
56+
expandText: "Process & People"
57+
links:
58+
- name: "Contribution Process"
59+
url: "https://github.com/scala/scala#how-to-contribute"
60+
- name: "Core Maintainers"
61+
url: "https://github.com/scala/scala#get-in-touch"

_includes/masthead-community.html

+63-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,69 @@
1+
<section class="governance">
2+
<div class="wrap">
3+
<div class="inner-box">
4+
<div class="heading-box">
5+
<h2 id="governance">Governance</h2>
6+
<p>{{site.data.governance.introText}}</p>
7+
</div>
8+
<div class="community">
9+
<div class="scala-items-list">
10+
<div class="items-menu">
11+
{% for scalaItem in site.data.governance.cards %}
12+
{% assign loopIndexMod = forloop.index | minus: 1 | modulo: 3 %}
13+
14+
{% if loopIndexMod == 0 %}
15+
{% assign codeSnippets = '' | split: ',' %}
16+
<div class="wrap">
17+
{% endif %}
18+
19+
<!-- Show the below content only if the scalaItem.expandable either doesn't exist or is false -->
20+
{% unless scalaItem.dontExpand %}
21+
{% capture box_content %}
22+
<div class="wrap">
23+
<ul class="vertical-buttons-list">
24+
{% for link in scalaItem.links %}
25+
{% if link.text %}
26+
<li><p>{{ link.text }}</p></li>
27+
{% else %}
28+
<li><a href="{{ link.url }}" class="button button-expand" target="_blank" rel="none">{{ link.name }}</a></li>
29+
{% endif %}
30+
{% endfor %}
31+
</ul>
32+
</div>
33+
{% endcapture %}
34+
{% assign codeSnippets = codeSnippets | push: box_content %}
35+
{% endunless %}
36+
<div class="scala-item scala-item__governance">
37+
<div class="top">
38+
<h4>{{scalaItem.title}}</h4>
39+
<p>{{scalaItem.description}}</p>
40+
</div>
41+
{% unless scalaItem.dontExpand %}
42+
<div class="button button-more">{{scalaItem.expandText}}</div>
43+
{% endunless %}
44+
</div>
45+
{% if loopIndexMod == 2 or forloop.last %}
46+
</div>
47+
<div class="items-content">
48+
{% for snippet in codeSnippets %}
49+
<div class="items-code">{{snippet}}</div>
50+
{% endfor %}
51+
</div>
52+
{% endif %}
53+
{% endfor %}
54+
</div>
55+
</div>
56+
</div>
57+
</div>
58+
</div>
59+
</section>
60+
161
<section class="table-of-content">
262
<div class="wrap">
363
<div class="inner-box">
464
<div class="community">
565
<div class="discourse">
6-
<h3>Discourse</h3>
66+
<h2>Discourse</h2>
767
<span>Forums</span>
868
<ul>
969
{% for forum in site.data.chats-forums.discourseForums %}
@@ -18,7 +78,7 @@ <h4><a href="{{forum.url}}">{{forum.title}}</a></h4>
1878
</ul>
1979
</div>
2080
<div class="discord">
21-
<h3>Discord</h3>
81+
<h2>Discord</h2>
2282
<span>Real-time chat</span>
2383
<ul>
2484
{% for server in site.data.chats-forums.discordServers %}
@@ -40,7 +100,7 @@ <h4>{{server.name}}</h4>
40100
<div class="wrap">
41101
<div class="inner-box">
42102
<div class="heading-box">
43-
<h3>Upcoming Events and Trainings</h3>
103+
<h2>Upcoming Events and Trainings</h2>
44104
</div>
45105
<div class="events-items-list">
46106
{% assign upcomingEvents = '' | split: ',' %}

_layouts/frontpage.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ <h2><span>Scala in a Nutshell</span></h2>
123123
<div class="scala-item">
124124
<h3>{{scalaItem.shortTitle}}</h3>
125125
<p>{{scalaItem.shortDescription}}</p>
126-
<div class="button">More...</div>
126+
<div class="button button-more">More...</div>
127127
</div>
128128
{% if loopIndexMod == 2 or forloop.last %}
129129
</div>

_sass/layout/governance.scss

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// GOVERNANCE
2+
//------------------------------------------------
3+
//------------------------------------------------
4+
5+
.governance {
6+
// background: $gray-nutshell;
7+
8+
.vertical-buttons-list {
9+
@include display(flex);
10+
@include flex-direction(column);
11+
@include justify-content(space-between);
12+
padding: 15px 0;
13+
li {
14+
margin-bottom: 10px;
15+
}
16+
// @include align-items(center);
17+
// @include justify-content(flex-start);
18+
}
19+
20+
.button-expand {
21+
text-align: center;
22+
display: block;
23+
}
24+
25+
.button-more {
26+
font-size: $font-size-small;
27+
padding: 5px;
28+
cursor: pointer;
29+
}
30+
31+
.scala-items-list {
32+
.items-menu {
33+
.scala-item {
34+
@include span-columns(4);
35+
@include omega(3n);
36+
37+
@include display(flex);
38+
@include flex-direction(column);
39+
// @include align-items(center);
40+
@include justify-content(space-between);
41+
padding: 15px 10px;
42+
text-align: center;
43+
transition: $base-transition;
44+
// border: 1px solid $gray-light;
45+
margin-top: 15px;
46+
@include bp(large) {
47+
@include span-columns(12);
48+
}
49+
50+
min-height: 150px;
51+
52+
h4 {
53+
font-size: $font-size-h3;
54+
color: #000;
55+
text-transform: uppercase;
56+
font-family: $base-font-family;
57+
margin-bottom: 10px;
58+
}
59+
60+
p {
61+
font-size: $font-size-medium;
62+
}
63+
64+
&.active {
65+
background: $gray-light;
66+
}
67+
}
68+
69+
.items-content {
70+
background: $gray-light;
71+
transition: $base-transition;
72+
73+
.items-code {
74+
display: none;
75+
padding: 5px 0;
76+
}
77+
}
78+
}
79+
}
80+
}

_sass/layout/table-of-content.scss

+9-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
padding-bottom: 0;
1919
}
2020
}
21+
.governance {
22+
margin-bottom: $padding-medium;
23+
24+
.inner-box {
25+
padding-bottom: 0;
26+
}
27+
}
2128
}
2229

2330
.documentation {
@@ -81,8 +88,9 @@
8188
padding-bottom: $padding-small;
8289
.discourse,
8390
.discord {
84-
h3 {
91+
h2 {
8592
margin-top: 0;
93+
font-size: $font-size-title;
8694
}
8795
@include span-columns(6);
8896

_sass/utils/_variables.scss

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ $base-font-size: $em-base;
5353
//------------------------------------------------
5454
$font-size-carousel-arrow: 1.8rem;
5555
$font-size-logo-btn: 1.4rem;
56+
$font-size-title: 1.5rem; // 25px
5657
$font-size-large: 1.063rem; // 17px
5758
$font-size-medium: 0.9375rem; // 15px
5859
$font-size-small: 0.875rem; // 14px

resources/css/style.scss

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
@import 'layout/twitter-feed';
3535
@import 'layout/ides';
3636
@import 'layout/nutshell';
37+
@import 'layout/governance';
3738
@import 'layout/community-frontpage';
3839
@import 'layout/courses';
3940
@import 'layout/upcoming-events';

resources/js/functions.js

+17-13
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,24 @@ $(document).ready(function() {
2020

2121
items.each(function(index2, button) {
2222
var jButton = $(button);
23-
jButton.click(function(event) {
24-
var activeCode = contents.eq(index2);
25-
var others = allContents.not(activeCode);
26-
allButtons.removeClass('active');
27-
others.hide();
28-
29-
if (activeCode.is(":visible")) {
30-
activeCode.hide();
31-
} else {
32-
jButton.addClass('active')
33-
activeCode.show();
34-
}
23+
var expandButton = jButton.children('.button-more');
24+
if (expandButton.length > 0) {
25+
var target = jButton.is('.scala-item__governance') ? expandButton : jButton;
26+
target.click(function(event) {
27+
var activeCode = contents.eq(index2);
28+
var others = allContents.not(activeCode);
29+
allButtons.removeClass('active');
30+
others.hide();
31+
32+
if (activeCode.is(":visible")) {
33+
activeCode.hide();
34+
} else {
35+
jButton.addClass('active')
36+
activeCode.show();
37+
}
3538

36-
});
39+
});
40+
}
3741
});
3842
});
3943
});

0 commit comments

Comments
 (0)