Created
September 6, 2017 17:59
-
-
Save AshleyGrant/b2e13329f7af5167d1003e0192388749 to your computer and use it in GitHub Desktop.
Aurelia Onscreen Keyboard Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <input type="text" focus.trigger="showFirst = true" /> | |
| <div show.bind="showFirst">Here I am!</div> | |
| </div> | |
| <br /> | |
| <div> | |
| <input type="text" focus.trigger="showSecond = true" /> | |
| <div show.bind="showSecond">Here I am!</div> | |
| </div> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class App { | |
| name: 'Ashley'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Aurelia</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <script src="https://code.jquery.com/jquery.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script> | |
| <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css"> | |
| <link rel="stylesheet" href="https://mottie.github.io/Keyboard/css/keyboard.css"> | |
| <script src="https://mottie.github.io/Keyboard/js/jquery.keyboard.js"></script> | |
| <script src="https://mottie.github.io/Keyboard/js/jquery.mousewheel.js"></script> | |
| <script src="https://mottie.github.io/Keyboard/js/jquery.keyboard.extension-typing.js"></script> | |
| </head> | |
| <body aurelia-app> | |
| <h1>Loading...</h1> | |
| <script src="https://jdanyow.github.io/rjs-bundle/node_modules/requirejs/require.js"></script> | |
| <script src="https://jdanyow.github.io/rjs-bundle/config.js"></script> | |
| <script src="https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js"></script> | |
| <script src="https://jdanyow.github.io/rjs-bundle/bundles/babel.js"></script> | |
| <script> | |
| require(['aurelia-bootstrapper']); | |
| </script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {inject} from 'aurelia-framework'; | |
| @inject(Element) | |
| export class KeyboardCustomAttribute { | |
| constructor(el) { | |
| this.el = el; | |
| } | |
| attached() { | |
| $(this.el).keyboard({ | |
| layout: 'qwerty' | |
| }) | |
| // activate the typing extension | |
| .addTyping({ | |
| showTyping: true, | |
| delay: 250 | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment