<div class="modal" id="shortcuts-modal" tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">

      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <div class="modal-title">{{ t('Shortcuts') }}</div>
      </div>

      <div class="modal-body">

        <div class="row">
          <div class="col-sm-6">
            <h3><strong>{{ t('modal_shortcuts.global.title') }}</strong></h3>

            <table class="table">
              <tr>
                <th>{{ t('modal_shortcuts.global.Open/Close shortcut help') }}:</th>
                <td><span class="key cmd-key"></span> + <span class="key">/</span></td>
              </tr>
              <tr>
                <th>{{ t('modal_shortcuts.global.Create Page') }}:</th>
                <td><span class="key">C</span></td>
              </tr>
              <tr>
                <th>{{ t('modal_shortcuts.global.Edit Page') }}:</th>
                <td><span class="key">E</span></td>
              </tr>
            </table>
          </div><!-- /.col-sm-6 -->

          <div class="col-sm-6">
            <h3><strong>{{ t('modal_shortcuts.editor.title') }}</strong></h3>

            <table class="table">
              <tr>
                <th>{{ t('modal_shortcuts.editor.Indent') }}:</th>
                <td><span class="key key-longer">Tab</span></td>
              </tr>
              <tr>
                <th>{{ t('modal_shortcuts.editor.Outdent') }}:</th>
                <td><span class="key key-long">Shift</span> + <span class="key key-longer">Tab</span></td>
              </tr>
              <tr>
                <th>{{ t('modal_shortcuts.editor.Save Page') }}:</th>
                <td><span class="key cmd-key"></span> + <span class="key">S</span></td>
              </tr>
              <tr>
                <th>{{ t('modal_shortcuts.editor.Delete Line') }}:</th>
                <td><span class="key cmd-key"></span> + <span class="key">D</span></td>
              </tr>
            </table>
          </div><!-- /.col-sm-6 -->

        </div><!-- /.row -->

        <div class="row">
          <div class="col-sm-6">
            <h3><strong></strong></h3>
          </div><!-- /.col-sm-6 -->

          <div class="col-sm-6">
            <h3><strong>{{ t('modal_shortcuts.commentform.title') }}</strong></h3>

            <table class="table">
              <tr>
                <th>{{ t('modal_shortcuts.commentform.Post') }}:</th>
                <td><span class="key cmd-key"></span> + <span class="key key-longer">{% include '../widget/icon-keyboard-return-enter.html' %}</span></td>
              </tr>
              <tr>
                <th>{{ t('modal_shortcuts.editor.Delete Line') }}:</th>
                <td><span class="key cmd-key"></span> + <span class="key">D</span></td>
              </tr>
            </table>
          </div><!-- /.col-sm-6 -->

        </div><!-- /.row -->

      </div>


    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->

  <script>
    /*
     * add classes to cmd-key by OS
     */
    var platform = navigator.platform.toLowerCase();
    var isMac = (platform.indexOf('mac') > -1);

    document.querySelectorAll('#shortcuts-modal .cmd-key').forEach(function(element) {
      if (isMac) {
        element.classList.add('mac');
      }
      else {
        element.classList.add('win', 'key-longer');
      }
    });
  </script>
</div><!-- /.modal -->
