Skip to content

Commit 9d3b915

Browse files
author
Javier de Silóniz Sandino
authored
Merge pull request scala#26 from 47deg/sl24-requested-changes-frontpage
Requested changes for the frontpage
2 parents e2a5f2a + 1836f52 commit 9d3b915

File tree

14 files changed

+32
-59
lines changed

14 files changed

+32
-59
lines changed

_data/common.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ twitterUrl: https://twitter.com/scala_lang
44
scaladexUrl: https://scaladex.scala-lang.org
55

66
texts:
7+
ensimeSupportedInIDE: ensime plugin available
8+
scalaCompilationEnvironments: Scala compiles to JVM and Javascript
79
onlineCoursesFree: Free (optional paid certificate)
810
onlineCoursesPaid: Paid (with certificate)
911
courseraLaunchPeriod: New sessions starting every 2 weeks!

_layouts/frontpage.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ <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>
7980
</div>
8081
</div>
8182
</div>
@@ -95,7 +96,7 @@ <h2><span>IDEs for Scala</span></h2>
9596
<ul>
9697
{% for ide in page.scalaIDEs %}
9798
<li>
98-
<a class="masterTooltip" href="{{ide.url}}">
99+
<a {% if ide.ensime == true %}class="masterTooltip" title="{{site.data.common.texts.ensimeSupportedInIDE}}"{% endif %} href="{{ide.url}}" target="_blank">
99100
{% if ide.ensime == true %}
100101
<span class="bullet">
101102
<img src="/resources/img/frontpage/icon-ensime.png" alt="">
@@ -234,7 +235,7 @@ <h2><span>What’s New</span></h2>
234235
</div>
235236
{% assign firstPost = site.posts | first %}
236237
<div class="content-card">
237-
<p class="{{tag-new}}">{{firstPost.post-type|upcase}}</p>
238+
<p class="tag-new">{{firstPost.post-type|upcase}}</p>
238239
<h3><a href="{{firstPost.url}}">{{firstPost.title}}</a></h3>
239240
<span class="date">{{firstPost.date | date: "%A, %B %-d, %Y"}}</span>
240241
<p>{{firstPost.content}}</p>

_scala_items/7-run-scala-in-the-browser.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

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.
1.6 KB
Loading
2.43 KB
Loading

resources/img/frontpage/epfl-logo.png

4.11 KB
Loading
3.46 KB
Loading

resources/img/frontpage/ibm-logo.png

1.5 KB
Loading
3.8 KB
Loading

resources/img/frontpage/sap-logo.png

2.11 KB
Loading
1.28 KB
Loading
3.03 KB
Loading

resources/js/functions.js

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,29 @@ $(document).ready(function() {
3535
});
3636
});
3737

38+
// Tooltip
39+
$(document).ready(function() {
40+
// Tooltip only Text
41+
$('.masterTooltip').hover(function(){
42+
// Hover over code
43+
var title = $(this).attr('title');
44+
$(this).data('tipText', title).removeAttr('title');
45+
$('<p class="tooltip"></p>')
46+
.text(title)
47+
.appendTo('body')
48+
.fadeIn('slow');
49+
}, function() {
50+
// Hover out code
51+
$(this).attr('title', $(this).data('tipText'));
52+
$('.tooltip').remove();
53+
}).mousemove(function(e) {
54+
var mousex = e.pageX + 20; //Get X coordinates
55+
var mousey = e.pageY + 10; //Get Y coordinates
56+
$('.tooltip')
57+
.css({ top: mousey, left: mousex })
58+
});
59+
});
60+
3861
// Highlight
3962
hljs.initHighlightingOnLoad();
4063

@@ -108,7 +131,7 @@ $('#scaladex-search').on('blur', function(e) {
108131
if (!$(e.target).is('.autocomplete-suggestion')) {
109132
if (lastElementClicked != null && !lastElementClicked.is('.autocomplete-suggestion')) {
110133
hideSuggestions();
111-
}
134+
}
112135
} else {
113136
hideSuggestions();
114137
}
@@ -144,15 +167,11 @@ $('#scaladex-search').autocomplete({
144167
suggestions.length > 0 ? showSuggestions() : hideSuggestions();
145168
},
146169
onSelect: function (suggestion) {
147-
console.log("onSelect");
148-
149170
if (suggestion.data != prevResult) {
150-
console.log("onSelect change: " + suggestion.data + "/" + prevResult);
151-
152171
prevResult = suggestion.data;
153172
hideSuggestions();
154173
$("#scaladex-search").blur();
155174
window.open(suggestion.data, '_blank');
156-
}
175+
}
157176
}
158-
})
177+
})

0 commit comments

Comments
 (0)