mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Add blockquote prompts (resolve #489)
This commit is contained in:
@@ -104,6 +104,30 @@ blockquote {
|
||||
border-left: 5px solid var(--blockquote-border-color);
|
||||
padding-left: 1rem;
|
||||
color: var(--blockquote-text-color);
|
||||
|
||||
&[class^="prompt-"] {
|
||||
display: flex;
|
||||
border-left: 0;
|
||||
border-radius: 6px;
|
||||
padding: 0.75rem 1rem;
|
||||
|
||||
&::before {
|
||||
margin-right: 0.8rem;
|
||||
font-family: "Font Awesome 5 Free";
|
||||
text-align: center;
|
||||
width: 1.25rem;
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
}
|
||||
|
||||
@include prompt("note", "\f0eb", 400);
|
||||
|
||||
@include prompt("warning", "\f06a");
|
||||
|
||||
@include prompt("danger", "\f071");
|
||||
}
|
||||
|
||||
kbd {
|
||||
@@ -1142,32 +1166,6 @@ $sidebar-display: "sidebar-display";
|
||||
|
||||
$footer-height: $footer-height-mobile; // overwrite
|
||||
|
||||
#main > div.row:first-child > div:first-child {
|
||||
min-height: calc(100vh - #{$topbar-height} - #{$footer-height});
|
||||
}
|
||||
|
||||
#core-wrapper {
|
||||
min-height: calc(100vh - #{$topbar-height} - #{$footer-height} - #{$bottom-min-height}) !important;
|
||||
|
||||
h1 {
|
||||
margin-top: 2.2rem;
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
#avatar > a {
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
.site-subtitle {
|
||||
@include ml-mr(1.8rem);
|
||||
}
|
||||
|
||||
#main-wrapper {
|
||||
padding-bottom: $footer-height;
|
||||
}
|
||||
|
||||
footer {
|
||||
height: $footer-height;
|
||||
|
||||
@@ -1186,6 +1184,40 @@ $sidebar-display: "sidebar-display";
|
||||
}
|
||||
}
|
||||
|
||||
#main > div.row:first-child > div:first-child {
|
||||
min-height: calc(100vh - #{$topbar-height} - #{$footer-height});
|
||||
}
|
||||
|
||||
#core-wrapper {
|
||||
min-height: calc(100vh - #{$topbar-height} - #{$footer-height} - #{$bottom-min-height}) !important;
|
||||
|
||||
h1 {
|
||||
margin-top: 2.2rem;
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
||||
.post-content {
|
||||
> blockquote[class^=prompt-] {
|
||||
@include ml-mr(-1.25rem);
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#avatar > a {
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
.site-subtitle {
|
||||
@include ml-mr(1.8rem);
|
||||
}
|
||||
|
||||
#main-wrapper {
|
||||
padding-bottom: $footer-height;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* hide sidebar and panel */
|
||||
|
||||
@@ -104,17 +104,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
%sidebar-links {
|
||||
color: rgba(117, 117, 117, 0.9);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* ---------- scss mixin --------- */
|
||||
|
||||
@mixin no-text-decoration {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
%sidebar-links {
|
||||
color: rgba(117, 117, 117, 0.9);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@mixin ml-mr($value) {
|
||||
margin-left: $value;
|
||||
margin-right: $value;
|
||||
@@ -142,3 +142,16 @@
|
||||
-ms-transform: translateX(-50%);
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
@mixin prompt($type, $fw-icon, $icon-weight: 900) {
|
||||
&.prompt-#{$type} {
|
||||
background-color: var(--prompt-#{$type}-bg);
|
||||
color: var(--prompt-text-color);
|
||||
|
||||
&::before {
|
||||
content: $fw-icon;
|
||||
color: var(--prompt-#{$type}-icon-color);
|
||||
font-weight: $icon-weight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,11 @@ code {
|
||||
padding: 3px 5px;
|
||||
border-radius: 4px;
|
||||
background-color: var(--inline-code-bg);
|
||||
|
||||
blockquote[class^="prompt-"] & {
|
||||
background-color: var(--prompt-code-bg);
|
||||
color: var(--prompt-code-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
a > &.highlighter-rouge {
|
||||
|
||||
Reference in New Issue
Block a user