-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #519 from hugo-fixit/obsidian-callouts
🎉 Feat: support extended alert syntax compatible with Obsidian Callouts min hugo version 0.134.1
- Loading branch information
Showing
29 changed files
with
298 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,46 @@ | ||
.details { | ||
.details-summary { | ||
> .details-summary { | ||
@include border-radius($global-border-radius); | ||
|
||
&:hover { | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
i.details-icon { | ||
color: $global-font-secondary-color; | ||
@include transition(transform 0.2s ease); | ||
i.details-icon { | ||
color: $global-font-secondary-color; | ||
@include transition(transform 0.2s ease); | ||
|
||
[data-theme='dark'] & { | ||
color: $global-font-secondary-color-dark; | ||
[data-theme='dark'] & { | ||
color: $global-font-secondary-color-dark; | ||
} | ||
} | ||
} | ||
|
||
.details-content { | ||
> .details-content { | ||
max-height: 0; | ||
overflow-y: hidden; | ||
@include details-transition-open; | ||
} | ||
|
||
&.open { | ||
.details-summary { | ||
> .details-summary { | ||
@include border-radius($global-border-radius $global-border-radius 0 0); | ||
} | ||
|
||
i.details-icon { | ||
@include transform(rotate(90deg)); | ||
i.details-icon { | ||
@include transform(rotate(90deg)); | ||
} | ||
} | ||
|
||
.details-content { | ||
> .details-content { | ||
max-height: 100%; | ||
@include border-radius(0 0 $global-border-radius $global-border-radius); | ||
@include details-transition-close; | ||
} | ||
} | ||
|
||
&.disabled { | ||
> .details-summary { | ||
cursor: default; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,55 @@ | ||
// Color map of admonition [$type $color $background-color, ... ] | ||
$admonition-color-map: | ||
'note' #448aff rgba(68, 138, 255, 0.1), | ||
'abstract' #00b0ff rgba(0, 176, 255, 0.1), | ||
'info' #00b8d4 rgba(0, 184, 212, 0.1), | ||
'tip' #00bfa5 rgba(0, 191, 165, 0.1), | ||
'success' #00c853 rgba(0, 200, 83, 0.1), | ||
'question' #64dd17 rgba(100, 221, 23, 0.1), | ||
'warning' #ff9100 rgba(255, 145, 0, 0.1), | ||
'failure' #ff5252 rgba(255, 82, 82, 0.1), | ||
'danger' #ff1744 rgba(255, 23, 68, 0.1), | ||
'bug' #f50057 rgba(245, 0, 87, 0.1), | ||
'example' #651fff rgba(101, 31, 255, 0.1), | ||
'quote' #9e9e9e rgba(159, 159, 159, 0.1) | ||
!default; | ||
// Color map of admonitions | ||
$admonition-color-map: ( | ||
note: ( | ||
color: #448aff, | ||
bg-color: rgba(68, 138, 255, 0.1), | ||
), | ||
abstract: ( | ||
color: #00b0ff, | ||
bg-color: rgba(0, 176, 255, 0.1), | ||
), | ||
info: ( | ||
color: #00b8d4, | ||
bg-color: rgba(0, 184, 212, 0.1), | ||
), | ||
todo: ( | ||
color: #5e9aff, | ||
bg-color: rgba(94, 154, 255, 0.1), | ||
), | ||
tip: ( | ||
color: #00bfa5, | ||
bg-color: rgba(0, 191, 165, 0.1), | ||
), | ||
success: ( | ||
color: #00c853, | ||
bg-color: rgba(0, 200, 83, 0.1), | ||
), | ||
question: ( | ||
color: #ffbd67, | ||
bg-color: rgba(255, 190, 0, 0.1), | ||
), | ||
warning: ( | ||
color: #ff9100, | ||
bg-color: rgba(255, 145, 0, 0.1), | ||
), | ||
failure: ( | ||
color: #ff5252, | ||
bg-color: rgba(255, 82, 82, 0.1), | ||
), | ||
danger: ( | ||
color: #ff1744, | ||
bg-color: rgba(255, 23, 68, 0.1), | ||
), | ||
bug: ( | ||
color: #f50057, | ||
bg-color: rgba(245, 0, 87, 0.1), | ||
), | ||
example: ( | ||
color: #651fff, | ||
bg-color: rgba(101, 31, 255, 0.1), | ||
), | ||
quote: ( | ||
color: #9e9e9e, | ||
bg-color: rgba(159, 159, 159, 0.1), | ||
), | ||
) !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,46 @@ | ||
// Color map of alert [$type $border-color $color, ... ] | ||
$alert-color-map: | ||
'note' #0969da #0969da, | ||
'tip' #1a7f37 #1a7f37, | ||
'important' #8250df #8250df, | ||
'warning' #bf8700 #9a6700, | ||
'caution' #cf222e #d1242f, | ||
!default; | ||
// Color map of basic alerts | ||
$alert-color-map: ( | ||
note: ( | ||
border-color: #0969da, | ||
color: #0969da, | ||
), | ||
tip: ( | ||
border-color: #1a7f37, | ||
color: #1a7f37, | ||
), | ||
important: ( | ||
border-color: #8250df, | ||
color: #8250df, | ||
), | ||
warning: ( | ||
border-color: #bf8700, | ||
color: #9a6700, | ||
), | ||
caution: ( | ||
border-color: #cf222e, | ||
color: #d1242f, | ||
), | ||
) !default; | ||
|
||
$alert-color-map-dark: | ||
'note' #316dca #478be6, | ||
'tip' #347d39 #57ab5a, | ||
'important' #8256d0 #986ee2, | ||
'warning' #966600 #c69026, | ||
'caution' #c93c37 #e5534b, | ||
!default; | ||
$alert-color-map-dark: ( | ||
note: ( | ||
border-color: #316dca, | ||
color: #478be6, | ||
), | ||
tip: ( | ||
border-color: #347d39, | ||
color: #57ab5a, | ||
), | ||
important: ( | ||
border-color: #8256d0, | ||
color: #986ee2, | ||
), | ||
warning: ( | ||
border-color: #966600, | ||
color: #c69026, | ||
), | ||
caution: ( | ||
border-color: #c93c37, | ||
color: #e5534b, | ||
), | ||
) !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.