-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathdefault.html
114 lines (102 loc) · 3.39 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html>
<head>
{% include head.html %}
</head>
<body class="team">
{% include gtm_body_container.html %}
<div id="wrapper">
<header id="header">
<div class="wrapper-holder">
{% include nav.html %}
</div>
{% include content_header.html %}
<div class="sub-nav-wrapper-holder">
<div class="wrapper-holder">
{% include subnav.html %}
</div>
</div>
</header>
<div id="main">
<div class="wrapper-holder">
<section class="container">
<div class="content-container docs">
{% include sidebar_nav.html %}
<div style="float: right; width: 700px" class="content">
{% if page.languages %}{% include language-dropdown.html %}{% endif %}<h1>{{ page.title }}</h1> {% if page.summary %}
<p class="subtitle">{{ page.summary }}</p>{% endif %}
{{ content }}
</div>
</div>
</section>
</div>
</div>
</div>
<!-- footer -->
<footer id="footer">
{% include footer.html %}
<script src="/js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="/js/jquery-ui-1.10.4.min.js" type="text/javascript"></script>
<script src="/js/modernizr.js" type="text/javascript"></script>
<script src="/js/application.js" type="text/javascript"></script>
<script src="/js/custom.js" type="text/javascript"></script>
<script src="/js/search.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function() {
$('#search-query').lunrSearch({
indexUrl: '/search.json',
results: '#search-results',
entries: '.entries',
template: '#search-results-template'
});
});
</script>
{% raw %}
<script id="search-results-template" type="text/mustache">
{{#entries}}
<article>
<h3>
<a href="{{url}}">{{title}}</a>
</h3>
<p>{{short}}</p>
</article>
{{/entries}}
</script>
{% endraw %}
</footer>
{% if page.languages %}
<script src="/js/bootstrap-dropdown.js" type="text/javascript"></script>
<script src="/js/language_switcher.js" type="text/javascript"></script>
<script src="/js/purl.js" type="text/javascript"></script>
<script src="/js/cookies.min.js" type="text/javascript"></script>
<script type="text/javascript">
{% assign default_lang = "ruby" %}
var languages = { {% for lang in page.languages %}{% if lang.default %}{% assign default_lang = lang.slug %}{% endif %}
'{{ lang.slug }}': '{{ lang.name }}'{% unless forloop.last %},{% endunless %}{% endfor %}
};
</script>
<script>
$(document).ready(function() {
if ($.url().param('lang')!=null) {
desiredLanguage = $.url().param('lang');
} else {
if (Cookies.get('desired_language')!=null || localStorage.getItem("desired_language")!=null) {
if (Cookies.get('desired_language')!=null) {
desiredLanguage = Cookies.get('desired_language');
} else {
desiredLanguage = localStorage.getItem('desired_language');
}
} else {
desiredLanguage = "{{ default_lang }}";
}
};
if(!validLanguage(desiredLanguage)) {
switchLanguage("{{ default_lang }}", false);
} else {
switchLanguage(desiredLanguage);
}
});
</script>
{% endif %}
</body>
</html>