mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-25 07:48:54 +00:00
🎉 Feat: add more type marked text support
This commit is contained in:
@@ -289,6 +289,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.14em 0.28em;
|
||||
background-color: var(--#{$prefix}mark-background-color, mark);
|
||||
color: var(--#{$prefix}mark-color, marktext);
|
||||
@include border-radius($global-border-radius);
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
&.mark-#{$color} {
|
||||
--#{$prefix}mark-color: #fff;
|
||||
--#{$prefix}mark-background-color: var(--#{$prefix}#{$color});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
overflow-x: auto;
|
||||
--#{$prefix}scrollbar-thumb-color: #{$table-background-color};
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- $content = partial "function/task-lists.html" $content -}}
|
||||
|
||||
{{- $content = partial "function/marked-text.html" $content -}}
|
||||
{{- $content = partial "function/escape.html" $content -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{{- /*
|
||||
Marked texts rendering
|
||||
This is an experimental syntax highlighting for the marked texts.
|
||||
Embed types: default, primary, secondary, success, warning, danger
|
||||
*/ -}}
|
||||
|
||||
{{- $content := replaceRE `<mark>(.+?)</mark>\[(.+?)\]` `<mark class="mark-$2">$1</mark>` . -}}
|
||||
{{- $content = replaceRE `<mark>(.+?)</mark>` `<mark class="mark-default">$1</mark>` $content -}}
|
||||
|
||||
{{- return $content -}}
|
||||
Reference in New Issue
Block a user