123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937 |
- @margin: 8px 0;
- @line-height: 22px;
- .markdown {
- overflow: hidden;
- position: relative;
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- align-items: center;
- flex-direction: column;
- background: @background;
- &.border {
- border: 1px solid @border;
- }
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- &.fullscreen {
- position: fixed;
- z-index: 999999;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- height: 100% !important;
- width: 100%;
- border: none;
- .markdown-content {
- padding: 0;
- padding-top: 10px;
- }
- }
- .markdown-toolbars {
- width: 100%;
- display: flex;
- align-items: center;
- list-style: none;
- background: #fff;
- color: #6a6f7b;
- height: 40px;
- cursor: pointer;
- //box-shadow: 0 2px 3px #ddd;
- padding-left: 4px;
- border-bottom: 1px solid @border;
- > li {
- position: relative;
- cursor: pointer;
- margin: 0;
- line-height: normal;
- min-height: auto;
- &:after {
- display: block;
- content: attr(name);
- position: absolute;
- z-index: 999999999999;
- top: 32px;
- left: 20px;
- background: #000;
- color: #fff;
- white-space: nowrap;
- font-size: 12px;
- line-height: 28px;
- padding: 0 6px;
- transition: all 0.3s 0.1s;
- transform: scale(0);
- opacity: 0;
- transform-origin: top;
- border-radius: 2px;
- }
- &:hover {
- &:after {
- transform: scale(1);
- opacity: 1;
- }
- }
- &:last-child {
- &:after {
- right: 20%;
- left: auto;
- }
- }
- .title {
- font-size: 16px !important;
- }
- }
- .empty {
- flex: 1;
- width: 12px;
- }
- span {
- font-size: 18px;
- color: #999;
- cursor: pointer;
- display: block;
- width: 30px;
- height: 30px;
- border-radius: 3px;
- line-height: 30px;
- text-align: center;
- &:hover {
- background: @background;
- color: @info;
- }
- }
- .title {
- padding-left: 4px;
- padding-right: 10px;
- }
- li:last-child {
- span {
- font-size: 20px !important;
- margin-right: 4px;
- }
- }
- .shift-theme,
- .export-file {
- height: 46px;
- //width: 80px;
- position: relative;
- display: flex;
- justify-content: center;
- align-items: center;
- span {
- padding: 0 8px;
- transition: all 0.3s;
- font-size: 18px;
- display: inline-block;
- line-height: 32px;
- &:hover {
- color: #0084ff;
- background: @background;
- border-radius: 3px;
- }
- }
- ul {
- position: absolute;
- transform: scale(0);
- transition: all 0.3s;
- left: -50%;
- top: 40px;
- width: 160px;
- transform-origin: top center;
- list-style: none;
- margin: 0;
- padding: 6px 0;
- box-sizing: border-box;
- border: 1px solid @border;
- background: #fff;
- border-radius: 4px;
- position: absolute;
- z-index: 9999999;
- box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
- &.active {
- opacity: 1;
- transform: scaleY(1);
- }
- li {
- line-height: 30px;
- padding: 0 12px;
- padding-left: 12px;
- font-size: 13px;
- cursor: pointer;
- user-select: none;
- display: flex;
- align-items: center;
- color: @content;
- .iconfont {
- font-size: 14px;
- display: block;
- height: 30px;
- width: 30px;
- line-height: 30px;
- overflow: hidden;
- &:hover {
- color: @content;
- }
- }
- i {
- font-size: 13px;
- display: block;
- font-style: normal;
- flex: 1;
- white-space: normal;
- }
- &:last-child {
- border-bottom: 0;
- .iconfont {
- font-size: 14px !important;
- margin: 0 !important;
- }
- }
- &:hover {
- background: @background;
- }
- &.disabled {
- cursor: not-allowed;
- color: @disabled;
- &:hover {
- background: transparent;
- }
- }
- }
- }
- }
- .import-file {
- position: relative;
- input {
- position: absolute;
- z-index: 9999;
- left: 0;
- top: 0;
- display: block;
- width: 100%;
- height: 100%;
- opacity: 0;
- cursor: pointer;
- font-size: 0;
- }
- &:hover {
- span {
- background: @background;
- color: @info;
- }
- &:after {
- transform: scale(1);
- opacity: 1;
- }
- }
- }
- }
- .close-preview {
- position: absolute;
- z-index: 999;
- right: 0;
- top: 0;
- height: 40px;
- width: 40px;
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- color: @content;
- span {
- font-size: 22px;
- &:hover {
- color: @title;
- }
- }
- }
- .markdown-content {
- flex: 1;
- width: 100%;
- display: flex;
- justify-content: space-between;
- position: relative;
- overflow: hidden;
- padding-bottom: 0;
- .markdown-editor { // simple版编辑器区域
- flex: 1;
- height: 100%;
- position: relative;
- margin: 0 !important;
- overflow: hidden;
- overflow-y: scroll;
- display: flex;
- justify-content: space-between;
- background: #2d2d2d;
- &::-webkit-scrollbar {
- display: none;
- }
- .index {
- background: #272727;
- min-height: 100%;
- width: 36px;
- line-height: @line-height;
- padding: 12px 0;
- li {
- background: #272727;
- color: #ccc;
- font-size: 14px;
- text-align: center;
- font-family: Consolas;
- }
- }
- textarea {
- width: 100%;
- min-height: 100%;
- outline: none;
- border: 0;
- background: #2d2d2d;
- line-height: @line-height;
- caret-color: #ccc;
- color: #669acc;
- font-size: 14px;
- font-family: Consolas;
- resize: none;
- padding: 12px 8px;
- overflow: hidden;
- white-space: nowrap;
- overflow-x: auto;
- &::selection {
- background: #999;
- color: #0084ff;
- }
- }
- }
- .codemirror {
- flex: 1;
- width: 0;
- height: 100%;
- overflow: auto;
- }
- .markdown-preview {
- flex: 1;
- width: 0;
- height: 100%;
- }
- }
- }
- .insert-img-model {
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- z-index: 99999;
- background: @mask;
- padding-top: 12%;
- transition: all 0.3s;
- opacity: 0;
- display: none;
- .model-container {
- background: #fff;
- width: 480px;
- margin: 0 auto;
- border-radius: 4px;
- transition: all 0.3s;
- transform: scale(0);
- transform-origin: center;
- .model-head {
- line-height: 32px;
- padding: 0 12px;
- background: @background;
- border-radius: 4px 4px 0 0;
- box-shadow: 0 1px 2px @border;
- display: flex;
- justify-content: space-between;
- span:nth-of-type(2) {
- font-size: 14px;
- padding-left: 12px;
- cursor: pointer;
- &:hover {
- color: @error;
- }
- }
- }
- .model-content {
- padding: 20px 12px;
- padding-top: 0;
- min-height: 180px;
- .insert-url {
- padding: 42px 0;
- display: flex;
- justify-content: space-between;
- align-items: center;
- input {
- display: block;
- border: 1px solid #ccc;
- font-size: 14px;
- padding: 4px 8px;
- line-height: 24px;
- color: #333;
- background: #fff;
- border-radius: 4px;
- writing-mode: horizontal-tb;
- text-rendering: auto;
- transition: box-shadow 2s;
- flex: 1;
- &:focus {
- border-color: @info;
- }
- &::placeholder {
- color: @tip;
- }
- }
- a {
- display: block;
- background: @info;
- color: #fff;
- line-height: 32px;
- height: 32px;
- font-size: 13px;
- padding: 0 12px;
- border-radius: 3px;
- margin-left: 20px;
- border: 1px solid @border;
- transition: all 0.3s;
- &:hover {
- background: @dark-info;
- }
- }
- }
- .insert-local {
- height: 120px;
- border: 1px dashed @border;
- border-radius: 4px;
- transition: all 0.3s;
- position: relative;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- cursor: pointer;
- span {
- font-size: 40px;
- color: @border;
- line-height: 50px;
- transition: all 0.3s;
- }
- p {
- font-size: 14px;
- color: @content;
- transition: all 0.3s;
- }
- &:hover {
- border-color: @info;
- span,
- p {
- color: @info;
- }
- }
- input {
- display: block;
- position: absolute;
- width: 100%;
- height: 100%;
- opacity: 0;
- }
- }
- }
- .model-foot {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- padding: 10px 12px;
- display: none;
- a {
- display: block;
- background: @background;
- color: @title;
- line-height: 26px;
- height: 26px;
- font-size: 13px;
- padding: 0 12px;
- border-radius: 3px;
- margin-left: 12px;
- border: 1px solid @border;
- transition: all 0.3s;
- &:hover {
- background: @divider;
- }
- &.ok {
- background: @info;
- color: #fff;
- border-color: @info;
- &:hover {
- background: @dark-info;
- }
- }
- }
- }
- }
- &.active {
- opacity: 1;
- display: block;
- .model-container {
- transform: scale(1);
- }
- }
- }
- ul.shift {
- padding: 6px 12px;
- display: flex;
- align-items: center;
- span {
- font-size: 12px;
- cursor: pointer;
- user-select: none;
- &.iconfont {
- font-size: 14px;
- }
- }
- label {
- font-size: 12px;
- padding-right: 10px;
- position: relative;
- cursor: pointer;
- user-select: none;
- }
- input[type='radio'],
- label {
- transition: all 0.6s ease;
- box-sizing: border-box;
- }
- input[type="radio"] + label::before {
- content: "\a0";
- display: inline-block;
- vertical-align: middle;
- margin-right: 4px;
- width: 8px;
- height: 8px;
- border-radius: 50%;
- border: 1px solid @primary;
- padding: 2px;
- }
- input[type="radio"]:checked + label::before {
- background-color: @primary;
- background-clip: content-box;
- padding: 2px;
- }
- input[type="radio"] {
- position: absolute;
- clip: rect(0, 0, 0, 0);
- }
- input[type="radio"]:checked + label {
- color: @primary;
- }
- }
- /deep/ .markdown-preview {
- flex: 1;
- overflow: hidden;
- overflow-y: scroll;
- background: #fff;
- padding: 20px 12px !important;
- font-family: 'Tahoma For Number', 'Chinese Quote', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- > div {
- padding: 10px 12px !important;
- background: #fff;
- &::-webkit-scrollbar {
- display: none;
- }
- }
- &::-webkit-scrollbar {
- display: none;
- }
- ul {
- list-style: none;
- padding: 0 20px;
- li {
- position: relative;
- &:after {
- display: block;
- content: "";
- width: 8px;
- height: 8px;
- border-radius: 50%;
- position: absolute;
- z-index: 99;
- top: 12px;
- left: -8px;
- background: @content;
- }
- }
- }
- ol,
- ul {
- margin: 10px 0;
- li {
- font-size: 14px !important;
- color: @content;
- line-height: 22px !important;
- padding: 4px 0;
- padding-left: 6px;
- min-height: 28px;
- input[type="checkbox"] {
- position: relative;
- cursor: pointer;
- overflow: visible;
- position: absolute;
- left: -14px;
- top: 5px;
- &:before {
- font-family: "iconfont" !important;
- color: #999;
- display: block;
- width: 18px;
- height: 18px;
- position: absolute;
- content: "\E684";
- top: 0px;
- left: -4px;
- z-index: 999999;
- background-position: center;
- background: #fff;
- font-size: 18px;
- text-align: center;
- line-height: 18px;
- }
- }
- input[type="checkbox"]:checked {
- &:before {
- content: "\E683";
- }
- }
- }
- }
- ol {
- list-style-type: decimal;
- padding-left: 20px;
- }
- hr {
- color: @border;
- height: 1px;
- border: 0;
- border-top: 1px solid @border;
- margin: 20px 0;
- padding: 0;
- }
- del,
- em,
- strong {
- display: inline-block;
- }
- blockquote {
- position: relative;
- background: @background;
- padding: 6px 12px;
- border-left: 5px solid @divider;
- border-radius: 2px;
- margin: @margin;
- }
- /*基本样式*/
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- color: @title;
- }
- h1 {
- font-size: 28px;
- border-bottom: 1px solid @border;
- }
- h2 {
- font-size: 24px;
- }
- h3 {
- font-size: 18px;
- }
- h4 {
- font-size: 16px;
- }
- h5 {
- font-size: 14px;
- }
- h6 {
- font-size: 12px;
- }
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- padding: 8px 0;
- font-weight: 600;
- }
- p {
- font-size: 14px !important;
- color: @content;
- margin-bottom: 8px;
- line-height: @line-height;
- }
- // 图片
- img {
- display: block;
- max-width: 100%;
- margin: 20px 0;
- cursor: pointer;
- }
- // 表格样式
- table {
- width: 100%;
- border: 1px solid @border;
- border-bottom: 0;
- background: #fff;
- border-spacing: 0;
- border-collapse: collapse;
- margin: 20px 0;
- tr {
- -webkit-transition: background 0.1s;
- transition: background 0.1s;
- }
- tr td,
- tr th {
- padding: 4px 8px;
- font-size: 14px;
- line-height: 24px;
- color: #333;
- border-bottom: 1px solid @border;
- cursor: pointer;
- }
- th {
- background: #f8f8f9;
- text-align: left;
- font-weight: bold;
- }
- tr:nth-of-type(even) {
- td {
- background: #fafafa;
- }
- }
- tr {
- &:hover {
- td {
- background: #f5f5f5;
- }
- }
- }
- td,
- th {
- border: 1px solid @border;
- word-break: break-all;
- }
- }
- input[type="checkbox"] {
- display: inline-block;
- border-radius: 0;
- margin-right: 8px;
- }
- a {
- text-decoration: none;
- color: @info;
- font-size: 14px;
- line-height: @line-height;
- }
- .code-block {
- position: relative;
- padding: 0 !important;
- .copy-code {// 复制代码
- position: absolute;
- z-index: 999;
- top: 5px;
- right: 10px;
- font-size: 12px;
- color: @border;
- line-height: 20px;
- cursor: pointer;
- user-select: none;
- transition: all .3s;
- opacity: 0;
- &:hover {
- color: @info;
- }
- }
- &:hover {
- .copy-code {
- opacity: 1;
- }
- }
- }
- }
- .preview-img {
- position: fixed;
- width: 100vw;
- height: 100vh;
- z-index: 99999999;
- left: 0;
- top: 0;
- background: rgba(0, 0, 0, .5);
- display: none;
- opacity: 0;
- transition: opacity .3s .1s;
- justify-content: center;
- align-items: center;
- .close {
- position: absolute;
- right: 0;
- top: 0;
- color: #fff;
- padding: 10px;
- font-size: 20px;
- cursor: pointer;
- }
- img {
- display: block;
- &.vertical {
- height: 80%;
- width: auto;
- }
- &.horizontal {
- width: 80%;
- height: auto;
- }
- }
- &.active {
- display: flex;
- opacity: 1;
- }
- }
|