🐛 Fix: typeit shortcode invalid config duration = -1 and fix style

This commit is contained in:
Cell
2022-09-03 18:16:14 +08:00
parent 13161e78a0
commit d4a2962303
5 changed files with 30 additions and 17 deletions
+1
View File
@@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file.
- :bug: Fix: `center-quote` shortcode rendering error when config `unsafe = false` (@yureiita[#160](https://github.com/hugo-fixit/FixIt/pull/160))
- :bug: Fix: menu item invalid params `draft` in submenu
- :bug: Fix: missing height and weight of img element and lazyload object-fit style
- :bug: Fix: typeit shortcode invalid config `duration = -1` and fix style
- :art: Style: change the default icons of some social links
- :globe_with_meridians: Docs(i18n): update pt-br, de in i18n
- :mag: Perf(SEO): enhance SEO performance
+21 -11
View File
@@ -366,17 +366,6 @@
}
}
.typeit {
// TODO refactor
.code {
padding: 0.375rem;
font-size: 0.875rem;
font-family: $code-font-family;
font-weight: bold;
word-break: break-all;
}
}
.version {
height: 1.25em;
vertical-align: text-bottom;
@@ -387,6 +376,27 @@
@import '../_partial/_single/comment';
}
.typeit {
.highlight {
padding: 0.375rem;
font-size: 0.875rem;
font-family: $code-font-family;
font-weight: bold;
word-break: break-all;
}
--ti-cursor-font-family: $global-font-family;
--ti-cursor-font-size: $global-font-size;
--ti-cursor-font-weight: $global-font-weight;
--ti-cursor-line-height: $global-line-height;
--ti-cursor-color: $global-font-secondary-color;
--ti-cursor-margin-left: 0;
[theme=dark] & {
--ti-cursor-color: $global-font-secondary-color-dark;
}
}
.lg-toolbar .lg-icon::after {
color: #999;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6 -4
View File
@@ -723,10 +723,12 @@ class FixIt {
cursorChar: cursorChar,
waitUntilVisible: true,
afterComplete: () => {
if (i === group.length - 1 && typeitConfig.duration >= 0) {
window.setTimeout(() => {
instance.destroy();
}, typeitConfig.duration);
if (i === group.length - 1) {
if (typeitConfig.duration >= 0) {
window.setTimeout(() => {
instance.destroy();
}, typeitConfig.duration);
}
return;
}
instance.destroy();