This commit is contained in:
tianshujie
2024-04-29 09:35:48 +08:00
parent b651b6db99
commit d8d21fcf4f
3 changed files with 12 additions and 3 deletions
+1 -2
View File
@@ -14,7 +14,7 @@
.main-content-cell > .panel {max-height: calc(100vh - 110px); overflow-y: auto;}
.main-content-cell > .panel > .doc-content {padding-right: 0;}
#contentTree {background: #fff; position: sticky; height: calc(100vh - 180px)!important; overflow: auto; top: 3.5rem; right: 1rem; z-index: 100; flex: 0 1 30%; min-width: 160px;}
#contentTree {background: #fff; position: sticky; height: calc(100vh - 180px)!important; overflow: auto; top: 3.5rem; right: 1rem; z-index: 100; flex: 0 1 30%;}
#contentTree .tree-item .item-content > a {white-space: nowrap; text-overflow: clip; overflow: hidden;}
#docPanel::-webkit-scrollbar,
@@ -26,4 +26,3 @@
#outlineToggle {display: block; position: absolute; top: 6.5rem; right: 3.5rem; z-index: 100;}
#docPanel .panel-heading > .panel-actions {min-width: 320px;}
#docPanel .detail-content {max-width: var(--zt-panel-form-max-width);}
#docPanel.hasOutline .detail-content {max-width: calc(var(--zt-panel-form-max-width) - 160px);}
+11
View File
@@ -6,12 +6,14 @@ window.showHistory = function()
$('#history, #closeBtn').removeClass('hidden');
$('#contentTree').addClass('hidden');
$('#outlineToggle .icon').addClass('icon-menu-arrow-left').removeClass('icon-menu-arrow-right')
$('#docPanel .detail-content').css('max-width', 'calc(var(--zt-panel-form-max-width) - 300px)')
}
else
{
$('#contentTree').removeClass('hidden');
$('#history, #closeBtn').addClass('hidden');
$('#outlineToggle .icon').removeClass('icon-menu-arrow-left').addClass('icon-menu-arrow-right')
$('#docPanel .detail-content').css('max-width', 'var(--zt-panel-form-max-width)');
}
$('#hisTrigger').toggleClass('text-primary');
@@ -30,6 +32,7 @@ $(document).on('click', '#closeBtn', function()
{
$('#hisTrigger').removeClass('text-primary');
$('#history, #closeBtn').addClass('hidden');
$('#docPanel .detail-content').css('max-width', 'var(--zt-panel-form-max-width)');
});
window.toggleOutline = function()
@@ -37,6 +40,14 @@ window.toggleOutline = function()
$('#outlineToggle .icon').toggleClass('icon-menu-arrow-left').toggleClass('icon-menu-arrow-right')
$('#contentTree').toggleClass('hidden');
$.cookie.set('hiddenOutline', $('#contentTree').hasClass('hidden'));
if($('#contentTree').hasClass('hidden'))
{
$('#docPanel .detail-content').css('max-width', 'var(--zt-panel-form-max-width)');
}
else
{
$('#docPanel .detail-content').css('max-width', 'calc(var(--zt-panel-form-max-width) - 300px)');
}
}
$("#docPanel").on('enterFullscreen', () => {
-1
View File
@@ -125,7 +125,6 @@ if(!empty($editors))
$contentDom = div
(
setClass('flex-auto'),
isset($outlineTree) ? setClass('hasOutline') : null,
setID('docPanel'),
div
(