Optimize load time
This commit is contained in:
parent
81856ba7d9
commit
8337b4b817
45 changed files with 84 additions and 76 deletions
|
|
@ -2,28 +2,28 @@
|
|||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Nim by Example - <%= @item[:title] %></title>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css">
|
||||
<link rel="stylesheet" href="<%= @items['/stylesheets/main/'].path %>">
|
||||
<link rel="stylesheet" href="<%= @items['/stylesheets/colorful/'].path %>" title="colorful">
|
||||
<link rel="stylesheet" href="<%= @items['/stylesheets/fontello/'].path %>">
|
||||
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({tex2jax: {inlineMath: [['«', '»']]}});
|
||||
MathJax.Hub.config.tex2jax.skipTags = ["script", "noscript", "style", "textarea", "annotation", "annotation-xml"];
|
||||
</script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.5.3/config/TeX-AMS_HTML.js" async></script>
|
||||
<script src="/js/main.js" type="text/javascript"></script>
|
||||
<% if @config[:debug] %>
|
||||
<% for file in @config[:stylesheets] %>
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/<%= File.basename(file, ".*") %>.css">
|
||||
<% end %>
|
||||
<% for file in @config[:scripts] %>
|
||||
<script async src="/assets/js/<%= file %>"></script>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/all.css">
|
||||
<script async src="/assets/js/all.js"></script>
|
||||
<% end %>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', 'UA-58002512-1', 'auto');
|
||||
ga('require', 'displayfeatures');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
|
||||
<title>Nim by Example - <%= @item[:title] %></title>
|
||||
|
||||
<meta name="generator" content="nanoc <%= Nanoc::VERSION %>">
|
||||
<meta http-equiv="Default-Style" content="colorful">
|
||||
<meta name=viewport content="width=device-width, initial-scale=1">
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<div id="sidebar">
|
||||
<div class="abs-hamburger"><div class="nav-toggle" onclick="javascript:sidebarClick();"><span></span></div></div>
|
||||
<nav>
|
||||
<%= @items["/toc/"].compiled_content(snapshot: :last) %>
|
||||
<%= @items["/content/toc/"].compiled_content(snapshot: :last) %>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
</div>
|
||||
|
||||
<footer>
|
||||
<%= @items["/footer/"].compiled_content(snapshot: :last) %>
|
||||
<%= @items["/content/footer/"].compiled_content(snapshot: :last) %>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue