Skip to content

Commit a379d80

Browse files
committed
Merge branch 'master' into develop
2 parents a335968 + 3bc4631 commit a379d80

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

docs/source/_assets/js/nav.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
$.when($.ready).then(function() {
2+
window.history.replaceState({
3+
'href': window.location.href,
4+
'title': $(document).filter('title').text(),
5+
'nav': $(document).find('#nav').html(),
6+
'content': $(document).find('#content').html()
7+
}, '', window.location.href)
8+
29
$('#nav').on('click', 'a', function (event) {
310

411
// Allow opening links in new tabs
@@ -45,8 +52,10 @@ $.when($.ready).then(function() {
4552
}, '', href)
4653

4754
// Track on Google Analytics
48-
ga('set', 'page', href)
49-
ga('send', 'pageview')
55+
if (typeof(ga) === 'function') {
56+
ga('set', 'page', href)
57+
ga('send', 'pageview')
58+
}
5059
})
5160
})
5261

@@ -59,8 +68,10 @@ $.when($.ready).then(function() {
5968
$('#content').html(e.state.content)
6069

6170
// Track on Google Analytics
62-
ga('set', 'page', e.state.href)
63-
ga('send', 'pageview')
71+
if (typeof(ga) === 'function') {
72+
ga('set', 'page', e.state.href)
73+
ga('send', 'pageview')
74+
}
6475
}
6576
}
6677

docs/source/_layouts/documentation.blade.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<meta property="og:image" content="https://tailwindcss.com/img/twitter-card.png" />
1515
@endsection
1616

17+
@push('headScripts')
18+
<script src="{{ mix('/js/nav.js') }}"></script>
19+
@endpush
20+
1721
@section('body')
1822
<div class="min-h-screen">
1923
<div id="sidebar" class="hidden z-50 fixed pin-y pin-l overflow-y-scroll md:overflow-visible scrolling-touch md:scrolling-auto bg-smoke-light w-4/5 md:w-full md:max-w-xs flex-none border-r-2 border-smoke md:flex flex-col">

docs/source/_layouts/master.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<link rel="stylesheet" href="{{ mix('/css/main.css') }}">
1717
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css">
1818
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
19-
<script src="{{ mix('/js/nav.js') }}"></script>
19+
@stack('headScripts')
2020
</head>
2121
<body data-sidebar-visible="true" class="font-sans font-normal text-slate-darker leading-normal">
2222

docs/source/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</div>
6262
<div class="mb-8 w-64 md:flex-x-center">
6363
<div class="flex items-center">
64-
<img class="h-16 w-16 rounded-full" src="https://pbs.twimg.com/profile_images/892478120829239296/U1KUwGJO_400x400.jpg">
64+
<img class="h-16 w-16 rounded-full" src="https://pbs.twimg.com/profile_images/929910740156215296/yDEC9GW9_400x400.jpg">
6565
<div class="pl-4">
6666
<a href="https://twitter.com/davidhemphill" class="block hover:underline text-dark text-lg text-medium">David Hemphill</a>
6767
<a href="https://twitter.com/davidhemphill" class="block hover:underline text-tailwind-teal-dark text-sm">@davidhemphill</a>

0 commit comments

Comments
 (0)