Skip to content

Commit a96c9e0

Browse files
author
Javier de Silóniz Sandino
authored
Merge pull request scala#34 from 47deg/sl9-internal-pages-implementation-set2
Internal pages implementation: community + all downloads pages
2 parents 4499102 + 2a0630f commit a96c9e0

File tree

69 files changed

+113
-63
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+113
-63
lines changed

_config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ collections:
3535
contribute_community_tickets:
3636
output: false
3737
books:
38-
output: false
38+
output: false
39+
downloads:
40+
output: true

_data/chats-forums.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Discourse forums
2+
discourseForums:
3+
- title: Scala Users Discourse
4+
subtitle: for general Scala questions, discussion and library announcements
5+
url: https://users.scala-lang.org/
6+
cssClass: scala-user-discourse
7+
- title: Scala Contributors Discourse
8+
subtitle: for Scala contributions, language evolution dicussions, standard library, Scala platform evolution discussions and more
9+
url: https://contributors.scala-lang.org/
10+
cssClass: scala-contributors-discourse
11+
12+
# Gitter channels
13+
gitterChannels:
14+
- name: scala
15+
url: https://gitter.im/scala/scala
16+
- name: center
17+
url: https://gitter.im/scala/center
18+
- name: contributors
19+
url: https://gitter.im/scala/contributors
20+
- name: pickling
21+
url: https://gitter.im/scala/pickling
22+
- name: scala-parser-combinator
23+
url: https://gitter.im/scala/scala-parser-combinator
24+
- name: collection-strawman
25+
url: https://gitter.im/scala/collection-strawman
26+
- name: scala-xml
27+
url: https://gitter.im/scala/scala-xml
28+
- name: scala-india
29+
url: https://gitter.im/scala/scala-india
30+
- name: community-builds
31+
url: https://gitter.im/scala/community-builds

_includes/downloads-list.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{% for top in (0..3) reversed %}
2+
{% for major in (0..20) reversed %}
3+
{% assign possibleVersionShort = top | append:'.' | append:major %}
4+
{% assign sz = possibleVersionShort | size %}
5+
{% if 3 == sz %}
6+
{% assign possibleVersion = possibleVersionShort | append:'.' %}
7+
{% else %}
8+
{% assign possibleVersion = possibleVersionShort %}
9+
{% endif %}
10+
{% for page in site.downloads %}
11+
{% assign releaseVersion = page.release_version | truncate:4, '' %}
12+
{% if releaseVersion == possibleVersion %}
13+
<div>
14+
<a href="{{ page.url }}">{{ page.title }}</a>
15+
</div>
16+
{% endif %}
17+
{% endfor %}
18+
{% endfor %}
19+
{% endfor %}

_includes/masthead-community.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<section class="table-of-content">
2+
<div class="wrap">
3+
<div class="inner-box">
4+
<div class="community">
5+
<div class="discourse">
6+
<h3>Discourse</h3>
7+
<span>Mailing list</span>
8+
<ul>
9+
{% for forum in site.data.chats-forums.discourseForums %}
10+
<li>
11+
<img src="/resources/img/frontpage/discourse-logo.png" alt="{{forum.title}}">
12+
<div>
13+
<h4><a href="{{forum.url}}">{{forum.title}}</a></h4>
14+
<p>{{forum.subtitle}}</p>
15+
</div>
16+
</li>
17+
{% endfor %}
18+
</ul>
19+
</div>
20+
<div class="gitter">
21+
<h3>Gitter</h3>
22+
<span>Real-time (topic-specialized) chat</span>
23+
<ul>
24+
{% for channel in site.data.chats-forums.gitterChannels %}
25+
<li>
26+
<a href="{{channel.url}}">
27+
<img src="/resources/img/frontpage/gitter-logo.png" alt="{{channel.name}}">
28+
<h4>{{channel.name}}</h4>
29+
</a>
30+
</li>
31+
{% endfor %}
32+
</ul>
33+
</div>
34+
</div>
35+
</div>
36+
</div>
37+
</section>

_layouts/frontpage.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,25 +291,25 @@ <h2><span>Talk to us!</span></h2>
291291
</div>
292292
<div class="discourse">
293293
<h3>Mailing lists / forums</h3>
294-
{% for forum in page.discourseForums %}
294+
{% for forum in site.data.chats-forums.discourseForums %}
295295
<a href="{{forum.url}}" class="{{forum.cssClass}}">
296-
<img src="/resources/img/frontpage/discourse-logo.png" alt="">
296+
<img src="/resources/img/frontpage/discourse-logo.png" alt="{{forum.title}}">
297297
<h4>{{forum.title}}</h4>
298298
<p>{{forum.subtitle}}</p>
299299
</a>
300300
{% endfor %}
301301
</div>
302302
<div class="gitter">
303303
<h3>Real-time (topic-specialized) chat</h3>
304-
{% assign modLimit = page.gitterChannels.size | modulo: 2 %}
304+
{% assign modLimit = site.data.chats-forums.gitterChannels.size | modulo: 2 %}
305305
{% capture channelLimit %}
306306
{% if modLimit != 0 %}
307-
{{page.gitterChannels.size | minus: 1}}
307+
{{site.data.chats-forums.gitterChannels.size | minus: 1}}
308308
{% else %}
309-
{{page.gitterChannels.size}}
309+
{{site.data.chats-forums.gitterChannels.size}}
310310
{% endif %}
311311
{% endcapture %}
312-
{% for channel in page.gitterChannels limit: channelLimit %}
312+
{% for channel in site.data.chats-forums.gitterChannels limit: channelLimit %}
313313
{% if forloop.first %}
314314
<ul class="first">
315315
{% endif %}

_layouts/inner-page-community.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: inner-page-parent
3+
---
4+
5+
<!-- Masthead -->
6+
{% include masthead-community.html %}
7+
8+
<!-- Main content -->
9+
{% include inner-page-main-content.html %}

community/index.md

Lines changed: 3 additions & 2 deletions

download/all.md

Lines changed: 4 additions & 21 deletions

index.md

Lines changed: 0 additions & 32 deletions

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)