summaryrefslogtreecommitdiff
path: root/spec/_layouts/default.yml
blob: 64ba4a1639dfcf0b48b7016c47f5aa289218e41f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

  <link rel="icon" type="image/png" href="public/favicon.ico">
  <link rel="shortcut icon" type="image/png" href="public/favicon.ico">

  <script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [['$','$'], ['\\(','\\)']],
      skipTags: ['script', 'noscript', 'style', 'textarea'],
      processEscapes: true
    }
  });
  </script>
  <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/styles/default.min.css">
  <link rel="stylesheet" href="public/octicons/octicons.css">
  <script src="public/highlight/highlight.pack.js"></script>
  <script src="public/scripts/navigation.js"></script>

  <!-- need to use include to see value of page.chapter variable -->
  <style type="text/css">
    {% include numbering.css %}

    /* proper rendering of MathJax into highlighted code blocks */
    .fixws { white-space: pre; }
    .fixws .math { white-space: nowrap; }
  </style>
  <script type="text/javascript">
    // clear content of H3 nodes that start with "Example:"
    // the content is only there to determine ID of the H3 element (redcarpet doesn't let us set css id)
    $( document ).ready(function(){ $("h3[id*='example']").text("") })

    // no language auto-detect so that EBDF isn't detected as scala
    hljs.configure({
      languages: []
    });

    // syntax highlighting after mathjax is loaded so that mathjax can be used in code blocks
    MathJax.Hub.Queue(function () {
      hljs.initHighlighting();
      $("pre nobr").addClass("fixws");
    })

    // and finally TOC generation
    $(document).ready(function() {
      $('.toc').navigation();
    })
  </script>

  <link rel="stylesheet" type="text/css" href="public/stylesheets/screen.css">
  <link rel="stylesheet" type="text/css" media="print" href="public/stylesheets/print.css">
  <title>{{ page.title }}</title>
</head>

<body>
<div id="header">
<a alt="The Scala Language Specification" href="{{site.baseurl}}/"><img id="scala-logo" src="public/images/scala-logo-red-spiral-dark.png" />
<h1 class="no-numbering">Language Specification</h1></a>
</div>
<div id="container">
<div id="navigation">
<ol>
  {% assign sorted_pages = site.pages | sort:"name" %}
  {% for post in sorted_pages %}
    {% if post.chapter >= 0 %}
      {% if page.url == post.url %}
      <li class="active-page">
        <a href="{{site.baseurl}}{{ post.url }}"> {{ post.title }}</a>
        <div class="toc"></div>
      </li>
      {% else %}
      <li>
        <a href="{{site.baseurl}}{{ post.url }}"> {{ post.title }}</a>
      </li>
      {% endif %}
    {% endif %}
  {% endfor %}
</ol>
</div>
<div id="content-container">
{{ content }}
</div>
</div>
</body>
</html>