Skip to content

Commit d1d1cc3

Browse files
committed
new theme with sidebar changed
1 parent 52d6141 commit d1d1cc3

File tree

223 files changed

+10746
-1336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+10746
-1336
lines changed

assets/images/404.png

108 KB
Loading

assets/images/404.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/default-avatar.png

46.5 KB
Loading

assets/images/default-hero.jpg

69.4 KB
Loading

assets/images/favicon.png

13.3 KB
Loading

assets/images/hugo-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/images/inverted-logo.png

13.3 KB
Loading

assets/images/main-logo.png

5.5 KB
Loading

assets/images/theme-logo.png

13.3 KB
Loading
Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ function addCopyButtonToCodeBlocks() {
3737

3838

3939
// For each code block, add a copy button inside a header
40-
4140
codeBlocks.forEach((codeBlock) => {
4241

4342
// Get the background color of the code block
44-
4543
const computedStyle = window.getComputedStyle(codeBlock);
4644
const backgroundColor = computedStyle.backgroundColor;
4745

@@ -169,35 +167,36 @@ function addCopyButtonToCodeBlocks() {
169167
// Call the function to add copy buttons to code blocks
170168
document.addEventListener("DOMContentLoaded", addCopyButtonToCodeBlocks);
171169

172-
function addCopyButtons(clipboard) {
173-
document.querySelectorAll('pre > code').forEach(function (codeBlock) {
174-
var button = document.createElement('button');
175-
button.className = 'copy-code-button';
176-
button.type = 'button';
177-
button.innerText = 'Copy';
170+
// function addCopyButtons(clipboard) {
171+
// document.querySelectorAll('pre > code').forEach(function (codeBlock) {
172+
// var button = document.createElement('button');
173+
// button.className = 'copy-code-button';
174+
// button.type = 'button';
175+
// button.innerText = 'Copy';
178176

179-
button.addEventListener('click', function () {
180-
clipboard.writeText(codeBlock.innerText).then(function () {
181-
/* Chrome doesn't seem to blur automatically,
182-
leaving the button in a focused state. */
183-
button.blur();
177+
// button.addEventListener('click', function () {
178+
// clipboard.writeText(codeBlock.innerText).then(function () {
179+
// /* Chrome doesn't seem to blur automatically,
180+
// leaving the button in a focused state. */
181+
// button.blur();
184182

185-
button.innerText = 'Copied!';
183+
// button.innerText = 'Copied!';
186184

187-
setTimeout(function () {
188-
button.innerText = 'Copy';
189-
}, 2000);
190-
}, function (error) {
191-
button.innerText = 'Error';
192-
});
193-
});
185+
// setTimeout(function () {
186+
// button.innerText = 'Copy';
187+
// }, 2000);
188+
// }, function (error) {
189+
// button.innerText = 'Error';
190+
// });
191+
// });
192+
193+
// var pre = codeBlock.parentNode;
194+
// if (pre.parentNode.classList.contains('highlight')) {
195+
// var highlight = pre.parentNode;
196+
// highlight.parentNode.insertBefore(button, highlight);
197+
// } else {
198+
// pre.parentNode.insertBefore(button, pre);
199+
// }
200+
// });
201+
// }
194202

195-
var pre = codeBlock.parentNode;
196-
if (pre.parentNode.classList.contains('highlight')) {
197-
var highlight = pre.parentNode;
198-
highlight.parentNode.insertBefore(button, highlight);
199-
} else {
200-
pre.parentNode.insertBefore(button, pre);
201-
}
202-
});
203-
}

0 commit comments

Comments
 (0)