Skip to content

Commit fda8e4c

Browse files
committed
fix(website): fix page footer on mobile
1 parent 81153d6 commit fda8e4c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

source/_layouts/website/header.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ <h2 class="book-header-title-h" title="JavaScript Primer - 迷わないための
398398
</div>
399399

400400
<script type="text/javascript">
401-
document.querySelector(".searchbox [type=\"reset\"]").addEventListener("click", function() {
401+
document.querySelector('.searchbox [type="reset"]').addEventListener("click", function() {
402402
this.parentNode.querySelector("input").focus();
403403
});
404404
</script>
@@ -410,5 +410,13 @@ <h2 class="book-header-title-h" title="JavaScript Primer - 迷わないための
410410
debug: false // set to `true` if you want to inspect the dropdown menu's CSS
411411
});
412412
</script>
413+
<script type="text/javascript">
414+
(function(){var t,e,n,r,a;for(t=function(){var t;return t=[],function(){var e,n,r,a;for(n=["init","start","stop","user","track","action","event","goal","chat","buy","page","view","admin","group","alias","ready","link","form","click","submit","cmd","emit","on","send","css","js","style","option","get","set","collection"],e=function(e){return function(){return t.push([e].concat(Array.prototype.slice.call(arguments,0)))}},r=0,a=[];r<n.length;)t[n[r]]=e(n[r]),a.push(r++);return a}(),t.init=function(e,n){var r,a;return t.api_key=e,t.options=n||{},a=document.createElement("script"),a.type="text/javascript",a.async=!0,a.charset="utf-8",a.src=t.options.tracker_url||"https://static.karte.io/libs/tracker.js",r=document.getElementsByTagName("script")[0],r.parentNode.insertBefore(a,r)},t},r=window.karte_tracker_names||["tracker"],e=0,n=r.length;n>e;e++)a=r[e],window[a]||(window[a]=t());tracker.init("a2d22604ec1d1c6d9d53d9d3eb87961d", { spa_mode: { reset_past_actions: true, close_actions: true }})}).call(this);
415+
window.addEventListener("DOMContentLoaded", function(){
416+
gitbook.events.on("page.change", function() {
417+
tracker.view();
418+
});
419+
});
420+
</script>
413421
{% endblock %}
414422

source/_layouts/website/page.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
padding: 16px;
5656
}
5757
/* Hide footer on mobile */
58-
@media (max-width: 768px) {
58+
/* Use navigation width */
59+
@media (max-width: 1240px) {
5960
.book_footer {
6061
display: none;
6162
}

0 commit comments

Comments
 (0)