| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- @use '@growi/core/scss/bootstrap/init' as bs;
- @use './variables' as var;
- @import './organisms/wiki-custom-sidebar';
- // global imported
- .layout-root.editing {
- overflow-y: hidden !important;
- .grw-navbar {
- position: fixed !important;
- width: 100vw;
- }
- // restrict height of subnav
- .grw-subnav {
- height: var.$grw-subnav-height-on-edit;
- min-height: unset;
- padding-top: 0;
- padding-right: 15px;
- padding-left: 15px;
- @include bs.media-breakpoint-up(lg) {
- height: var.$grw-subnav-height-lg-on-edit;
- }
- }
- .page-wrapper {
- top: 0;
- height: 100vh;
- }
- // show
- .d-edit-block {
- display: block !important;
- }
- // hide unnecessary elements
- .d-edit-none {
- display: none !important;
- }
- // hide when HackMD view
- &.hackmd .d-hackmd-none {
- display: none;
- }
- // show only either Edit button or HackMD button
- &.hackmd .nav-tab-edit {
- display: none;
- }
- &.hackmd .grw-nav-item-edit {
- display: none;
- }
- &:not(.hackmd) .nav-tab-hackmd {
- display: none;
- }
- /*****************
- * Expand Editor
- *****************/
- .grw-editor-navbar-bottom {
- height: var.$grw-editor-navbar-bottom-height;
- .grw-grant-selector {
- @include bs.media-breakpoint-down(sm) {
- .btn .label {
- display: none;
- }
- }
- @include bs.media-breakpoint-up(md) {
- .dropdown-toggle {
- min-width: 100px;
- // caret
- &::after {
- margin-left: 1em;
- }
- }
- }
- }
- .btn-submit {
- width: 100px;
- }
- .btn-expand {
- // rotate icon
- i {
- display: inline-block;
- transition: transform 200ms;
- }
- &.expand i {
- transform: rotate(-180deg);
- }
- }
- }
- /*********************
- * Navigation styles
- */
- .grw-subnav {
- padding-bottom: 0;
- h1 {
- font-size: 16px;
- }
- .grw-drawer-toggler {
- width: 38px;
- height: 38px;
- font-size: 18px;
- }
- .grw-taglabels-container {
- margin-bottom: 0;
- }
- }
- // ellipsis .grw-page-path-hierarchical-link
- .grw-subnav-left-side {
- overflow: hidden;
- .grw-path-nav-container {
- margin-right: 1rem;
- overflow: hidden;
- .grw-page-path-nav {
- white-space: nowrap;
- .grw-page-path-hierarchical-link {
- width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- h1 {
- overflow: hidden;
- }
- }
- }
- }
- .grw-copy-dropdown {
- .btn-copy {
- padding: 3px !important; // overwrite padding
- }
- }
- &.builtin-editor {
- /*****************
- * Editor styles
- *****************/
- .page-editor-editor-container {
- border-right: 1px solid transparent;
- // add icon on cursor
- .markdown-table-activated,
- .markdown-link-activated {
- .CodeMirror-cursor {
- &:after {
- position: relative;
- top: -1.1em;
- left: 0.3em;
- display: block;
- width: 1em;
- height: 1em;
- content: ' ';
- background-repeat: no-repeat;
- background-size: 1em;
- }
- }
- }
- .markdown-table-activated .CodeMirror-cursor {
- &:after {
- background-image: url(/images/icons/editor/table.svg);
- }
- }
- .markdown-link-activated .CodeMirror-cursor {
- &:after {
- background-image: url(/images/icons/editor/link.svg);
- }
- }
- .textarea-editor {
- font-family: var(--font-family-monospace);
- border: none;
- }
- }
- .page-editor-preview-container {
- }
- .page-editor-preview-body {
- flex-grow: 1;
- padding: 18px 15px 0;
- overflow-y: scroll;
- }
- // editing /Sidebar
- .page-editor-preview-body.preview-sidebar {
- flex-grow: 0;
- width: 320px;
- margin-right: auto;
- margin-left: auto;
- .wiki {
- @extend %grw-custom-sidebar-content;
- }
- }
- .grw-editor-configuration-dropdown {
- .icon-container {
- width: 20px;
- }
- .menuitem-label {
- min-width: 130px;
- }
- }
- }
- // .builtin-editor .tab-pane#edit
- &.hackmd {
- .hackmd-preinit,
- #iframe-hackmd-container > iframe {
- border: none;
- }
- .hackmd-error {
- top: 0;
- background-color: rgba(bs.$gray-800, 0.8);
- }
- .hackmd-status-label {
- font-size: 3em;
- }
- .hackmd-resume-button-container,
- .hackmd-discard-button-container {
- .btn-text {
- display: inline-block;
- min-width: 230px;
- }
- }
- .btn-view-outdated-draft {
- text-decoration: underline;
- vertical-align: unset;
- }
- }
- /*****************
- * Toastr
- *****************/
- .Toastify .Toastify__toast-container {
- top: 4.5em;
- }
- }
- .layout-root.editing {
- &:not(.growi-layout-fluid) .page-editor-preview-body {
- .wiki {
- max-width: 980px;
- margin: 0 auto;
- }
- }
- &.growi-layout-fluid .page-editor-preview-body {
- .wiki {
- margin: 0 auto;
- }
- }
- }
- // TODO: Never used this id class
- #tag-edit-button-tooltip {
- .tooltip-inner {
- color: black;
- background-color: white;
- border: 1px solid bs.$gray-300;
- }
- .tooltip-arrow {
- border-bottom: 5px solid bs.$gray-300;
- }
- }
|