perf: reduce size of ShortcutHelpInfo.html (#1068)
This commit is contained in:
parent
880bc7a38a
commit
1f5606c65e
|
@ -1,4 +1,7 @@
|
||||||
<div class="shortcut-help-info {inDialog ? 'in-dialog' : ''}">
|
<div class="shortcut-help-info {inDialog ? 'in-dialog' : ''}">
|
||||||
|
<!-- Svelte makes this file kind of ridiculously large for a static page (~17kB),
|
||||||
|
so just use raw HTML here to make it smaller -->
|
||||||
|
{@html `
|
||||||
<h2>Global</h2>
|
<h2>Global</h2>
|
||||||
<div class="hotkey-group">
|
<div class="hotkey-group">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -35,6 +38,7 @@
|
||||||
<li><kbd>←</kbd> - <kbd>→</kbd> to go to next or previous</li>
|
<li><kbd>←</kbd> - <kbd>→</kbd> to go to next or previous</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
`}
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
.shortcut-help-info {
|
.shortcut-help-info {
|
||||||
|
@ -45,23 +49,23 @@
|
||||||
.shortcut-help-info::-webkit-scrollbar {
|
.shortcut-help-info::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
li {
|
:global(.shortcut-help-info li) {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
.in-dialog li {
|
:global(.shortcut-help-info.in-dialog li) {
|
||||||
color: var(--muted-modal-text);
|
color: var(--muted-modal-text);
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
.in-dialog h2 {
|
:global(.shortcut-help-info.in-dialog h2) {
|
||||||
color: var(--muted-modal-text);
|
color: var(--muted-modal-text);
|
||||||
}
|
}
|
||||||
.hotkey-group {
|
:global(.shortcut-help-info.hotkey-group) {
|
||||||
margin: 0 0 10px 10px;
|
margin: 0 0 10px 10px;
|
||||||
}
|
}
|
||||||
.shortcut-help-info h2 {
|
:global(.shortcut-help-info h2) {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
kbd {
|
:global(.shortcut-help-info kbd) {
|
||||||
color: #333;
|
color: #333;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: 1px solid #333;
|
border: 1px solid #333;
|
||||||
|
|
Loading…
Reference in New Issue