Skip to content

Commit

Permalink
deploy: 5643bcc
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 9, 2024
1 parent 8cfb769 commit 4f36e31
Show file tree
Hide file tree
Showing 6 changed files with 6,428 additions and 1,142 deletions.
1,507 changes: 1,279 additions & 228 deletions ctp-frappe.css

Large diffs are not rendered by default.

1,507 changes: 1,279 additions & 228 deletions ctp-latte.css

Large diffs are not rendered by default.

1,507 changes: 1,279 additions & 228 deletions ctp-macchiato.css

Large diffs are not rendered by default.

1,507 changes: 1,279 additions & 228 deletions ctp-mocha.css

Large diffs are not rendered by default.

1,511 changes: 1,281 additions & 230 deletions ctp-oled.css

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,43 @@ const settings = [
enumChoices: accentNames,
default: "Full palette"
},
{
key: "CtpWhiteboard",
title: "Override Whiteboard theme to light theme?",
description: " Override whiteboard theme to use Latte theme flavor",
type: "boolean",
default: false,
},
];

function setWhiteboardOverride(bool) {
const rootContainer = parent.document.querySelector(`html`);
if (bool) {
rootContainer.classList.add('whiteboard-latte');
} else {
rootContainer.classList.remove('whiteboard-latte');
}
}

function setAccent(accentName) {
logseq.provideStyle({
key: 'ctp-accent',
style: `
:root:not([data-color]), :root[data-color='none'], :root[data-color='logseq'] {
--ctp-accent: ${accentMap[accentName]};
}
html.whiteboard-latte div.whiteboard-page {
--ctp-accent: ${accentMap[accentName]};
}
html.whiteboard-latte div.dashboard-card {
--ctp-accent: ${accentMap[accentName]};
}
html.whiteboard-latte div.tl-tooltip-content {
--ctp-accent: ${accentMap[accentName]};
}
html.whiteboard-latte div.tl-select-input-content {
--ctp-accent: ${accentMap[accentName]};
}
`,
});
}
Expand All @@ -54,6 +82,9 @@ async function main() {
if (setAccent(updatedSettings.CtpAccent)) {
console.log(`Applied ${updatedSettings.CtpAccent} accent✨`);
}
if (setWhiteboardOverride(updatedSettings.CtpWhiteboard)) {
console.log(`${updatedSettings.CtpWhiteboard ? 'Applied' : 'Removed'} Latte whiteboard flavor✨`);
}
});
}

Expand Down

0 comments on commit 4f36e31

Please sign in to comment.