Skip to content

Commit 1efe4de

Browse files
committed
fix tabs
1 parent b81af28 commit 1efe4de

8 files changed

+91
-91
lines changed

changelog.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -587,15 +587,15 @@ <h2>2010-06-09: Version 1.1.0</h2>
587587

588588
<!--/run-->
589589
<!--get foot from index.html-->
590-
<script type="text/javascript"
591-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
592-
</script>
593-
<script type="text/javascript"
594-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
595-
</script>
596-
<script type="text/javascript"
597-
src="keyboard.js">
598-
</script>
590+
<script type="text/javascript"
591+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
592+
</script>
593+
<script type="text/javascript"
594+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
595+
</script>
596+
<script type="text/javascript"
597+
src="keyboard.js">
598+
</script>
599599
</div>
600600
</body>
601601
</html>

contact.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ <h2>Donations</h2>
6868
<li><b>Akin Fernandez</b>: "Ranger is the file manager we have been waiting for. It perfects an i3 setup." (2016-06-06)</li>
6969
</ul>
7070
<!--get foot from index.html-->
71-
<script type="text/javascript"
72-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
73-
</script>
74-
<script type="text/javascript"
75-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
76-
</script>
77-
<script type="text/javascript"
78-
src="keyboard.js">
79-
</script>
71+
<script type="text/javascript"
72+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
73+
</script>
74+
<script type="text/javascript"
75+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
76+
</script>
77+
<script type="text/javascript"
78+
src="keyboard.js">
79+
</script>
8080
</div>
8181
</body>
8282
</html>

documentation.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ <h2>Dependencies</h2>
9191
</ul>
9292

9393
<!--get foot from index.html-->
94-
<script type="text/javascript"
95-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
96-
</script>
97-
<script type="text/javascript"
98-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
99-
</script>
100-
<script type="text/javascript"
101-
src="keyboard.js">
102-
</script>
94+
<script type="text/javascript"
95+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
96+
</script>
97+
<script type="text/javascript"
98+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
99+
</script>
100+
<script type="text/javascript"
101+
src="keyboard.js">
102+
</script>
103103
</div>
104104
</body>
105105
</html>

download.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ <h2>Package Managers</h2>
134134
</ul>
135135

136136
<!--get foot from index.html-->
137-
<script type="text/javascript"
138-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
139-
</script>
140-
<script type="text/javascript"
141-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
142-
</script>
143-
<script type="text/javascript"
144-
src="keyboard.js">
145-
</script>
137+
<script type="text/javascript"
138+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
139+
</script>
140+
<script type="text/javascript"
141+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
142+
</script>
143+
<script type="text/javascript"
144+
src="keyboard.js">
145+
</script>
146146
</div>
147147
</body>
148148
</html>

index.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ <h1>Relocated website</h1>
140140
<!-- /run -->
141141
</div>
142142
<!--foot-->
143-
<script type="text/javascript"
144-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
145-
</script>
146-
<script type="text/javascript"
147-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
148-
</script>
149-
<script type="text/javascript"
150-
src="keyboard.js">
151-
</script>
143+
<script type="text/javascript"
144+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
145+
</script>
146+
<script type="text/javascript"
147+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
148+
</script>
149+
<script type="text/javascript"
150+
src="keyboard.js">
151+
</script>
152152
</div>
153153
</body>
154154
</html>

keyboard.js

+35-35
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,46 @@ var navclass = "kbnav";
22

33
function kbNav(key) {
44

5-
// convert HTMLCollection to array for indexing
6-
var navlinks = [].slice.call(document.getElementsByClassName(navclass));
7-
var navindex = -1; // initialize counter before the first post
8-
9-
var currentfocus = document.activeElement; // get current index of focused post
10-
11-
// get current post index
12-
if ( currentfocus.className.includes(navclass) ) {
13-
navindex = navlinks.indexOf(currentfocus);
14-
}
15-
16-
// increment post index
17-
if ( key === 'j' && navindex < navlinks.length - 1 ) {
18-
navindex++;
19-
} else if (key === 'k' && navindex > 0 ) {
20-
navindex--;
21-
} else if (key === 'g') {
22-
navindex = 0;
23-
} else if (key === 'G') {
24-
navindex = navlinks.length - 1;
25-
}
26-
27-
// move focus
28-
navlinks[navindex].focus();
5+
// convert HTMLCollection to array for indexing
6+
var navlinks = [].slice.call(document.getElementsByClassName(navclass));
7+
var navindex = -1; // initialize counter before the first post
8+
9+
var currentfocus = document.activeElement; // get current index of focused post
10+
11+
// get current post index
12+
if ( currentfocus.className.includes(navclass) ) {
13+
navindex = navlinks.indexOf(currentfocus);
14+
}
15+
16+
// increment post index
17+
if ( key === 'j' && navindex < navlinks.length - 1 ) {
18+
navindex++;
19+
} else if (key === 'k' && navindex > 0 ) {
20+
navindex--;
21+
} else if (key === 'g') {
22+
navindex = 0;
23+
} else if (key === 'G') {
24+
navindex = navlinks.length - 1;
25+
}
26+
27+
// move focus
28+
navlinks[navindex].focus();
2929
}
3030

3131
function kbLaunch() {
32-
var currentfocus = document.activeElement; // get current index of focused post
33-
// open focused link
34-
if ( currentfocus.className.includes(navclass) ) {
35-
window.location.href = currentfocus;
36-
}
32+
var currentfocus = document.activeElement; // get current index of focused post
33+
// open focused link
34+
if ( currentfocus.className.includes(navclass) ) {
35+
window.location.href = currentfocus;
36+
}
3737

3838
}
3939

4040
Mousetrap.bind({
41-
'j': function() { kbNav('j'); },
42-
'k': function() { kbNav('k'); },
43-
'g g': function() { kbNav('g'); },
44-
'G': function() { kbNav('G'); },
45-
'l': function() { kbLaunch(); },
46-
'g h': function() { window.location.href = "index.html"; }
41+
'j': function() { kbNav('j'); },
42+
'k': function() { kbNav('k'); },
43+
'g g': function() { kbNav('g'); },
44+
'G': function() { kbNav('G'); },
45+
'l': function() { kbLaunch(); },
46+
'g h': function() { window.location.href = "index.html"; }
4747
})

screenshots.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ <h1>Screenshots</h1>
4747
</p>
4848

4949
<!--get foot from index.html-->
50-
<script type="text/javascript"
51-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
52-
</script>
53-
<script type="text/javascript"
54-
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
55-
</script>
56-
<script type="text/javascript"
57-
src="keyboard.js">
58-
</script>
50+
<script type="text/javascript"
51+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js">
52+
</script>
53+
<script type="text/javascript"
54+
src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js">
55+
</script>
56+
<script type="text/javascript"
57+
src="keyboard.js">
58+
</script>
5959
</div>
6060
</body>
6161
</html>

style.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ code {
117117
color: #999;
118118
}
119119
table, td, tr, th {
120-
border-collapse: collapse;
121-
border: 1px solid grey;
120+
border-collapse: collapse;
121+
border: 1px solid grey;
122122
}
123123
th { text-align: left }
124124
th, td { padding: 0.2em; }

0 commit comments

Comments
 (0)