|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 6 | + <meta name="viewport" content="width=device-width"> |
| 7 | + |
| 8 | + <title>{{ site.title }}{% if page.title %} : {{ page.title }}{% endif %}</title> |
| 9 | + <meta name="description" content="{{ site.subtitle }}"> |
| 10 | + |
| 11 | + <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet"> |
| 12 | + <link rel="stylesheet" href="{{ site.baseurl }}/css/syntax.css"> |
| 13 | + <link rel="stylesheet" href="{{ site.baseurl }}/css/main.css"> |
| 14 | + </head> |
| 15 | + <body> |
| 16 | + |
| 17 | + <div class="container"> |
| 18 | + <div class=row-fluid> |
| 19 | + <div id=header class=span12> |
| 20 | + {% include header.html %} |
| 21 | + </div> |
| 22 | + </div> |
| 23 | + |
| 24 | + <div class=row-fluid> |
| 25 | + {% assign post_count = site.posts|size %} |
| 26 | + {% if site.navigation != 0 and site.navigation == 1 or post_count > 0 %} |
| 27 | + <div id=navigation class=span2> |
| 28 | + {% include navigation.html %} |
| 29 | + </div> |
| 30 | + |
| 31 | + <div id=content class=span10> |
| 32 | + {{ content }} |
| 33 | + </div> |
| 34 | + {% else %} |
| 35 | + <div id=content class=span12> |
| 36 | + {{ content }} |
| 37 | + </div> |
| 38 | + {% endif %} |
| 39 | + </div> |
| 40 | + |
| 41 | + {% if page.disqus == 1 %} |
| 42 | + <div class=row-fluid> |
| 43 | + {% if site.navigation == 1 or post_count > 0 %} |
| 44 | + <div id=navigation class=span2></div> |
| 45 | + <div id=disqus class=span10> |
| 46 | + {% include disqus.html %} |
| 47 | + </div> |
| 48 | + {% else %} |
| 49 | + <div id=disqus class=span12> |
| 50 | + {% include disqus.html %} |
| 51 | + </div> |
| 52 | + {% endif %} |
| 53 | + </div> |
| 54 | + {% endif %} |
| 55 | + |
| 56 | + <div class=row-fluid> |
| 57 | + <div id=footer class=span12> |
| 58 | + {% include footer.html %} |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + |
| 63 | + <script> |
| 64 | + function orderNav() { |
| 65 | + var list, |
| 66 | + section, |
| 67 | + header, |
| 68 | + sections = [], |
| 69 | + lists = {}, |
| 70 | + headers = {}; |
| 71 | + |
| 72 | + var navUl = document.querySelectorAll('#navigation ul')[0], |
| 73 | + navLis = document.querySelectorAll('#navigation ul li'); |
| 74 | + |
| 75 | + if (!navUl) return; |
| 76 | + |
| 77 | + for (var i = 0; i < navLis.length; i++) { |
| 78 | + var order, li = navLis[i]; |
| 79 | + |
| 80 | + if (li.classList.contains('nav-header')) { |
| 81 | + section = li.textContent || li.innerText; |
| 82 | + sections.push(section); |
| 83 | + headers[section] = li; |
| 84 | + continue; |
| 85 | + } |
| 86 | + |
| 87 | + if (!lists[section]) { |
| 88 | + lists[section] = []; |
| 89 | + } |
| 90 | + |
| 91 | + order = parseFloat(li.getAttribute('data-order')) |
| 92 | + lists[section].push([order, li]); |
| 93 | + } |
| 94 | + |
| 95 | + for (var i = 0; i < sections.length; i++) { |
| 96 | + section = sections[i]; |
| 97 | + list = lists[section].sort(function(a, b) { |
| 98 | + return a[0] - b[0]; |
| 99 | + }); |
| 100 | + |
| 101 | + if (header = headers[section]) { |
| 102 | + navUl.appendChild(header); |
| 103 | + } |
| 104 | + for (var j = 0; j < list.length; j++) { |
| 105 | + navUl.appendChild(list[j][1]); |
| 106 | + } |
| 107 | + } |
| 108 | + } |
| 109 | + |
| 110 | + if (document.querySelectorAll) orderNav(); |
| 111 | + </script> |
| 112 | + {% if site.google_analytics_id != "" %} |
| 113 | + {% include google_analytics.html %} |
| 114 | + {% endif %} |
| 115 | + </body> |
| 116 | +</html> |
0 commit comments