-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Karthik Ayangar <karthik.ayangar7118@gmail.com>
- Loading branch information
Showing
4 changed files
with
81 additions
and
82 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
.keyboard_shortcut { | ||
.w-keyboard-shortcuts { | ||
width: 100%; | ||
} | ||
|
||
&__category { | ||
font-size: 20px; | ||
display: flex; | ||
flex-direction: row; | ||
font-weight: 400; | ||
margin-bottom: 0.75rem; | ||
margin-top: 1.2rem; | ||
} | ||
.w-keyboard-shortcuts__category { | ||
font-size: theme('fontSize.22'); // there is no 20 | ||
display: flex; | ||
flex-direction: row; | ||
font-weight: theme('fontWeight.bold'); | ||
margin-bottom: theme('spacing.3'); | ||
margin-top: theme('spacing.5'); | ||
} | ||
|
||
&__key { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 100%; | ||
border-top: 1px solid rgb(134, 134, 134); | ||
.w-keyboard_shortcuts__key { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 100%; | ||
border-top: 1px solid theme('colors.grey.200'); | ||
} | ||
|
||
th { | ||
font-size: 16px; | ||
font-weight: 400; | ||
padding: 0.5rem 0; | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
.w-keyboard_shortcuts__label { | ||
font-size: theme('fontSize.16'); | ||
padding: theme('spacing.2') 0; | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
td { | ||
padding: 0.5rem 0; | ||
} | ||
} | ||
.w-keyboard_shortcuts__symbol { | ||
padding: theme('spacing.2') 0; | ||
} |
23 changes: 11 additions & 12 deletions
23
wagtail/admin/templates/wagtailadmin/shared/keyboard_shortcuts_dialog.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
{% load wagtailadmin_tags %} | ||
{% load wagtailadmin_tags i18n %} | ||
{% dialog icon_name='regex' id='keyboard-shortcuts-dialog' title=_("Keyboard shortcuts") %} | ||
{% if shortcuts%} | ||
<table class="keyboard_shortcut"> | ||
<table class="w-keyboard-shortcuts"> | ||
<caption class="w-sr-only"> | ||
All keyboard shortcuts | ||
{% trans "All keyboard shortcuts" %} | ||
</caption> | ||
<thead class="w-sr-only"> | ||
<tr> | ||
<th scope="col">Section</th> | ||
<th scope="col">Keyboard shortcut</th> | ||
<th scope="col">Keyboard shortcut</th> | ||
<th scope="col">{% trans "Section" %}</th> | ||
<th scope="col">{% trans "Keyboard shortcut" %}</th> | ||
</tr> | ||
</thead> | ||
|
||
{% for category, shortcuts in shortcuts.items %} | ||
<tbody class="w-w-full"> | ||
<tbody class="w-w-full" id="keyboard-shortut-group-{{ category.0 }}"> | ||
<tr colspan="2"> | ||
<th class="keyboard_shortcut__category" scope="rowgroup">{{ category }}</th> | ||
<th class="w-keyboard-shortcuts__category" scope="rowgroup">{{ category.1 }}</th> | ||
</tr> | ||
{% for shortcut in shortcuts %} | ||
<tr class="keyboard_shortcut__key"> | ||
<th scope="row">{{ shortcut.Label }}</th> | ||
<td><kbd>{{ shortcut.Shortcut }}</kbd></td> | ||
<tr class="w-keyboard_shortcuts__key "> | ||
<th class="w-keyboard_shortcuts__label" scope="row">{{ shortcut.label }}</th> | ||
<td class="w-keyboard_shortcuts__symbol"><kbd>{{ shortcut.shortcut }}</kbd></td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
{% endfor %} | ||
</table> | ||
{% endif%} | ||
{% enddialog %} | ||
{% enddialog %} |
This file contains 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
This file contains 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