-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Next/Previous keyboard navigation #9
Labels
Comments
We had this working in previous projects. For reference: |
I’m about to get on the road but yes, this functionality should be easy to add back in. Maybe the question going forward is how JavaScript should be organized in the default templates: some guidelines for developers could be useful here.
Previously the way I handled this was to create a master ‘UI’ class that is instantiated each time a new page loads. The UI instance would handle things like setting up handlers for keyboard events in addition to navigation, search, and whatever else is going on.
In this approach the ‘application.js’ file can be kept more minimal and is mainly concerned with setting up the UI object once the page is ready (along with other top-level features like smoothstate if you are using it). Other functionality can live inside named methods of the UI class in a separate file for clarity.
… On Feb 15, 2018, at 8:54 AM, Greg Albers ***@***.***> wrote:
We had this working in previous projects. For reference:
https://github.com/gettypubs/keepitmoving/blob/master/themes/quire-prototype-starter-theme/source/js/ui.js#L110
https://github.com/gettypubs/romanmosaics/blob/master/source/assets/javascripts/ui.js.erb#L43
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
See also Issue #40, regarding touch swiping |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As in past publications, the right and left keyboard arrows should take you to the next and previous pages respectively.
The text was updated successfully, but these errors were encountered: