-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.html
47 lines (44 loc) · 1.45 KB
/
default.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{% if page_title or page_title =='' %}
{% assign page_title = page.title %}
{% endif %}
{% if page_subtitle or page_subtitle =='' %}
{% assign page_subtitle = page.subtitle %}
{% endif %}
{% assign page_title = page.title %}
<!DOCTYPE html>
<html lang="ja" dir="ltr">
{% include head.html %}
<body>
{% include navbar.html %}
{{ content }}
<div id="page-top"><a href="#top"><img src="/img/svg/up.svg" alt="Up" width="24px" /></a></div>
{% include footer.html %}
<script>
window.onload = function() {
var agent = window.navigator.userAgent.toLowerCase();
var ie11 = (agent.indexOf('trident/7') !== -1);
if(ie11){
var spimg = document.getElementsByClassName("sponsors-rank-img");
for(var i = 0; i < spimg.length; i++) {
spimg[i].style.height = "auto";
spimg[i].style.maxHeight = "none";
}
}
var btn = $('#page-top');
//スクロールしてページトップから100に達したらボタンを表示
$(window).on('load scroll', function(){
if($(this).scrollTop() > 100) {
btn.addClass('active');
}else{
btn.removeClass('active');
}
});
$('.navbar-nav > a , .dropdown-menu>a').on('click', function(){
if(this.id != 'navbarDropdown'){
$('.navbar-collapse').collapse('hide');
}
});
}
</script>
</body>
</html>