aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/less/_repository.less
diff options
context:
space:
mode:
authorsebastian-sauer <sauer.sebastian@gmail.com>2022-09-27 07:22:19 +0200
committerGitHub <noreply@github.com>2022-09-27 13:22:19 +0800
commit31f934c1d8005cdd87c47ce104d00c0efaec374b (patch)
treea71a387a73fd9a5506e539ad491982dd0a6e0756 /web_src/less/_repository.less
parent525751243efbaed86d6992ca6c7a7e4be229841b (diff)
downloadgitea-31f934c1d8005cdd87c47ce104d00c0efaec374b.tar.gz
gitea-31f934c1d8005cdd87c47ce104d00c0efaec374b.zip
Add filetree on left of diff view (#21012)
This PR adds a filetree to the left side of the files/diff view. Initially the filetree will not be shown and may be shown via a new "Show file tree" button. Showing and hiding is using the same icon as github. Folders are collapsible. On small devices (max-width 991 PX) the file tree will be hidden. Close #18192 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/less/_repository.less')
-rw-r--r--web_src/less/_repository.less29
1 files changed, 29 insertions, 0 deletions
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index 44e9a0430e..f30bafa4cc 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -3068,6 +3068,35 @@ td.blob-excerpt {
padding-left: 8px;
}
+#diff-container {
+ display: flex;
+}
+#diff-file-boxes {
+ flex: 1;
+}
+
+#diff-file-tree {
+ width: 20%;
+ max-width: 380px;
+ line-height: inherit;
+ position: sticky;
+ padding-top: 0;
+ top: 47px;
+ max-height: calc(100vh - 50px);
+ height: 100%;
+ overflow-y: auto;
+}
+
+@media @mediaMdAndDown {
+ #diff-file-tree {
+ display: none;
+ }
+
+ .diff-toggle-file-tree-button {
+ display: none;
+ }
+}
+
.ui.message.unicode-escape-prompt {
margin-bottom: 0;
border-radius: 0;