redesign 2023
This commit is contained in:
77
themes/FixIt/assets/css/_shortcodes/_admonition.scss
Normal file
77
themes/FixIt/assets/css/_shortcodes/_admonition.scss
Normal file
@ -0,0 +1,77 @@
|
||||
.admonition {
|
||||
position: relative;
|
||||
margin: 1rem 0;
|
||||
padding: 0 0.75rem;
|
||||
border-left: .25rem solid;
|
||||
overflow: auto;
|
||||
@include border-radius($global-border-radius);
|
||||
|
||||
.admonition-title {
|
||||
font-weight: bold;
|
||||
margin: 0 -0.75rem;
|
||||
padding: 0.25rem 1.8rem;
|
||||
border-bottom: 1px solid;
|
||||
@include border-radius(0);
|
||||
}
|
||||
|
||||
.admonition-content {
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
i.icon {
|
||||
font-size: 0.85rem;
|
||||
position: absolute;
|
||||
top: 0.6rem;
|
||||
left: 0.4rem;
|
||||
}
|
||||
|
||||
i.details-icon {
|
||||
position: absolute;
|
||||
top: 0.6rem;
|
||||
right: 0.3rem;
|
||||
}
|
||||
|
||||
@each $type, $color, $background-color in $admonition-color-map {
|
||||
@if $type == 'note' {
|
||||
background-color: $background-color;
|
||||
border-left-color: $color;
|
||||
|
||||
.admonition-title {
|
||||
border-bottom-color: $background-color;
|
||||
background-color: opacify($background-color, 0.15);
|
||||
}
|
||||
|
||||
&.open .admonition-title {
|
||||
background-color: $background-color;
|
||||
}
|
||||
|
||||
i.icon {
|
||||
color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
@else {
|
||||
&.#{$type} {
|
||||
background-color: $background-color;
|
||||
border-left-color: $color;
|
||||
|
||||
.admonition-title {
|
||||
border-bottom-color: $background-color;
|
||||
background-color: opacify($background-color, 0.15);
|
||||
}
|
||||
|
||||
&.open .admonition-title {
|
||||
background-color: $background-color;
|
||||
}
|
||||
|
||||
i.icon {
|
||||
color: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
}
|
16
themes/FixIt/assets/css/_shortcodes/_bilibili.scss
Normal file
16
themes/FixIt/assets/css/_shortcodes/_bilibili.scss
Normal file
@ -0,0 +1,16 @@
|
||||
.bilibili {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 75%;
|
||||
margin: 3% auto;
|
||||
text-align: center;
|
||||
|
||||
iframe {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
99
themes/FixIt/assets/css/_shortcodes/_cardlink.scss
Normal file
99
themes/FixIt/assets/css/_shortcodes/_cardlink.scss
Normal file
@ -0,0 +1,99 @@
|
||||
/**
|
||||
* Card link style
|
||||
* @author @Lruihao https://lruihao.cn
|
||||
*/
|
||||
|
||||
.card-link {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 0.5rem auto;
|
||||
box-sizing: border-box;
|
||||
width: clamp(50%, 400px, 100%);
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
@include border-radius(0.75rem);
|
||||
}
|
||||
|
||||
.cl- {
|
||||
&backdrop {
|
||||
position: absolute;
|
||||
top: 0.75rem;
|
||||
bottom: 0.75rem;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-image: var(--cl-bg-url);
|
||||
background-repeat: no-repeat;
|
||||
filter: blur(0.5rem);
|
||||
opacity: 0.5;
|
||||
background-size: contain;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
&content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0.75rem;
|
||||
background-color: rgba(245, 245, 245, 0.88);
|
||||
}
|
||||
|
||||
&text {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&title {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
max-height: calc(1rem * 1.25 * 2);
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.25;
|
||||
color: $global-font-color;
|
||||
}
|
||||
|
||||
&meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 0.25rem;
|
||||
font-size: 0.825rem;
|
||||
color: $global-font-secondary-color;
|
||||
}
|
||||
|
||||
&icon-link {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
flex-shrink: 0;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
&url {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&icon-globe {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
flex-shrink: 0;
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
|
||||
[data-theme='dark'] & {
|
||||
&content {
|
||||
background-color: rgba(61, 62, 65, 0.88);
|
||||
}
|
||||
|
||||
&title {
|
||||
color: $global-font-color-dark;
|
||||
}
|
||||
|
||||
&meta {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
43
themes/FixIt/assets/css/_shortcodes/_center-quote.scss
Normal file
43
themes/FixIt/assets/css/_shortcodes/_center-quote.scss
Normal file
@ -0,0 +1,43 @@
|
||||
.blockquote-center {
|
||||
border-left: none;
|
||||
margin: 40px 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
color: initial;
|
||||
|
||||
&::after,
|
||||
&::before {
|
||||
left: 0;
|
||||
line-height: 1;
|
||||
opacity: 0.6;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&::before {
|
||||
border-top: 1px solid $global-border-color;
|
||||
text-align: left;
|
||||
top: -20px;
|
||||
content: '\f10d';
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-weight: 900;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
border-top-color: $global-border-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
border-bottom: 1px solid $global-border-color;
|
||||
bottom: -20px;
|
||||
text-align: right;
|
||||
content: '\f10e';
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-weight: 900;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
border-bottom-color: $global-border-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
4
themes/FixIt/assets/css/_shortcodes/_echarts.scss
Normal file
4
themes/FixIt/assets/css/_shortcodes/_echarts.scss
Normal file
@ -0,0 +1,4 @@
|
||||
.echarts {
|
||||
margin: 0.5rem 0;
|
||||
text-align: center;
|
||||
}
|
8
themes/FixIt/assets/css/_shortcodes/_index.scss
Normal file
8
themes/FixIt/assets/css/_shortcodes/_index.scss
Normal file
@ -0,0 +1,8 @@
|
||||
@import '_admonition';
|
||||
@import '_bilibili';
|
||||
@import '_cardlink';
|
||||
@import '_center-quote';
|
||||
@import '_echarts';
|
||||
@import '_instagram';
|
||||
@import '_mapbox';
|
||||
@import '_mermaid';
|
5
themes/FixIt/assets/css/_shortcodes/_instagram.scss
Normal file
5
themes/FixIt/assets/css/_shortcodes/_instagram.scss
Normal file
@ -0,0 +1,5 @@
|
||||
iframe.instagram-media {
|
||||
[data-theme='dark'] & {
|
||||
border: none !important;
|
||||
}
|
||||
}
|
5
themes/FixIt/assets/css/_shortcodes/_mapbox.scss
Normal file
5
themes/FixIt/assets/css/_shortcodes/_mapbox.scss
Normal file
@ -0,0 +1,5 @@
|
||||
.mapbox {
|
||||
margin: 0.5rem 0;
|
||||
padding: 0.5rem 0;
|
||||
@include border-radius($global-border-radius);
|
||||
}
|
8
themes/FixIt/assets/css/_shortcodes/_mermaid.scss
Normal file
8
themes/FixIt/assets/css/_shortcodes/_mermaid.scss
Normal file
@ -0,0 +1,8 @@
|
||||
.mermaid {
|
||||
text-align: center;
|
||||
|
||||
svg {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user