Homepage setup for schleppe lab blog
BIN
assets/fonts/FiraCode-Bold.ttf
Normal file
BIN
assets/fonts/FiraCode-Light.ttf
Normal file
BIN
assets/fonts/FiraCode-Medium.ttf
Normal file
BIN
assets/fonts/FiraCode-Regular.ttf
Normal file
BIN
assets/fonts/FiraCode-SemiBold.ttf
Normal file
BIN
assets/images/0001-brewpi.jpeg
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
assets/images/0001-proxmox.jpg
Normal file
|
After Width: | Height: | Size: 381 KiB |
BIN
assets/images/0001-proxmox.png
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
assets/images/0002-proxmox.jpg
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
assets/images/0002-proxmox.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
assets/images/0003-proxmox.jpg
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
assets/images/0003-proxmox.png
Normal file
|
After Width: | Height: | Size: 778 KiB |
26
assets/scripts/copyCode.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// This assumes that you're using Rouge; if not, update the selector
|
||||
// const codeBlocks = document.querySelectorAll('.code-header + .highlighter-rouge');
|
||||
const codeBlocks = document.querySelectorAll('.highlight');
|
||||
const copyCodeButtons = document.querySelectorAll('.copy-code-button');
|
||||
|
||||
codeBlocks.forEach((codeBlock) => {
|
||||
const copyButton = document.createElement('button');
|
||||
copyButton.className = 'copy';
|
||||
copyButton.type = 'button';
|
||||
copyButton.ariaLabel = 'Copy code to clipboard';
|
||||
copyButton.innerText = 'Copy';
|
||||
|
||||
codeBlock.append(copyButton);
|
||||
|
||||
copyButton.addEventListener('click', function () {
|
||||
const code = codeBlock.querySelector('code').innerText.trim();
|
||||
window.navigator.clipboard.writeText(code);
|
||||
|
||||
copyButton.innerText = 'Copied';
|
||||
const fourSeconds = 4000;
|
||||
|
||||
setTimeout(function () {
|
||||
copyButton.innerText = 'Copy';
|
||||
}, fourSeconds);
|
||||
});
|
||||
});
|
||||
5
assets/style.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
---
|
||||
|
||||
@import 'main';
|
||||
|
||||