mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
Add [ and ] navigation to verse pages
- [ goes to previous verse - ] goes to next verse - Update accessibility page to document verse page shortcuts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -183,13 +183,21 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><kbd>←</kbd></td>
|
||||
<td><kbd>[</kbd></td>
|
||||
<td>Previous verse</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>→</kbd></td>
|
||||
<td><kbd>]</kbd></td>
|
||||
<td>Next verse</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>←</kbd></td>
|
||||
<td>Go back</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>→</kbd></td>
|
||||
<td>Next verse (alternative)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>Space</kbd></td>
|
||||
<td>Read selected text aloud (press again to stop)</td>
|
||||
|
||||
@@ -1220,6 +1220,18 @@
|
||||
{% if verse_num < total_verses %}
|
||||
window.location.href = '/book/{{ book }}/chapter/{{ chapter }}/verse/{{ verse_num + 1 }}';
|
||||
{% endif %}
|
||||
} else if (e.key === '[') {
|
||||
// Previous verse
|
||||
e.preventDefault();
|
||||
{% if verse_num > 1 %}
|
||||
window.location.href = '/book/{{ book }}/chapter/{{ chapter }}/verse/{{ verse_num - 1 }}';
|
||||
{% endif %}
|
||||
} else if (e.key === ']') {
|
||||
// Next verse
|
||||
e.preventDefault();
|
||||
{% if verse_num < total_verses %}
|
||||
window.location.href = '/book/{{ book }}/chapter/{{ chapter }}/verse/{{ verse_num + 1 }}';
|
||||
{% endif %}
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user