mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-18 15:57:15 +01:00
Add keyboard shortcuts for repository file and code search (#36416)
Resolves #36417: Add GitHub-like keyboard shortcuts for repository navigation: - Press `T` to focus the "Go to file" search input - Press `S` to focus the "Search code" input - Press `Escape` to clear and unfocus search inputs --------- Signed-off-by: Micah Kepe <micahkepe@gmail.com> Signed-off-by: silverwind <me@silverwind.io> Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
20
web_src/css/modules/shortcut.css
Normal file
20
web_src/css/modules/shortcut.css
Normal file
@@ -0,0 +1,20 @@
|
||||
.global-shortcut-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.global-shortcut-wrapper > kbd {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
display: inline-block;
|
||||
padding: 2px 6px;
|
||||
font-size: 11px;
|
||||
line-height: 14px;
|
||||
color: var(--color-text-light-2);
|
||||
background-color: var(--color-box-body);
|
||||
border: 1px solid var(--color-secondary);
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: inset 0 -1px 0 var(--color-secondary);
|
||||
pointer-events: none;
|
||||
}
|
||||
Reference in New Issue
Block a user