diff options
Diffstat (limited to 'spec/_layouts')
-rw-r--r-- | spec/_layouts/default.yml | 72 | ||||
-rw-r--r-- | spec/_layouts/toc.yml | 26 |
2 files changed, 28 insertions, 70 deletions
diff --git a/spec/_layouts/default.yml b/spec/_layouts/default.yml index 64ba4a1639..69791d26ad 100644 --- a/spec/_layouts/default.yml +++ b/spec/_layouts/default.yml @@ -16,75 +16,31 @@ }); </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> + <script src="//code.jquery.com/jquery-2.1.3.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="(max-width: 1400px), (orientation: portrait)" href="public/stylesheets/screen-small.css"> <link rel="stylesheet" type="text/css" media="print" href="public/stylesheets/print.css"> + <link rel="stylesheet" type="text/css" href="public/stylesheets/fonts.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"> + <header> + <nav id="chapters"><a id="github" href="https://github.com/scala/scala/tree/2.11.x/spec"><img src="public/images/github-logo@2x.png" alt="Edit at Github"></a>{% assign sorted_pages = site.pages | sort:"name" %}{% for post in sorted_pages %}{% if post.chapter >= 0 %}<a href="{{site.baseurl}}{{ post.url }}">{{post.chapter}} {{ post.title }}</a>{% endif %}{% endfor %}</nav> + </header> + <aside class="left"><nav id="toc"></nav></aside> + + <main id="content"> {{ content }} -</div> -</div> + </main> + + <script src="public/scripts/toc.js"></script> + <script src="public/scripts/highlight.pack.js"></script> + <script src="public/scripts/main.js"></script> </body> </html> diff --git a/spec/_layouts/toc.yml b/spec/_layouts/toc.yml index caf0be1a3a..4da7d41bea 100644 --- a/spec/_layouts/toc.yml +++ b/spec/_layouts/toc.yml @@ -6,23 +6,25 @@ <link rel="icon" type="image/png" href="public/favicon.ico"> <link rel="shortcut icon" type="image/png" href="public/favicon.ico"> - <link rel="stylesheet" type="text/css" href="public/stylesheets/screen.css"> - <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> + <script src="//code.jquery.com/jquery-2.1.3.min.js"></script> <title>{{ page.title }}</title> - <script type="text/javascript"> - $(document).ready(function() { - $('#the-scala-language-specification').css('display','none'); - }) - </script> + <link rel="stylesheet" type="text/css" href="public/stylesheets/screen.css"> + <link rel="stylesheet" type="text/css" href="public/stylesheets/screen-toc.css"> + <link rel="stylesheet" type="text/css" href="public/stylesheets/fonts.css"> </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> +<header> + <div id="header-main"> + <img id="scala-logo" src="public/images/scala-spiral-white.png" /> + <span id="title">Scala Language Specification</span> + <a id="github" href="https://github.com/scala/scala/tree/2.11.x/spec"><img src="public/images/github-logo@2x.png" alt="Edit at Github"></a> + </div> + <div id="header-sub">Version 2.11</div> +</header> +<main> {{ content }} - +</main> </body> </html> |