mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Optimize the style of label tag
This commit is contained in:
parent
d194052d7e
commit
8e080e7e27
@ -13,7 +13,7 @@ function postLabel(args) {
|
||||
|
||||
!text && hexo.log.warn('Label text must be defined!');
|
||||
|
||||
return `<span class="label ${classes.trim()}">${text}</span>`;
|
||||
return `<mark class="label ${classes.trim()}">${text}</mark>`;
|
||||
}
|
||||
|
||||
hexo.extend.tag.register('label', postLabel, {ends: false});
|
||||
|
||||
@ -22,12 +22,10 @@
|
||||
|
||||
&::before {
|
||||
content: ' (';
|
||||
display: inline;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: ') ';
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,29 +1,10 @@
|
||||
.post-body .label {
|
||||
color: $text-color;
|
||||
display: inline;
|
||||
padding: 0 2px;
|
||||
|
||||
&.default {
|
||||
background: $label-default;
|
||||
}
|
||||
|
||||
&.primary {
|
||||
background: $label-primary;
|
||||
}
|
||||
|
||||
&.info {
|
||||
background: $label-info;
|
||||
}
|
||||
|
||||
&.success {
|
||||
background: $label-success;
|
||||
}
|
||||
|
||||
&.warning {
|
||||
background: $label-warning;
|
||||
}
|
||||
|
||||
&.danger {
|
||||
background: $label-danger;
|
||||
for $type in $note-types {
|
||||
&.{$type} {
|
||||
background: lookup('$label-' + $type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
.post-body .note {
|
||||
$note-icons = hexo-config('note.icons');
|
||||
$note-style = hexo-config('note.style');
|
||||
$note-types = 'default' 'primary' 'info' 'success' 'warning' 'danger';
|
||||
|
||||
border-radius: $note-border-radius;
|
||||
margin-bottom: 20px;
|
||||
|
||||
@ -278,6 +278,7 @@ $post-eof-margin-bottom = 60px; // or 120px for less white space;
|
||||
// --------------------------------------------------
|
||||
// Read note light_bg_offset from NexT config and set in "$lbg%" to use it as string variable.
|
||||
$lbg = hexo-config('note.light_bg_offset') is a 'unit' ? unit(hexo-config('note.light_bg_offset'), "%") : 0;
|
||||
$note-types = 'default' 'primary' 'info' 'success' 'warning' 'danger';
|
||||
|
||||
// Default
|
||||
$note-border-radius = 3px;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user