diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 3bbc96c29..cea59b728 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -392,7 +392,7 @@ Danbooru.Note = { start: function() { $("#original-file-link").click(); $("#image").one("click", Danbooru.Note.TranslationMode.create_note); - Danbooru.notice("Click on the image to create a note (shortcut is n)"); + Danbooru.notice('Click on the image to create a note (shortcut is n)'); }, stop: function() { @@ -474,7 +474,7 @@ Danbooru.Note = { $(function() { if ($("#c-posts #a-show").size() > 0) { $("#translate").one("click", Danbooru.Note.TranslationMode.start); - $(document).bind("keydown", "n", Danbooru.Note.TranslationMode.start); + key("n", Danbooru.Note.TranslationMode.start); Danbooru.Note.load_all(); $("#image").click(Danbooru.Note.Box.toggle_all); } diff --git a/app/assets/stylesheets/common/inline.css.scss b/app/assets/stylesheets/common/inline.css.scss index 7a992eab6..c2e8d69a5 100644 --- a/app/assets/stylesheets/common/inline.css.scss +++ b/app/assets/stylesheets/common/inline.css.scss @@ -21,4 +21,17 @@ span.count { } span.edit-options { -} \ No newline at end of file +} + +span.key { + background: #333; + border: 1px solid #333; + padding: 1px 3px; + color: white; + display: inline-block; + width: 1em; + text-align: center; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} diff --git a/app/assets/stylesheets/common/notices.css.scss b/app/assets/stylesheets/common/notices.css.scss index 6f0e93ae0..1f314adf9 100644 --- a/app/assets/stylesheets/common/notices.css.scss +++ b/app/assets/stylesheets/common/notices.css.scss @@ -1,17 +1,6 @@ -span.ui-icon { - float: left; - margin-top: 0.2em; - margin-right: 0.25em; -} - div.error-messages { margin: 1em 0; padding: 1em; - - span.ui-icon { - float: left; - margin-right: 0.5em; - } h1 { font-size: 1em; @@ -22,9 +11,4 @@ div.error-messages { div#notice { margin: 1em 0; padding: 1em; - - span.ui-icon { - float: left; - margin-right: 0.5em; - } } diff --git a/app/assets/stylesheets/news_updates.css b/app/assets/stylesheets/news_updates.css deleted file mode 100644 index afad32db0..000000000 --- a/app/assets/stylesheets/news_updates.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/app/assets/stylesheets/specific/keyboard_shortcuts.css.scss b/app/assets/stylesheets/specific/keyboard_shortcuts.css.scss new file mode 100644 index 000000000..ca766f402 --- /dev/null +++ b/app/assets/stylesheets/specific/keyboard_shortcuts.css.scss @@ -0,0 +1,20 @@ +@import "../common/000_vars.css.scss"; + +div#c-static { + div#a-keyboard-shortcuts { + overflow: visible; + + section { + width: 33%; + float: left; + + h1 { + font-size: $h3_size; + } + + li { + margin-bottom: 0.5em; + } + } + } +} \ No newline at end of file diff --git a/app/views/static/keyboard_shortcuts.html.erb b/app/views/static/keyboard_shortcuts.html.erb new file mode 100644 index 000000000..04b384ece --- /dev/null +++ b/app/views/static/keyboard_shortcuts.html.erb @@ -0,0 +1,22 @@ +