mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-24 21:07:17 +00:00
rewrote 'text file view' & tidied 'file view' code (#2996)
This commit is contained in:
14
frontend/src/css/text-file-view.css
Normal file
14
frontend/src/css/text-file-view.css
Normal file
@@ -0,0 +1,14 @@
|
||||
.text-file-view {
|
||||
overflow: auto;
|
||||
}
|
||||
.ReactCodeMirror {
|
||||
box-shadow: 0 0 6px #ccc;
|
||||
border: 1px solid #ccc;
|
||||
width: calc(100% - 40px);
|
||||
max-width: 950px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.CodeMirror {
|
||||
height: auto;
|
||||
min-height: 300px;
|
||||
}
|
@@ -1,109 +0,0 @@
|
||||
#root {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.txt-file-view {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.txt-file-view-header {
|
||||
width: 100%;
|
||||
padding: 4px 10px;
|
||||
border-bottom: 1px solid #c9c9c9;
|
||||
justify-content: space-between;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.txt-view-button-group {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.txt-file-view-body {
|
||||
height: calc(100% - 60px);
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
border: 1px solid #ededed;
|
||||
overflow: auto;
|
||||
flex: auto;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.txt-file-view-body .txt-view {
|
||||
min-height: 400px;
|
||||
margin: 0 auto;
|
||||
width: 950px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.txt-file-view-body .txt-view .CodeMirror,
|
||||
.txt-file-view-body .txt-view-comment .CodeMirror {
|
||||
box-shadow: 0 0 6px #ccc;
|
||||
border: 1px solid #ccc;
|
||||
height: auto;
|
||||
min-height: 400px;
|
||||
margin: 0 auto;
|
||||
line-height: 1.5em;
|
||||
overflow: auto;
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.txt-file-view-body .txt-view .CodeMirror-scroll {
|
||||
min-height: 400px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.file-enc-cont {
|
||||
width: 950px;
|
||||
height: 24px;
|
||||
margin: 10px auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.file-title {
|
||||
margin-bottom: 0px;
|
||||
align-items: center;
|
||||
font-size: 1.2rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.file-state {
|
||||
font-size: 13px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.file-title .file-internal-link,
|
||||
.file-title .file-star,
|
||||
.file-title .file-lock {
|
||||
font-size: .875rem;
|
||||
cursor: pointer;
|
||||
margin-left: .5rem;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.file-title .file-star .star {
|
||||
color: #f89a68;
|
||||
}
|
||||
|
||||
.file-internal-link {
|
||||
color: #585858;
|
||||
}
|
||||
|
||||
.txt-file-view-body .txt-view-comment {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.txt-file-view-body .txt-view-comment .ReactCodeMirror {
|
||||
width: 70%;
|
||||
margin: 5px 20px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.txt-file-view-body .txt-view-comment .seafile-comment {
|
||||
width: 30%;
|
||||
background: #fff;
|
||||
}
|
Reference in New Issue
Block a user