Skip to content

Localized Overview index page #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions _includes/localized-overview-index.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% for enpost in site.categories.core %}
{% for post in site.pages %}
{% if post.overview and post.overview == enpost.overview and post.language == page.language %}

{% if post.partof %}
* {{ post.title }} <span class="label {{ post.label-color }}">{{ post.label-text }}</span>
{% for pg in site.pages %}
{% if pg.partof == post.partof and pg.outof and pg.language == page.language %}
{% assign totalPages = pg.outof %}
{% endif %}
{% endfor %}

{% if totalPages %}
<ul>
{% for i in (1..totalPages) %}
{% for pg in site.pages %}
{% if pg.partof == post.partof and pg.num and pg.num == i and pg.language == page.language %}
<li><a href="{{ pg.url }}">{{ pg.title }}</a></li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
{% else %} **ERROR**. Couldn't find the total number of pages in this set of tutorial articles. Have you declared the `outof` tag in your YAML front matter?
{% endif %}
{% else %}
{% if post.hidden == true %}
{% else %}
* [{{ post.title }}]({{ site.baseurl }}{{ post.url }}) <span class="label {{ post.label-color }}">{{ post.label-text }}</span>
{% endif %}
{% endif %}

{% endif %}
{% endfor %}
{% endfor %}
43 changes: 33 additions & 10 deletions _layouts/guides-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,39 @@
layout: index
---

<div class="span10">
{{ content }}
</div>
<div class="container">
<div class="row">
{% for pg in site.pages %}
{% if pg.layout == "guides-index" and pg.languages %}
{% assign languages = pg.languages %}
{% endif %}
{% endfor %}

<div class="span6">
<!-- <div class="page-header-index">
<h1>About</h1>
</div>
{% if page.language %}
{% capture intermediate %}{{ page.url | remove_first: page.language }}{% endcapture %}
{% capture rootIndexURL %}{{ intermediate | remove_first: '/' }}{% endcapture %}
{% else %}
{% assign rootIndexURL = page.url %}
{% endif %}

<p></p>
-->
</div>
<div class="span10">
{{ content }}
</div>

<div class="span6">
<!-- <div class="page-header-index">
<h1>About</h1>
</div>

<p></p>
-->

{% if languages %}
<a href="{{ site.baseurl }}{{ rootIndexURL }}"><img src="{{ site.baseurl }}/resources/images/language/en.png" title="Language: en"/></a>
{% for l in languages %}
<a href="{{ site.baseurl }}/{{ l }}{{ rootIndexURL }}"><img src="{{ site.baseurl }}/resources/images/language/{{ l }}.png" title="Language: {{ l }}"/></a>
{% endfor %}
{% endif %}
</div>
</div>
</div>
1 change: 1 addition & 0 deletions es/overviews/core/actors.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: The Scala Actors API
label-color: success
label-text: Available
language: es
overview: actors
---

**Philipp Haller and Stephen Tu**
Expand Down
7 changes: 7 additions & 0 deletions es/overviews/core/parallel-collections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: overview
overview: parallel-collections
partof: parallel-collections
language: es
title: Las Colecciones Paralelizadas
---
1 change: 1 addition & 0 deletions es/overviews/core/string-interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Interpolación de cadenas
disqus: true
label-color: success
label-text: New in 2.10
overview: string-interpolation
---

**Josh Suereth**
Expand Down
7 changes: 7 additions & 0 deletions ja/overviews/core/parallel-collections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: overview
overview: parallel-collections
partof: parallel-collections
language: ja
title: Scala 並列コレクションライブラリ
---
12 changes: 12 additions & 0 deletions ja/overviews/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: guides-index
language: ja
title: ガイドと概要
---

<div class="page-header-index">
<h1>コアライブラリ</h1>
</div>

{% include localized-overview-index.txt %}
<!--* Swing <span class="label important">In Progress</span>-->
1 change: 1 addition & 0 deletions overviews/core/_posts/2010-09-07-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ layout: overview
title: Scala's Collections Library
disqus: true
partof: collections
overview: collections
---
1 change: 1 addition & 0 deletions overviews/core/_posts/2010-11-30-actors.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: overview
title: The Scala Actors API
overview: actors
---

**Philipp Haller and Stephen Tu**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: overview
title: The Architecture of Scala Collections
overview: architecture-of-scala-collections
---

**Martin Odersky and Lex Spoon**
Expand Down
1 change: 1 addition & 0 deletions overviews/core/_posts/2012-03-27-parallel-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ layout: overview
title: Scala's Parallel Collections Library
disqus: true
partof: parallel-collections
overview: parallel-collections
---
1 change: 1 addition & 0 deletions overviews/core/_posts/2012-09-20-futures.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: overview
title: Futures and Promises
label-color: success
label-text: New in 2.10
overview: futures
---

**By: Philipp Haller, Aleksandar Prokopec, Heather Miller, Viktor Klang, Roland Kuhn, and Vojin Jovanovic**
Expand Down
1 change: 1 addition & 0 deletions overviews/core/_posts/2012-09-21-string-interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: String Interpolation
disqus: true
label-color: success
label-text: New in 2.10
overview: string-interpolation
---

**Josh Suereth**
Expand Down
1 change: 1 addition & 0 deletions overviews/core/_posts/2012-10-8-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Macros
label-color: success
label-text: New in 2.10
hidden: true
overview: macro
---

This document is in progress and will be ready in a few days.
Expand Down
1 change: 1 addition & 0 deletions overviews/core/_posts/2012-11-03-value-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: overview
title: Value Classes and Universal Traits
label-color: success
label-text: New in 2.10
overview: value-classes
---

**Mark Harrah**
Expand Down
1 change: 1 addition & 0 deletions overviews/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: guides-index
title: Guides and Overviews
languages: ja
---

<div class="page-header-index">
Expand Down