Skip to content

Commit f45f4d9

Browse files
author
Javier de Silóniz Sandino
authored
Merge pull request scala#28 from 47deg/sl27-adding-jvm-js-box-and-scala-in-the-browser-section
New frontpage features
2 parents 9d3b915 + 333df6a commit f45f4d9

File tree

14 files changed

+10225
-6
lines changed

14 files changed

+10225
-6
lines changed

_data/common.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
githubUrl: https://github.com/scala/scala
33
twitterUrl: https://twitter.com/scala_lang
44
scaladexUrl: https://scaladex.scala-lang.org
5+
scastieUrl: https://scastie.scala-lang.org
56

67
texts:
8+
scalaBackendsTitle: Scala runs on...
9+
scalaBackendsMore: with more backends on the way.
710
ensimeSupportedInIDE: ensime plugin available
8-
scalaCompilationEnvironments: Scala compiles to JVM and Javascript
911
onlineCoursesFree: Free (optional paid certificate)
1012
onlineCoursesPaid: Paid (with certificate)
1113
courseraLaunchPeriod: New sessions starting every 2 weeks!

_includes/footer.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/scala.min.js" type="text/javascript"></script>
7070
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/java.min.js" type="text/javascript"></script>
7171

72+
<!-- CodeMirror -->
73+
<script src="{{ site.baseurl }}/resources/js/vendor/codemirror/codemirror.js" type="text/javascript"></script>
74+
<script src="{{ site.baseurl }}/resources/js/vendor/codemirror/clike.js" type="text/javascript"></script>
75+
7276
<!-- Custom javascript -->
7377
<script src="{{ site.baseurl }}/resources/js/functions.js" type="text/javascript"></script>
7478
</body>

_includes/headertop.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
<link href="{{ site.baseurl }}/resources/css/unslider.css" rel="stylesheet" type="text/css">
1919
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/solarized-dark.min.css" rel="stylesheet" type="text/css">
2020
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/style.css" type="text/css" />
21-
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/scaladex.css" type="text/css" />
21+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/vendor/codemirror.css" type="text/css" />
22+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/vendor/monokai.css" type="text/css" />
2223

2324
<!-- Typekit (should stay at top of page, do not move to footer)-->
2425
<!--<script type="text/javascript" src="//use.typekit.net/abh3wgk.js"></script>

_includes/scastie.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<section class="run-scala">
2+
<div class="wrap">
3+
<div class="heading-line">
4+
<h2><span>Run Scala in your browser</span></h2>
5+
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer commodo neque eget placerat dapibus. Mauris ullamcorper dui eu pellentesque venenatis. Nam non elit vitae dolor posuere eleifend a facilisis diam</p>
6+
</div>
7+
</div>
8+
<div class="call-to-action action-medium">
9+
<a href="{{site.data.common.scastieUrl}}" class="button" target="_blank">Learn More</a>
10+
</div>
11+
<div class="wrap">
12+
<div class="code-element">
13+
<div class="bar-code"></div>
14+
<div class="scastie-code-container">
15+
<textarea id="scastie-textarea"></textarea>
16+
</div>
17+
<div class="btn-run">
18+
<i class="fa fa-play"></i>
19+
<span>Run Scala code interactively</span>
20+
</div>
21+
</div>
22+
</div>
23+
</section>

_layouts/frontpage.html

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ <h1>{{page.headerTitle}}</h1>
7676
<div class="scala-version">
7777
<span>Scala</span>
7878
<span>{{page.currentScalaVersion}}</span>
79-
<p>{{site.data.common.texts.scalaCompilationEnvironments}}</p>
8079
</div>
8180
</div>
8281
</div>
@@ -87,6 +86,24 @@ <h1>{{page.headerTitle}}</h1>
8786

8887

8988
<main id="site-main">
89+
<!-- Scala backends -->
90+
<section class="runs">
91+
<div class="wrap">
92+
<h2>{{site.data.common.texts.scalaBackendsTitle}}</h2>
93+
<ul>
94+
{% for backend in page.scalaBackends %}
95+
<li class="masterTooltip" title="{{backend.description}}">
96+
<span>
97+
<img src="{{backend.icon}}" alt="{{backend.description}}">
98+
</span>
99+
</li>
100+
{% unless forloop.last %}<li></li>{% endunless %}
101+
{% endfor %}
102+
</ul>
103+
<p><span>- {{site.data.common.texts.scalaBackendsMore}} -</span></p>
104+
</div>
105+
</section>
106+
90107
<!-- IDEs for Scala -->
91108
<section class="ides">
92109
<div class="wrap">
@@ -155,6 +172,9 @@ <h3>{{scalaItem.shortTitle}}</h3>
155172
</div>
156173
</section>
157174

175+
<!-- Run Scala in your browser -->
176+
{% include scastie.html %}
177+
158178
<!-- Courses -->
159179
<section class="courses">
160180
<div class="wrap">
@@ -205,7 +225,7 @@ <h4>{{event.title}}</h4>
205225
<div class="wrap">
206226
<div class="heading-line">
207227
<h2><span>{{page.ecosystemTitle}}</span></h2>
208-
<p>{{page.ecosystemDescription}}</p>
228+
<p class="lead">{{page.ecosystemDescription}}</p>
209229
</div>
210230
<div class="browser">
211231
<div class="header-browser">

index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ apiDocs:
3333

3434
currentScalaVersion: "2.12.1"
3535

36+
# Scala backends
37+
scalaBackends:
38+
- icon: /resources/img/frontpage/java-logo.png
39+
description: JVM
40+
- icon: /resources/img/frontpage/js-logo.png
41+
description: javascript on your browser
42+
3643
# Scala IDEs
3744
scalaIDEs:
3845
- name: IntelliJ

resources/css/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)