Skip to content

Commit 12655b1

Browse files
committed
Improve styling, adjust text.
1 parent 507bab4 commit 12655b1

File tree

8 files changed

+149
-36
lines changed

8 files changed

+149
-36
lines changed

_data/governance.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
cards:
22
- title: "Scala Improvement Process"
3-
description: "SIPs are the primary mechanism for proposing new features, collecting community feedback, and building consensus around future development."
3+
description: "The SIP is the primary mechanism for evolving the Scala language."
4+
expandText: "Process & People"
45
links:
56
- name: SIP Committee Members
67
url: https://docs.scala-lang.org/sips/process-specification.html#the-sip-committee
78
- name: SIP Process Specification
89
url: https://docs.scala-lang.org/sips/process-specification.html
910
- title: "Scala 3 Maintenance"
10-
description: "Who maintains the Scala 3 compiler?"
11+
description: "Managing the Scala 3 compiler, standard library and documentation."
12+
expandText: "Process & People"
1113
links:
12-
- name: People
14+
- name: Core Maintainers
1315
url: https://github.com/lampepfl/dotty/blob/main/MAINTENANCE.md#compiler
14-
- name: Process
16+
- name: Maintenance Procedures
1517
url: https://github.com/lampepfl/dotty/blob/main/MAINTENANCE.md
1618
- title: "Tooling"
17-
description: "Learn about who maintains the Scala tooling. Process and people are TBD, stay tuned."
19+
description: "Managing build tools, linters, IDEs, and other tools."
20+
expandText: "Process & People"
1821
links:
22+
- text: "Process and People are TBD, please stay tuned! However you can read below about the Scala Tooling Summit:"
1923
- name: "Scala Tooling Summit of March 2023"
2024
url: https://www.scala-lang.org/blog/2023/04/11/march-2023-scala-tooling-summit.html
2125
- title: "Moderation"
2226
description: "Learn about how is the Scala community moderated."
27+
expandText: "Process & People"
2328
links:
24-
- name: Code of Conduct
25-
url: https://www.scala-lang.org/conduct/
2629
- name: "Moderation Team"
2730
url: https://www.scala-lang.org/conduct/#contact
31+
- name: Code of Conduct
32+
url: https://www.scala-lang.org/conduct/
2833
- name: "Inclusive Language Guide"
2934
url: https://docs.scala-lang.org/contribute/inclusive-language-guide.html
3035
- name: "Communication Channels"

_includes/masthead-community.html

+22-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<section class="nutshell">
1+
<section class="governance">
22
<div class="wrap">
33
<div class="inner-box">
44
<div class="heading-box">
5-
<h3 id="governance">Governance</h3>
5+
<h2 id="governance">Governance</h2>
66
</div>
77
<div class="community">
88
<div class="scala-items-list">
@@ -18,19 +18,27 @@ <h3 id="governance">Governance</h3>
1818
<!-- Show the below content only if the scalaItem.expandable either doesn't exist or is false -->
1919
{% unless scalaItem.dontExpand %}
2020
{% capture box_content %}
21-
<ul class="vertical-buttons-list">
22-
{% for link in scalaItem.links %}
23-
<li><a href="{{ link.url }}" class="button">{{ link.name }}</a></li>
24-
{% endfor %}
25-
</ul>
21+
<div class="wrap">
22+
<ul class="vertical-buttons-list">
23+
{% for link in scalaItem.links %}
24+
{% if link.text %}
25+
<li><p>{{ link.text }}</p></li>
26+
{% else %}
27+
<li><a href="{{ link.url }}" class="button button-expand">{{ link.name }}</a></li>
28+
{% endif %}
29+
{% endfor %}
30+
</ul>
31+
</div>
2632
{% endcapture %}
2733
{% assign codeSnippets = codeSnippets | push: box_content %}
2834
{% endunless %}
29-
<div class="scala-item">
30-
<h3>{{scalaItem.title}}</h3>
31-
<p>{{scalaItem.description}}</p>
35+
<div class="scala-item scala-item__governance">
36+
<div class="top">
37+
<h4>{{scalaItem.title}}</h4>
38+
<p>{{scalaItem.description}}</p>
39+
</div>
3240
{% unless scalaItem.dontExpand %}
33-
<div class="button button-more">More...</div>
41+
<div class="button button-more">{{scalaItem.expandText}}</div>
3442
{% endunless %}
3543
</div>
3644
{% if loopIndexMod == 2 or forloop.last %}
@@ -54,7 +62,7 @@ <h3>{{scalaItem.title}}</h3>
5462
<div class="inner-box">
5563
<div class="community">
5664
<div class="discourse">
57-
<h3>Discourse</h3>
65+
<h2>Discourse</h2>
5866
<span>Forums</span>
5967
<ul>
6068
{% for forum in site.data.chats-forums.discourseForums %}
@@ -69,7 +77,7 @@ <h4><a href="{{forum.url}}">{{forum.title}}</a></h4>
6977
</ul>
7078
</div>
7179
<div class="discord">
72-
<h3>Discord</h3>
80+
<h2>Discord</h2>
7381
<span>Real-time chat</span>
7482
<ul>
7583
{% for server in site.data.chats-forums.discordServers %}
@@ -91,7 +99,7 @@ <h4>{{server.name}}</h4>
9199
<div class="wrap">
92100
<div class="inner-box">
93101
<div class="heading-box">
94-
<h3>Upcoming Events and Trainings</h3>
102+
<h2>Upcoming Events and Trainings</h2>
95103
</div>
96104
<div class="events-items-list">
97105
{% 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

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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+
65+
&:active {
66+
cursor: pointer;
67+
background: $gray-light;
68+
}
69+
70+
&.active {
71+
background: $gray-light;
72+
}
73+
}
74+
75+
.items-content {
76+
background: $gray-light;
77+
transition: $base-transition;
78+
79+
.items-code {
80+
display: none;
81+
padding: 5px 0;
82+
}
83+
}
84+
}
85+
}
86+
}

_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)