Skip to content

Commit

Permalink
feat: 1.fullwidth support fix: 1.variable scope
Browse files Browse the repository at this point in the history
  • Loading branch information
JuckZ committed Feb 27, 2023
1 parent 503e87a commit dd18cf4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/render/CursorEffects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ function disableCursorEffect() {
cursorEffects.forEach(emo => emo.destroy());
}

let text_idx = 0;

export function toggleMouseClickEffects(e: MouseEvent, text: SettingModel<string, string>) {
if (!text) {
return;
}
let text_idx = 0;
const textList = text.value.split(',');
var ele = document.createElement('b');
document.body.appendChild(ele).innerHTML = textList[text_idx];
Expand Down
10 changes: 10 additions & 0 deletions src/theme/fullwidth.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// https://github.com/whyt-byte/Blue-Topaz_Obsidian-css/pull/165/commits/b0e63c4863d758b34314c15d2cbc0efc7752915c
.markdown-preview-view.fullwidth.is-readable-line-width .markdown-preview-sizer,
.markdown-source-view.is-readable-line-width.fullwidth .CodeMirror,
.is-readable-line-width.fullwidth .markdown-preview-section,
.is-readable-line-width.fullwidth .markdown-preview-section>div,
.markdown-preview-view.is-readable-line-width.fullwidth .markdown-preview-section {
width: 100% !important;
max-width: 100%;
/* margin: 0 auto; */
}
1 change: 1 addition & 0 deletions src/theme/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@import 'notebook-like-bg';
@import 'callout';
@import 'blockquote';
@import 'fullwidth';

body {
--theme-color: var(--interactive-accent);
Expand Down

0 comments on commit dd18cf4

Please sign in to comment.