|
17 | 17 | <meta name="twitter:description" content="<%- theme.site_description %>">
|
18 | 18 | <meta name="twitter:image" content="https://<%- theme.root_domain %>/images/logo.png">
|
19 | 19 |
|
| 20 | + <link rel="icon" href="/images/logo.png" type="image/x-icon"> |
| 21 | + |
20 | 22 | <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono' rel='stylesheet' type='text/css'>
|
21 | 23 | <link href='//fonts.googleapis.com/css?family=Dosis:500&text=Vue.js' rel='stylesheet' type='text/css'>
|
22 |
| - <link href="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" rel='stylesheet' type='text/css'> |
23 |
| - <link rel="icon" href="/images/logo.png" type="image/x-icon"> |
24 |
| - <script> |
25 |
| - window.PAGE_TYPE = "<%- page.type %>" |
26 |
| - </script> |
| 24 | + |
| 25 | + <!-- main page styles --> |
27 | 26 | <%- css(isIndex ? 'css/index' : 'css/page') %>
|
28 |
| - <%- partial('partials/ga') %> |
| 27 | + |
| 28 | + <!-- this needs to be loaded before guide's inline scripts --> |
29 | 29 | <script src="/js/vue.js"></script>
|
| 30 | + <script>window.PAGE_TYPE = "<%- page.type %>"</script> |
30 | 31 | </head>
|
31 | 32 | <body class="<%- isIndex ? '' : 'docs' -%>">
|
32 | 33 | <div id="mobile-bar" <%- isIndex ? 'class="top"' : '' %>>
|
|
42 | 43 | <%- body %>
|
43 | 44 | <% } %>
|
44 | 45 | </div>
|
45 |
| - <script src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script> |
46 | 46 | <script src="/js/smooth-scroll.min.js"></script>
|
47 |
| - <script src="/js/common.js"></script> |
48 | 47 | <% } else { %>
|
49 | 48 | <%- body %>
|
50 | 49 | <% } %>
|
51 | 50 |
|
| 51 | + <!-- main custom script for sidebars, version selects etc. --> |
| 52 | + <script src="/js/common.js"></script> |
| 53 | + |
| 54 | + <!-- ga --> |
| 55 | + <script> |
| 56 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| 57 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| 58 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| 59 | + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| 60 | +
|
| 61 | + ga('create', '<%- theme.google_analytics %>', '<%- theme.root_domain %>'); |
| 62 | + ga('send', 'pageview'); |
| 63 | + </script> |
| 64 | + |
| 65 | + <!-- search --> |
| 66 | + <link href="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" rel='stylesheet' type='text/css'> |
| 67 | + <%- css('css/search') %> |
| 68 | + <script src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script> |
| 69 | + <script> |
| 70 | + [ |
| 71 | + '#search-query-nav', |
| 72 | + '#search-query-sidebar' |
| 73 | + ].forEach(function (selector) { |
| 74 | + if (!document.querySelector(selector)) return |
| 75 | + docsearch({ |
| 76 | + appId: 'BH4D9OD16A', |
| 77 | + apiKey: '0a75952972806d9ad07e387d08e9cc4c', |
| 78 | + indexName: 'vuejs_jp', |
| 79 | + inputSelector: selector |
| 80 | + }) |
| 81 | + }) |
| 82 | + </script> |
| 83 | + |
| 84 | + <!-- fastclick --> |
52 | 85 | <script src="//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
|
53 | 86 | <script>
|
54 |
| - document.addEventListener('DOMContentLoaded', function() { |
55 |
| - FastClick.attach(document.body); |
56 |
| - }, false); |
| 87 | + document.addEventListener('DOMContentLoaded', function() { |
| 88 | + FastClick.attach(document.body); |
| 89 | + }, false); |
57 | 90 | </script>
|
58 | 91 | </body>
|
59 | 92 | </html>
|
0 commit comments