Browse Source

add konami code to shortcuts modal

Yuki Takei 6 years ago
parent
commit
4e6adf1e06

+ 4 - 1
resource/locales/en-US/translation.json

@@ -315,7 +315,10 @@
       "title": "Global shortcuts",
       "Open/Close shortcut help": "Open/Close shortcut help",
       "Edit Page": "Edit Page",
-      "Create Page": "Create Page"
+      "Create Page": "Create Page",
+      "Show Contributors": "Show Contributors",
+      "Konami Code": "Konami Code",
+      "konami_code_url": "https://en.wikipedia.org/wiki/Konami_Code"
     },
     "editor": {
       "title": "Editor shortcuts",

+ 4 - 1
resource/locales/ja/translation.json

@@ -315,7 +315,10 @@
       "title": "グローバルショートカット",
       "Open/Close shortcut help": "ショートカットヘルプの表示/非表示",
       "Edit Page": "ページ編集",
-      "Create Page": "ページ作成"
+      "Create Page": "ページ作成",
+      "Show Contributors": "コントリビューターを表示",
+      "Konami Code": "コナミコマンド",
+      "konami_code_url": "https://ja.wikipedia.org/wiki/コナミコマンド"
     },
     "editor": {
       "titile": "エディターショートカット",

+ 7 - 0
src/client/styles/scss/_shortcuts.scss

@@ -51,6 +51,13 @@
     &.key-long {
       width: 72px;
     }
+    &.key-small {
+      width: 24px;
+      height: 24px;
+      margin: 4px 2px;
+      font-size: 18px;
+      line-height: 22px;
+    }
   }
 
   .dl-horizontal {

+ 11 - 0
src/server/views/modal/shortcuts.html

@@ -26,6 +26,17 @@
                 <th>{{ t('modal_shortcuts.global.Edit Page') }}:</th>
                 <td><span class="key">E</span></td>
               </tr>
+              <tr>
+                <th>{{ t('modal_shortcuts.global.Show Contributors') }}:</th>
+                <td>
+                  <a href="{{ t('modal_shortcuts.global.konami_code_url') }}" target="_blank">{{ t('modal_shortcuts.global.Konami Code') }}</a><br>
+                  <span class="key key-small">↑</span>&nbsp;<span class="key key-small">↑</span>
+                  <span class="key key-small">↓</span>&nbsp;<span class="key key-small">↓</span>
+                  <span class="key key-small">←</span>&nbsp;<span class="key key-small">→</span>
+                  <span class="key key-small">←</span>&nbsp;<span class="key key-small">→</span>
+                  <span class="key key-small">B</span>&nbsp;<span class="key key-small">A</span>
+                </td>
+              </tr>
             </table>
           </div><!-- /.col-sm-6 -->