mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-19 19:46:34 +00:00
Copy to clipboard feature for code block (#152)
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
This commit is contained in:
parent
015ed4cfa2
commit
f54df35767
6 changed files with 114 additions and 14 deletions
assets/js
|
@ -8,7 +8,7 @@ const syntaxTheme = document.querySelector("#theme-link");
|
|||
|
||||
if (currentTheme) {
|
||||
document.documentElement.setAttribute('saved-theme', currentTheme);
|
||||
(currentTheme === 'dark') ? syntaxTheme.href = '{{ $darkSyntax.Permalink }}' : syntaxTheme.href = '{{ $lightSyntax.Permalink }}';
|
||||
syntaxTheme.href = currentTheme === 'dark' ? '{{ $darkSyntax.Permalink }}' : '{{ $lightSyntax.Permalink }}';
|
||||
}
|
||||
|
||||
const switchTheme = (e) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue