Files
plainleaf/client/styles/plainleaf_workspace.scss
T
wushenghua c4c622b204
CI / config (push) Canceled after 0s
CI / test-frontend (push) Canceled after 0s
CI / test-rust (push) Canceled after 0s
CI / test-e2e (push) Canceled after 0s
CI / test-e2e-release (push) Canceled after 0s
CI / build (push) Canceled after 0s
CI / release (push) Canceled after 0s
CI / docker (push) Canceled after 0s
CI / docker-website (push) Canceled after 0s
feat: add Plainleaf workspace shell
2026-08-12 11:21:34 +08:00

531 lines
9.5 KiB
SCSS

#pl-workspace-shell {
--pl-rail-width: 48px;
--pl-nav-width: clamp(230px, 20vw, 292px);
display: grid;
grid-template-columns: var(--pl-rail-width) var(--pl-nav-width) minmax(0, 1fr);
width: 100%;
height: 100%;
min-height: 0;
background: var(--root-background-color);
color: var(--root-color);
font-family: var(--ui-font);
}
#pl-workspace-shell.is-navigation-collapsed {
grid-template-columns: var(--pl-rail-width) minmax(0, 1fr);
}
.pl-activity-rail {
display: flex;
flex-direction: column;
align-items: center;
min-height: 0;
background: #202621;
color: #9ca69e;
border-right: 1px solid rgba(255, 255, 255, 0.07);
}
html[data-theme="dark"] .pl-activity-rail {
background: #111411;
color: #89938b;
}
.pl-brand-mark,
.pl-rail-button {
display: grid;
place-items: center;
width: 36px;
height: 36px;
padding: 0;
border: 0;
border-radius: 5px;
color: inherit;
background: transparent;
cursor: pointer;
}
.pl-brand-mark {
width: 34px;
height: 34px;
margin: 8px 0 10px;
color: #dce9df;
background: #315f45;
}
.pl-rail-button {
position: relative;
}
.pl-rail-button:hover,
.pl-rail-button.is-active {
color: #f0f5f1;
background: rgba(255, 255, 255, 0.08);
}
.pl-rail-button.is-active::before {
position: absolute;
left: -6px;
width: 3px;
height: 20px;
border-radius: 0 3px 3px 0;
background: #79b38e;
content: "";
}
.pl-rail-main,
.pl-rail-footer {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.pl-rail-main {
flex: 1;
}
.pl-rail-footer {
padding-bottom: 8px;
}
.pl-navigation-pane {
display: flex;
min-width: 0;
min-height: 0;
flex-direction: column;
background: #eef1ee;
border-right: 1px solid #dce2dc;
color: #20241f;
overflow: hidden;
}
html[data-theme="dark"] .pl-navigation-pane {
background: #202521;
border-right-color: #343b35;
color: #e8ece8;
}
.pl-navigation-header {
display: flex;
align-items: center;
justify-content: space-between;
flex: 0 0 68px;
padding: 11px 10px 8px 15px;
}
.pl-navigation-header > div:first-child {
display: flex;
min-width: 0;
flex-direction: column;
}
.pl-navigation-header span {
color: #929a93;
font-size: 10px;
font-weight: 700;
line-height: 14px;
}
.pl-navigation-header strong {
font-size: 16px;
font-weight: 650;
line-height: 23px;
}
.pl-header-actions {
display: flex;
gap: 2px;
}
.pl-header-actions button,
.pl-mobile-sheet header button {
display: grid;
place-items: center;
width: 32px;
height: 32px;
padding: 0;
border: 0;
border-radius: 5px;
color: #687169;
background: transparent;
cursor: pointer;
}
html[data-theme="dark"] .pl-header-actions button,
html[data-theme="dark"] .pl-mobile-sheet header button {
color: #9ba69d;
}
.pl-header-actions button:hover,
.pl-mobile-sheet header button:hover {
color: inherit;
background: rgba(72, 90, 76, 0.12);
}
.pl-search-button {
display: flex;
align-items: center;
gap: 8px;
flex: 0 0 34px;
width: calc(100% - 24px);
margin: 0 12px 9px;
padding: 0 9px;
border: 1px solid #dce2dc;
border-radius: 5px;
color: #687169;
background: #fff;
cursor: pointer;
text-align: left;
}
html[data-theme="dark"] .pl-search-button {
border-color: #343b35;
color: #9ba69d;
background: #1e221f;
}
.pl-search-button span {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pl-search-button kbd {
display: inline-flex;
align-items: center;
justify-content: center;
height: 20px;
padding: 0 5px;
border: 1px solid #dce2dc;
border-radius: 4px;
color: #929a93;
background: #f7f8f6;
font-family: var(--ui-font);
font-size: 10px;
}
html[data-theme="dark"] .pl-search-button kbd {
border-color: #343b35;
color: #727c74;
background: #171a18;
}
.pl-navigation-scroll,
.pl-mobile-tree {
flex: 1;
min-height: 0;
padding: 0 7px 14px;
overflow: auto;
}
.pl-nav-section {
margin-top: 8px;
}
.pl-nav-section h2 {
height: 24px;
margin: 0;
padding: 5px 8px;
color: #929a93;
font-size: 10px;
font-weight: 700;
line-height: 14px;
}
html[data-theme="dark"] .pl-nav-section h2 {
color: #727c74;
}
.pl-recent-row,
.pl-tree-row {
display: flex;
align-items: center;
width: 100%;
min-width: 0;
height: 28px;
padding: 0 7px;
border: 0;
border-radius: 5px;
color: #687169;
background: transparent;
cursor: pointer;
font-size: 13px;
text-align: left;
}
html[data-theme="dark"] .pl-recent-row,
html[data-theme="dark"] .pl-tree-row {
color: #9ba69d;
}
.pl-recent-row:hover,
.pl-tree-row:hover,
.pl-tree-row.is-active {
color: #20241f;
background: #dcece2;
}
html[data-theme="dark"] .pl-recent-row:hover,
html[data-theme="dark"] .pl-tree-row:hover,
html[data-theme="dark"] .pl-tree-row.is-active {
color: #e8ece8;
background: #283c30;
}
.pl-tree-row.is-active {
font-weight: 600;
}
.pl-recent-row > svg,
.pl-tree-row > svg {
flex: 0 0 15px;
margin-right: 7px;
}
.pl-recent-row span,
.pl-tree-label {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pl-tree-disclosure {
display: grid;
place-items: center;
flex: 0 0 17px;
width: 17px;
height: 20px;
margin-right: 1px;
}
.pl-tree-count {
flex: 0 0 auto;
margin-left: 7px;
color: #929a93;
font-size: 10px;
}
.pl-empty-tree {
display: flex;
min-height: 180px;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 7px;
padding: 20px;
color: #687169;
text-align: center;
}
.pl-empty-tree strong {
color: inherit;
font-size: 13px;
}
.pl-empty-tree button {
height: 30px;
padding: 0 10px;
border: 0;
border-radius: 5px;
color: #fff;
background: #397453;
cursor: pointer;
font-size: 11px;
}
.pl-navigation-footer {
display: flex;
align-items: center;
gap: 7px;
flex: 0 0 38px;
padding: 0 13px;
border-top: 1px solid #dce2dc;
color: #687169;
font-size: 10px;
}
html[data-theme="dark"] .pl-navigation-footer {
border-top-color: #343b35;
color: #9ba69d;
}
.pl-connection-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: #a86718;
}
.pl-connection-dot.is-online {
background: #4f956b;
}
.pl-editor-workspace {
display: flex;
position: relative;
min-width: 0;
min-height: 0;
flex-direction: column;
background: var(--root-background-color);
overflow: hidden;
}
.pl-editor-workspace > #sb-top {
flex: 0 0 45px;
height: 45px;
}
.pl-editor-workspace > #sb-top .main .inner {
padding-block: 7px;
font-size: 21px;
}
.pl-editor-workspace > #sb-main {
min-height: 0;
}
.pl-show-navigation {
display: grid;
place-items: center;
position: absolute;
z-index: 25;
top: 6px;
left: 7px;
width: 32px;
height: 32px;
padding: 0;
border: 0;
border-radius: 5px;
color: var(--action-button-color);
background: transparent;
cursor: pointer;
}
.pl-show-navigation:hover {
color: var(--action-button-hover-color);
background: var(--subtle-background-color);
}
#pl-workspace-shell.is-navigation-collapsed #sb-top .main .inner .wrapper {
padding-left: 45px;
}
.pl-mobile-navigation,
.pl-mobile-sheet-backdrop {
display: none;
}
@media only screen and (max-width: 700px) {
#pl-workspace-shell,
#pl-workspace-shell.is-navigation-collapsed {
display: block;
box-sizing: border-box;
padding-bottom: calc(58px + env(safe-area-inset-bottom));
}
.pl-activity-rail,
.pl-navigation-pane,
.pl-show-navigation {
display: none;
}
.pl-editor-workspace {
width: 100%;
height: 100%;
}
.pl-mobile-navigation {
display: grid;
position: fixed;
z-index: 80;
right: 0;
bottom: 0;
left: 0;
grid-template-columns: repeat(5, 1fr);
box-sizing: border-box;
height: calc(58px + env(safe-area-inset-bottom));
padding: 4px 8px env(safe-area-inset-bottom);
border-top: 1px solid var(--top-border-color);
background: color-mix(in srgb, var(--root-background-color) 94%, transparent);
backdrop-filter: blur(16px);
}
.pl-mobile-navigation button {
display: flex;
min-width: 0;
height: 50px;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
padding: 0;
border: 0;
color: var(--subtle-color);
background: transparent;
cursor: pointer;
font-size: 10px;
}
.pl-mobile-navigation .pl-mobile-create {
align-self: center;
justify-self: center;
width: 44px;
height: 44px;
margin-top: -11px;
border-radius: 50%;
color: white;
background: #397453;
box-shadow: 0 5px 14px rgba(31, 76, 49, 0.28);
}
.pl-mobile-sheet-backdrop {
display: flex;
position: fixed;
z-index: 110;
inset: 0;
align-items: flex-end;
background: var(--modal-backdrop-color);
}
.pl-mobile-sheet {
display: flex;
width: 100%;
max-height: 86vh;
min-height: 50vh;
flex-direction: column;
padding-bottom: env(safe-area-inset-bottom);
border-top: 1px solid #dce2dc;
border-radius: 8px 8px 0 0;
background: #eef1ee;
color: #20241f;
box-shadow: 0 -16px 50px rgba(20, 29, 22, 0.2);
}
html[data-theme="dark"] .pl-mobile-sheet {
border-top-color: #343b35;
background: #202521;
color: #e8ece8;
}
.pl-mobile-sheet header {
display: flex;
align-items: center;
justify-content: space-between;
flex: 0 0 50px;
padding: 0 9px 0 15px;
border-bottom: 1px solid #dce2dc;
}
html[data-theme="dark"] .pl-mobile-sheet header {
border-bottom-color: #343b35;
}
.pl-mobile-tree {
padding: 10px 8px 18px;
}
}