amis/examples/style.scss

687 lines
11 KiB
SCSS
Raw Normal View History

2020-07-23 20:31:51 +08:00
@import '../scss/mixins';
2019-04-30 11:11:25 +08:00
@import '../scss/functions';
@import '../scss/variables';
2020-07-23 20:31:51 +08:00
body {
background-color: #fff;
2020-07-29 20:25:04 +08:00
&.dark {
background-color: #333538;
}
2020-07-23 20:31:51 +08:00
}
2019-10-18 12:23:41 +08:00
.page-play,
.page-edit {
2019-12-06 09:58:08 +08:00
&:before {
display: table;
content: ' ';
}
2019-10-18 12:23:41 +08:00
2019-12-06 09:58:08 +08:00
&:after {
clear: both;
display: block;
content: '';
height: 0;
}
2019-10-18 12:23:41 +08:00
2019-12-06 09:58:08 +08:00
.app-content {
position: absolute;
top: 50px;
bottom: 0;
height: auto;
left: 0;
right: 0;
}
2019-10-18 12:23:41 +08:00
2019-12-06 09:58:08 +08:00
.app-content-body {
height: 100%;
}
2019-04-30 11:11:25 +08:00
}
.resizer {
2019-12-06 09:58:08 +08:00
position: absolute;
top: 0;
bottom: 0;
margin-left: -2px;
width: 4px;
background: lighten($dark, 20%);
z-index: 1;
cursor: col-resize;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:hover {
background: $dark;
}
2019-04-30 11:11:25 +08:00
}
2020-07-23 20:31:51 +08:00
.MDPreview {
flex: 1 auto;
overflow: auto;
width: 100%;
position: relative;
&-shcema-preview-popover {
box-shadow: none !important;
margin-top: -1px !important;
padding: 0 45px !important;
2020-07-28 10:03:53 +08:00
left: 0 !important;
2020-07-23 20:31:51 +08:00
width: 100% !important;
// max-width: 980px !important;
z-index: 1 !important;
background: transparent !important;
border: none !important;
}
&-schema-preview {
2019-12-06 09:58:08 +08:00
border: 1px solid #ddd;
2020-07-23 20:31:51 +08:00
// background: rgb(240, 243, 244);
2019-12-06 09:58:08 +08:00
position: relative;
height: 100%;
width: 100%;
}
2019-04-30 11:11:25 +08:00
}
// .view-code {
// position: fixed;
// top: 15px;
// z-index: 1200;
// right: 175px;
// }
2019-12-06 09:58:08 +08:00
.amis-schema-editor.fix-settings
.amis-schema-editor-settings-inner
.amis-schema-editor-config-tab
> .tab-content,
.amis-schema-editor.fix-settings
.amis-schema-editor-settings-inner
.amis-schema-editor-code-tab
> .tab-content {
bottom: 50px;
}
2020-07-23 20:31:51 +08:00
.app-wrapper {
2020-07-28 10:03:53 +08:00
.a-Layout,
.cxd-Layout,
.dark-Layout {
2020-07-29 15:33:25 +08:00
padding-top: 100px;
2020-07-24 17:20:08 +08:00
2020-07-29 19:35:01 +08:00
&-header {
2020-07-23 20:31:51 +08:00
height: 64px;
2020-07-29 19:35:01 +08:00
box-shadow: none;
&::before {
position: fixed;
height: 64px;
content: '';
z-index: -1;
left: 0;
right: 0;
box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.1);
}
2020-07-30 14:21:21 +08:00
.gh-icon {
position: fixed;
right: 20px;
top: 15px;
font-size: 22px;
padding: 0 10px;
color: #333;
&:hover {
color: #333;
}
}
2020-07-29 19:35:01 +08:00
}
&-brandBar,
&-searchBar {
position: relative;
2020-07-23 20:31:51 +08:00
2020-07-29 19:35:01 +08:00
&::before {
2020-07-23 20:31:51 +08:00
top: 50%;
right: 0;
height: 32px;
content: ' ';
position: absolute;
transform: translateY(-50%);
border-left: 1px solid #e8ebee;
width: 1px;
}
2020-07-29 19:35:01 +08:00
}
2020-07-23 20:31:51 +08:00
2020-07-29 19:35:01 +08:00
&-brandBar {
background-color: transparent;
width: 200px;
.a-Layout-brand,
.cxd-Layout-brand,
.dark-Layout-brand {
height: 64px;
line-height: 64px;
font-size: 24px;
padding: 0;
font-weight: 400;
i {
color: #108cee;
}
2020-07-23 20:31:51 +08:00
}
2020-07-29 20:25:04 +08:00
.a-Layout-brand,
.cxd-Layout-brand {
color: #333;
}
2020-07-29 19:35:01 +08:00
}
&-headerBar {
height: 64px;
padding-right: 20px;
2020-07-23 20:31:51 +08:00
&-links {
height: 64px;
line-height: 64px;
font-size: 14px;
2020-07-29 20:25:04 +08:00
padding-left: 35px;
2020-07-24 17:20:08 +08:00
2020-07-23 20:31:51 +08:00
> a {
2020-07-24 17:20:08 +08:00
display: inline-block;
2020-07-23 20:31:51 +08:00
color: #333;
2020-07-24 17:20:08 +08:00
padding: 0px 22px;
text-decoration: none;
font-weight: 500;
&.is-active {
color: #108cee;
position: relative;
&::before {
content: '';
border-bottom: 2px solid #108cee;
position: absolute;
width: 100%;
left: 0;
bottom: 0;
}
}
2020-07-23 20:31:51 +08:00
}
}
}
2020-07-29 19:35:01 +08:00
&-searchBar {
2020-07-30 11:45:53 +08:00
width: 120px;
2020-07-23 20:31:51 +08:00
2020-07-29 19:35:01 +08:00
.Doc-search {
top: 15px;
2020-07-23 20:31:51 +08:00
}
&::before {
left: 0;
}
}
}
2020-07-29 20:25:04 +08:00
.dark-Layout {
&-header::before {
background-color: #191c22;
}
.Doc-search .dark-TextControl-input {
background-color: #191c22;
}
&-headerBar-links > a {
color: #eee;
}
}
.a-Layout,
.cxd-Layout {
&::before {
background-color: #fff;
}
&-header::before {
background: #fff;
}
}
2020-07-23 20:31:51 +08:00
}
.Doc {
2020-07-29 15:33:25 +08:00
height: 100%;
2020-07-23 20:31:51 +08:00
.anchor {
2020-07-28 18:23:02 +08:00
padding-top: 100px;
margin-top: -100px;
2020-07-23 20:31:51 +08:00
}
a {
text-decoration: none;
}
&-nav,
&-toc {
margin-top: 30px;
}
&-nav,
&-toc {
a {
display: inline-block;
width: 100%;
padding: 5px 10px;
}
> div {
scrollbar-width: none;
/* Firefox */
-ms-overflow-style: none;
/* IE 10+ */
&::-webkit-scrollbar-track {
box-shadow: none !important;
background-color: transparent;
}
&::-webkit-scrollbar {
width: 3px !important;
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
}
}
}
&-nav {
width: 200px;
}
&-toc {
margin: 30px 0;
2020-07-30 11:45:53 +08:00
width: 120px;
2020-07-23 20:31:51 +08:00
}
&-navigation {
&-item {
padding-left: 20px;
border-left: 1px solid #e8ebee;
position: relative;
> a {
// font-size: 16px;
2020-07-30 11:45:53 +08:00
font-weight: 700;
font-size: 14px;
2020-07-23 20:31:51 +08:00
color: #666;
padding-left: 0;
padding-right: 20px;
&:hover {
color: #999;
}
}
i {
font-size: 12px;
padding: 0;
display: block;
2020-07-23 20:31:51 +08:00
position: absolute;
right: 20px;
2020-07-30 11:45:53 +08:00
top: 5px;
2020-07-30 10:25:01 +08:00
// color: #666;
2020-07-30 10:25:01 +08:00
// &:hover {
// color: #333;
// }
&:before {
display: block;
transform-origin: 50% 50%;
transform: rotate(0deg);
transition: transform 0.3s ease-out;
}
2020-07-23 20:31:51 +08:00
}
&.is-top {
padding-left: 0;
border-left: 0;
display: block;
2020-07-24 17:20:08 +08:00
cursor: pointer;
2020-07-23 20:31:51 +08:00
> a {
color: #333;
&:hover {
color: #000;
}
}
}
&.is-active {
> a {
color: #108cee;
&:hover {
color: #108cee;
}
}
}
}
.Doc-navigationGroup {
margin-bottom: 30px;
&-name {
color: #999;
font-weight: 700;
margin-bottom: 10px;
}
}
}
&-headingList {
font-size: 12px;
font-weight: 500;
2020-07-29 15:33:25 +08:00
border-left: 1px solid #e8ebee;
2020-07-23 20:31:51 +08:00
&-item {
padding-left: 15px;
a {
color: #666;
2020-07-28 18:23:02 +08:00
cursor: pointer;
&:hover {
color: #333;
}
2020-07-23 20:31:51 +08:00
}
&.is-active {
&::before {
content: ' ';
border-left: 2px solid #108cee;
}
> a {
color: #108cee;
}
}
}
}
&-content {
2020-07-28 10:03:53 +08:00
position: relative;
2020-07-23 20:31:51 +08:00
.Doc-title {
2020-07-29 15:33:25 +08:00
// margin-top: 50px;
2020-07-28 14:55:49 +08:00
padding-left: 40px;
2020-07-23 20:31:51 +08:00
h1 {
margin: 0;
font-size: 40px;
font-weight: bold;
}
}
.markdown-body {
> *:first-child {
margin-top: 36px !important;
}
> h1,
> h2 {
border-top: 1px solid #e0e7ec;
border-bottom: 0;
padding-bottom: 0;
padding-top: 35px;
margin: 55px 0 35px;
}
> p,
> blockquote,
> ul,
> ol,
> dl,
> table,
> pre {
margin-bottom: 30px;
}
}
}
&-footer {
2020-07-28 18:23:02 +08:00
margin: 60px 40px 80px;
2020-07-23 20:31:51 +08:00
padding-bottom: 25px;
border-bottom: 2px solid #e0e8ef;
.Doc-navLinks {
display: flex;
justify-content: space-between;
&--prev,
&--next {
display: flex;
justify-content: space-between;
width: 330px;
height: 80px;
border: 1px solid #e8ebee;
border-radius: 3px;
padding: 20px;
transition: border-color ease-out 0.3s, color ease-out 0.3s;
box-shadow: #e8ebee 0px 3px 8px 0px;
color: #666;
&:hover {
border-color: #108cee;
color: #108cee;
.Doc-navLinks-title {
color: #108cee;
}
}
&:first-child:nth-last-child(1) {
flex: 1;
}
}
&-icon {
line-height: 40px;
}
&-body {
.Doc-navLinks-subtitle {
font-size: 12px;
}
.Doc-navLinks-title {
font-size: 16px;
font-weight: bold;
color: #333;
transition: color ease-out 0.3s;
}
}
}
}
.is-flipped {
&::before {
transform: rotate(180deg);
}
2020-07-23 20:31:51 +08:00
}
2020-07-28 14:55:49 +08:00
> .schema-wrapper {
2020-07-29 15:33:25 +08:00
position: relative;
2020-07-29 19:35:01 +08:00
2020-07-28 14:55:49 +08:00
> .a-Page,
> .cxd-Page,
> .dark-Page {
2020-07-30 11:45:53 +08:00
padding: 0 35px;
2020-07-28 14:55:49 +08:00
}
}
2020-07-23 20:31:51 +08:00
}
2020-07-29 20:25:04 +08:00
.dark-Layout .Doc {
.Doc-headingList-item a {
color: #fff;
&:hover {
color: #999;
}
}
.Doc-navigation-item {
> a {
color: #ccc;
&:hover {
color: #fff;
}
}
&.is-top > a {
color: #eee;
&:hover {
color: #fff;
}
}
&.is-active > a,
&.is-active.is-top > a {
color: #108cee;
}
}
&-footer {
.Doc-navLinks--prev,
.Doc-navLinks--next {
color: #eee;
}
.Doc-navLinks-title {
color: #fff;
}
}
.Backtop {
color: #eee;
&:hover {
color: #108cee;
}
}
.markdown-body pre {
background-color: #282c34;
}
}
2020-07-28 18:23:02 +08:00
.Backtop {
position: fixed;
right: 40px;
bottom: 40px;
width: 44px;
height: 44px;
text-align: center;
line-height: 44px;
border: 1px solid #e8ebee;
border-radius: 50%;
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
cursor: pointer;
color: #666;
font-size: 16px;
transition: all 0.3s ease-in-out;
opacity: 0;
2020-07-29 15:33:25 +08:00
z-index: -2;
2020-07-28 18:23:02 +08:00
&:hover {
color: #108cee;
}
&.visible {
opacity: 1;
2020-07-29 15:33:25 +08:00
z-index: 0;
2020-07-30 11:45:53 +08:00
z-index: 1;
2020-07-28 18:23:02 +08:00
}
}
2020-07-23 20:31:51 +08:00
@include media-breakpoint-up(lg) {
.Doc {
display: flex;
flex-direction: row;
2020-07-29 15:33:25 +08:00
&-content,
.schema-wrapper {
2020-07-23 20:31:51 +08:00
flex: 1 auto;
width: 0;
}
&-toc > div {
position: fixed;
width: 220px;
top: 100px;
2020-07-29 15:33:25 +08:00
bottom: 21px;
2020-07-23 20:31:51 +08:00
overflow: auto;
}
&-nav > div {
position: fixed;
width: 200px;
top: 100px;
bottom: 0;
overflow-y: auto;
border-right: 1px solid #e8ebee;
}
}
2020-07-29 19:35:01 +08:00
.app-wrapper {
.a-Layout,
.cxd-Layout,
.dark-Layout {
&-header {
display: flex;
flex-direction: row;
&Bar {
flex: 1 auto;
width: 0;
}
}
&-brandBar > div {
width: 220px;
position: fixed;
}
&-searchBar > div {
width: 220px;
}
}
}
2020-07-23 20:31:51 +08:00
}
@media screen and (min-width: 1640px) {
.Doc {
&-toc {
width: 1px;
}
&-nav {
width: 1px;
> div {
2020-07-29 19:35:01 +08:00
margin-left: -199px;
}
}
}
.app-wrapper {
.a-Layout,
.cxd-Layout,
.dark-Layout {
&-brandBar {
width: 1px;
> div {
margin-left: -220px;
}
}
&-searchBar {
width: 1px;
2020-07-23 20:31:51 +08:00
}
}
}
}