mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 06:33:48 +00:00
Optimize markdown code (#5860)
* optimize markdown editor css * optimize markdown viewer * optimize markdown viewer * fix wraning
This commit is contained in:
@@ -136,10 +136,6 @@
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.cur-view-content .article {
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.cur-view-content .hd {
|
||||
padding-bottom: 0;
|
||||
margin-bottom: .5em;
|
||||
|
@@ -169,21 +169,12 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* wiki-page-content */
|
||||
.wiki-page-content {
|
||||
.dir-content-main .wiki-page-content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.wiki-page-content .ml-2 {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wiki-page-content .ml-2:hover {
|
||||
text-decoration: underline;
|
||||
color:#eb8205;
|
||||
}
|
||||
|
||||
.wiki-page-content .wiki-open-file {
|
||||
/* wiki-page-content children */
|
||||
.dir-content-main .wiki-open-file {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: 16px;
|
||||
@@ -199,74 +190,28 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wiki-page-content .wiki-open-file i {
|
||||
.dir-content-main .wiki-open-file i {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
.wiki-page-content .wiki-open-file:hover {
|
||||
.dir-content-main .wiki-open-file:hover {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
.wiki-page-content .sf-slate-viewer-scroll-container {
|
||||
.dir-content-main .sf-slate-viewer-scroll-container {
|
||||
padding: 0;
|
||||
background-color: #fff;
|
||||
border: none;
|
||||
overflow: inherit;
|
||||
}
|
||||
|
||||
.wiki-page-content .sf-slate-viewer-article-container {
|
||||
.dir-content-main .sf-slate-viewer-article-container {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dir-content-main .wiki-page-content .article {
|
||||
margin: 0;
|
||||
padding: 0 10px;
|
||||
border: none;
|
||||
max-width: fit-content;
|
||||
}
|
||||
|
||||
.wiki-page-content a {
|
||||
cursor: pointer;
|
||||
}
|
||||
.wiki-page-ops {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.wiki-page-ops:before {
|
||||
content:'';
|
||||
border-left:1px solid #ddd;
|
||||
position:absolute;
|
||||
top:3px;
|
||||
left:-16px;
|
||||
bottom:3px;
|
||||
}
|
||||
}
|
||||
|
||||
.wiki-page-list-item {
|
||||
word-break:break-all;
|
||||
line-height:1.6;
|
||||
margin:3px 0;
|
||||
}
|
||||
|
||||
.wiki-page-link,
|
||||
.wiki-page-link:hover {
|
||||
font-size:1.15em;
|
||||
font-weight:normal;
|
||||
color:#444;
|
||||
margin-left:5px;
|
||||
}
|
||||
|
||||
#wiki-page-last-modified {
|
||||
padding: 40px 10px;
|
||||
font-size:12px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.dir-content-resize {
|
||||
flex: 0 0 .5%;
|
||||
cursor: ew-resize;
|
||||
|
@@ -1,104 +0,0 @@
|
||||
.seafile-history-side-panel {
|
||||
user-select: none;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.history-side-panel-title {
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
line-height: 50px;
|
||||
font-size: 1rem;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: rgb(250,250,249);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.history-side-panel-title .history-tile-text {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
|
||||
.history-side-panel-title .history-title-close {
|
||||
color: #b9b9b9;
|
||||
}
|
||||
|
||||
.history-side-panel-title .history-title-close:hover {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
.history-list-container {
|
||||
height: calc(100% - 36px);
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.history-list-container:hover {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.item-active {
|
||||
background-color: #fdc297;
|
||||
}
|
||||
|
||||
.history-item-container {
|
||||
padding: 0.5rem .8rem;
|
||||
}
|
||||
|
||||
.history-item-container:not(.item-active):hover {
|
||||
background-color: #ffe7d5;
|
||||
}
|
||||
|
||||
.history-item-container div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.history-item-container .owner {
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
.history-item-container .owner i {
|
||||
color: #549b5a;
|
||||
font-size: 0.2rem;
|
||||
margin-right: 0.2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.history-item-container .owner span {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.diff-container {
|
||||
flex: 1 1 auto;
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.diff-wrapper {
|
||||
width: 90%;
|
||||
border: 1px solid #e5e5e5;
|
||||
margin: 20px auto;
|
||||
background-color: #fff;
|
||||
min-height: calc(100% - 40px);
|
||||
padding: 70px 75px;
|
||||
}
|
||||
|
||||
@media (max-width:991.8px) {
|
||||
.diff-container {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.diff-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
@media (min-width:992px) {
|
||||
.seafile-history-side-panel {
|
||||
/* width: 260px; */
|
||||
width: 100%;
|
||||
}
|
||||
}
|
@@ -1,182 +0,0 @@
|
||||
html, body, #root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#root {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.seafile-md-viewer {
|
||||
height: 100%;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
float: none;
|
||||
}
|
||||
.sf-md-viewer-topbar-first,
|
||||
.sf-md-viewer-topbar-first-narrow {
|
||||
padding: 4px 10px;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
box-shadow: 0 3px 2px -2px rgba(200,200,200,.15);
|
||||
flex-shrink:0;
|
||||
align-items: center;
|
||||
}
|
||||
.seafile-md-viewer-container {
|
||||
width: 100%;
|
||||
background-color: #fafaf9;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
}
|
||||
.seafile-md-viewer-container.side-panel-on {
|
||||
width: calc(100% - 260px);
|
||||
}
|
||||
.seafile-md-viewer-slate {
|
||||
flex: auto;
|
||||
position: relative;
|
||||
margin: 20px 0px 20px 5%;
|
||||
max-width: calc(90% - 260px);
|
||||
}
|
||||
.seafile-md-viewer-main {
|
||||
flex: auto;
|
||||
overflow: auto;
|
||||
background:#fafaf9;
|
||||
width: 70%;
|
||||
}
|
||||
.seafile-md-viewer-slate.side-panel-on {
|
||||
margin: 20px 5%;
|
||||
}
|
||||
/* outline */
|
||||
.seafile-md-viewer .seafile-editor-outline {
|
||||
background-color: #fafaf9;
|
||||
margin: 40px auto;
|
||||
padding: 0 0.75rem 0 1.25rem;
|
||||
border-left: 0;
|
||||
width: 260px;
|
||||
position: fixed;
|
||||
top: 68px;
|
||||
overflow-y: hidden;
|
||||
right: 5%;
|
||||
z-index: 1;
|
||||
height: 80%;
|
||||
}
|
||||
.seafile-md-viewer .seafile-editor-outline:hover {
|
||||
overflow: auto;
|
||||
}
|
||||
.seafile-md-viewer .seafile-editor-outline .active {
|
||||
color: #eb8205;
|
||||
border-left: 1px solid #eb8205;
|
||||
}
|
||||
.seafile-md-viewer .seafile-editor-outline-heading {
|
||||
padding: 7px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #a0a0a0;
|
||||
}
|
||||
.seafile-editor-outline .outline-h2, .seafile-editor-outline .outline-h3 {
|
||||
height: 30px;
|
||||
margin-left: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 14px;
|
||||
}
|
||||
.seafile-editor-outline .outline-h2 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
.seafile-editor-outline .outline-h3 {
|
||||
padding-left: 40px;
|
||||
}
|
||||
/* side-panel */
|
||||
.seafile-md-viewer-side-panel {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
width: 260px;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 87px;
|
||||
}
|
||||
.seafile-md-viewer-side-panel .seafile-history-side-panel {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.seafile-md-viewer-side-panel .seafile-history-side-panel {
|
||||
border-left: 1px solid #e6e6dd;
|
||||
}
|
||||
@media (max-width:991.8px) {
|
||||
.seafile-editor-outline {
|
||||
display: none;
|
||||
}
|
||||
.seafile-md-viewer-slate {
|
||||
width: calc(100% - 80px);
|
||||
margin: 20px 40px;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sf-md-viewer-topbar-first {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sf-md-viewer-topbar-first-narrow {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* toolbar */
|
||||
.topbar-file-info {
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
/*
|
||||
only select file info text
|
||||
*/
|
||||
user-select: text;
|
||||
}
|
||||
.topbar-file-info .file-title {
|
||||
font-size: 1.2rem;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.topbar-file-info .file-title .iconfont {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.topbar-file-info .file-title .file-star {
|
||||
font-size: 0.875rem;
|
||||
cursor: pointer;
|
||||
margin-left: 0.5rem;
|
||||
vertical-align: text-bottom;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.topbar-file-info .file-title .file-star .star {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.topbar-file-info .file-state {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.topbar-file-info .file-state .file-modifier-name {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.topbar-file-info .file-state .file-modifier-savedraft {
|
||||
margin-left: 0.5rem;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.sf-md-viewer-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
}
|
Reference in New Issue
Block a user