Skip to content

Commit 7207965

Browse files
authored
compress sublinks to single line (#1371)
1 parent 5aa8153 commit 7207965

File tree

3 files changed

+57
-42
lines changed

3 files changed

+57
-42
lines changed

_layouts/frontpage.html

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,27 @@ <h1>{{page.headerTitle}}</h1>
5454
<div class="resources">
5555
<div class="get-started">
5656
<a href="{{page.gettingStarted.mainUrl}}" class="button">{{page.gettingStarted.mainTitle | upcase}}</a>
57-
<ul>
58-
<li><a href="{{page.gettingStarted.subtitleLink}}">{{page.gettingStarted.subtitle}}</a></li>
59-
{% for link in page.gettingStarted.links %}
60-
<li><a href="{{link.url}}">{{link.title}}</a></li>
61-
{% endfor %}
62-
</ul>
57+
<div class="sublinks">
58+
<ul>
59+
<li><a href="{{page.gettingStarted.subtitleLink}}">{{page.gettingStarted.subtitle}}</a></li>
60+
{% for link in page.gettingStarted.links %}
61+
<li></li>
62+
<li><a href="{{link.url}}">{{link.title}}</a></li>
63+
{% endfor %}
64+
</ul>
65+
</div>
6366
</div>
6467
<div class="learn-scala">
6568
<a href="{{page.apiDocs.mainUrl}}" class="button">{{page.apiDocs.mainTitle | upcase}}</a>
66-
<ul>
67-
<li><a href="{{page.apiDocs.subtitleLink}}">{{page.apiDocs.subtitle}}</a></li>
68-
{% for link in page.apiDocs.links %}
69-
<li><a href="{{link.url}}">{{link.title}}</a></li>
70-
{% endfor %}
71-
</ul>
69+
<div class="sublinks">
70+
<ul>
71+
<li><a href="{{page.apiDocs.subtitleLink}}">{{page.apiDocs.subtitle}}</a></li>
72+
{% for link in page.apiDocs.links %}
73+
<li></li>
74+
<li><a href="{{link.url}}">{{link.title}}</a></li>
75+
{% endfor %}
76+
</ul>
77+
</div>
7278
</div>
7379
<div class="scala-brand-circle">
7480
<div class="circle-solid">

_sass/layout/scala-main-resources.scss

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

55
.scala-main-resources {
6-
height: 200px;
6+
height: 100px;
77
background: $gray-darker;
88
position: relative;
99

@@ -69,22 +69,18 @@
6969
margin-top: -48px;
7070

7171
ul {
72+
@include display(flex);
73+
@include align-items(center);
7274
margin-top: 12px;
73-
max-width: 180px;
7475
text-align: center;
7576

7677
li {
77-
&:first-child {
78-
border-bottom: $base-border-white;
79-
font-family: $heading-font-family;
80-
padding-bottom: 4px;
81-
margin-bottom: 2px;
82-
font-weight: $font-bold;
83-
84-
a {
85-
font-size: $font-size-large;
86-
}
87-
}
78+
display: inline-block;
79+
font-family: $heading-font-family;
80+
padding-bottom: 4px;
81+
margin-bottom: 2px;
82+
margin-right: 7px;
83+
font-weight: $font-bold;
8884

8985
a {
9086
color: rgba(#fff, 0.90);
@@ -101,8 +97,14 @@
10197
}
10298
}
10399

100+
.get-started {
101+
.sublinks {
102+
max-width: 180px;
103+
}
104+
}
105+
104106
.learn-scala {
105-
ul {
107+
.sublinks {
106108
float: right;
107109
}
108110
}
@@ -113,8 +115,6 @@
113115
left: 50%;
114116
top: -142px;
115117
margin-left: -140px;
116-
background: rgba($gray-darker, 0.4);
117-
border-radius: 100%;
118118
position: absolute;
119119
z-index: 60;
120120
@include display(flex);
@@ -123,15 +123,15 @@
123123

124124
.circle-solid {
125125
background: $gray-darker;
126-
width: 198px;
127-
height: 198px;
126+
width: 205px;
127+
height: 205px;
128128
border-radius: 100%;
129129
text-align: center;
130130

131131
> img {
132132
width: 152px;
133133
height: auto;
134-
margin-top: -40px;
134+
margin-top: -36px;
135135
}
136136

137137
.scala-version {
@@ -167,13 +167,25 @@
167167

168168
.resources {
169169
.get-started {
170-
margin-top: 180px;
170+
margin-top: 110px;
171171
}
172172

173173
.learn-scala {
174174
margin-top: 40px;
175175
}
176176

177+
.get-started {
178+
.sublinks {
179+
max-width: 100%;
180+
}
181+
}
182+
183+
.learn-scala {
184+
.sublinks {
185+
float: none;
186+
}
187+
}
188+
177189
.learn-scala,
178190
.get-started {
179191
@include span-columns(12);
@@ -186,8 +198,11 @@
186198
}
187199

188200
ul {
201+
@include span-columns(8);
202+
@include shift(2);
189203
max-width: 100%;
190204
float: none;
205+
align-items: center;
191206
}
192207
}
193208

index.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,21 @@ headerButtonUrl: "/what-is-scala/"
1111
gettingStarted:
1212
mainTitle: "Get Started"
1313
mainUrl: "https://docs.scala-lang.org/getting-started.html"
14-
subtitle: "All Scala Releases"
14+
subtitle: "All Releases"
1515
subtitleLink: "/download/all.html"
1616
links:
17-
- title: "API Documentation"
18-
url: "https://www.scala-lang.org/api/current/?_ga=1.241039811.1310790544.1468501313"
19-
- title: "API Docs (All Releases)"
17+
- title: "API Docs"
2018
url: "https://docs.scala-lang.org/api/all.html"
21-
- title: "Language Specification"
22-
url: "https://scala-lang.org/files/archive/spec/2.13/"
2319
apiDocs:
2420
mainTitle: "Learn Scala"
2521
mainUrl: "https://docs.scala-lang.org"
2622
subtitle: "Scala Book"
2723
subtitleLink: "https://docs.scala-lang.org/scala3/book/introduction.html"
2824
links:
29-
- title: "Tour of Scala"
25+
- title: "Tour"
3026
url: "https://docs.scala-lang.org/tour/tour-of-scala.html"
31-
- title: "Online Courses"
27+
- title: "Courses"
3228
url: "https://docs.scala-lang.org/online-courses.html"
33-
- title: "Scala 3 Reference"
34-
url: "https://docs.scala-lang.org/scala3/reference/overview.html"
3529

3630

3731
# Scala backends

0 commit comments

Comments
 (0)