Skip to content

Commit

Permalink
Created new indexing mechanism for mutli-page tutorials. Still more w…
Browse files Browse the repository at this point in the history
…ork to be done.
  • Loading branch information
jsuereth committed Oct 21, 2011
1 parent 6f822c6 commit 279448e
Show file tree
Hide file tree
Showing 32 changed files with 97 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
_site
.DS_Store
.project
.settings
12 changes: 12 additions & 0 deletions _includes/tutorial-toc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div id="scroller-anchor">
<div id="scroller">
<p class="contents">Contents</p>
<ul>
{% for p in site.pages %}
{% if p.tutorial == page.tutorial %}
<li><a href="{{ p.url }}">{{p.title}}</a></li>
{% endif %}
{% endfor %}
</li>
</div>
</div>
26 changes: 26 additions & 0 deletions _layouts/tutorial.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: default
---
{% include header.txt %}
{% include topbar.txt %}

<div class="container">
<div class="row">

<h1>{{ site.title }}</h1>
{% if page.title %}<h1>{{ page.title }}</h1>{% endif %}

<div class="span10">
{{ content }}
{% if page.disqus == true %}{% include disqus.txt %}{% endif %}
</div>

<div class="span6">
{% include tutorial-toc.txt %}
</div>


</div>
</div>

{% include footer.txt %}
1 change: 1 addition & 0 deletions tutorials/tour/abstract-types.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: overview
title: Abstract Types
tutorial: scala-tour
---

In Scala, classes are parameterized with values (the constructor parameters) and with types (if classes are [generic](generic-classes.html)). For reasons of regularity, it is not only possible to have values as object members; types along with values are members of objects. Furthermore, both forms of members can be concrete and abstract.
Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/anonymous-function-syntax.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Anonymous Function Syntax
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/automatic-closures.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Automatic Type-Dependent Closure Construction
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/case-classes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Case Classes
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/classes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Classes
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/compound-types.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Compound Types
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/currying.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Currying
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/explicitly-typed-self-references.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Explicitly Typed Self References
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/extractor-objects.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Extractor Objects
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/generic-classes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Generic Classes
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/higher-order-functions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Higher-order Functions
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/implicit-parameters.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Implicit Parameters
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Tour of Scala
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/inner-classes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Inner Classes
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/local-type-inference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Local Type Inference
---
Scala has a built-in type inference mechanism which allows the programmer to omit certain type annotations. It is, for instance, often not necessary in Scala to specify the type of a variable, since the compiler can deduce the type from the initialization expression of the variable. Also return types of methods can often be omitted since they corresponds to the type of the body, which gets inferred by the compiler.
Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/lower-type-bounds.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Lower Type Bounds
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/mixin-class-composition.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Mixin Class Composition
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/nested-functions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Nested Functions
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/operators.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Operators
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/pattern-matching.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Pattern Matching
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/polymorphic-methods.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Polymorphic Methods
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/regular-expression-patterns.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Regular Expression Patterns
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/sequence-comprehensions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Sequence Comprehensions
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/traits.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Traits
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/unified_types.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Unified Types
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/upper-type-bounds.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Upper Type Bounds
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/variances.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Variances
---

Expand Down
3 changes: 2 additions & 1 deletion tutorials/tour/views.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: Views
---

Expand Down
3 changes: 2 additions & 1 deletion tour/xml-processing.md → tutorials/tour/xml-processing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: overview
layout: tutorial
tutorial: scala-tour
title: XML Processing
---

Expand Down

0 comments on commit 279448e

Please sign in to comment.