Update 3 files

- /_config.yml
- /assets/css/style.scss
- /assets/js/main.js
This commit is contained in:
mayx 2025-04-17 06:12:24 +00:00
parent 9f2bed804e
commit 9d255a0a6f
3 changed files with 22 additions and 43 deletions

View File

@ -7,13 +7,6 @@ description: Mayx's Home Page
timezone: Asia/Shanghai
excerpt_separator: <!--more-->
paginate: 7
kramdown:
syntax_highlighter_opts:
span:
line_numbers: false
block:
line_numbers: true
start_line: 1
plugins:
- jekyll-sitemap
- jekyll-feed

View File

@ -100,18 +100,3 @@ div.highlight button:focus,
div.highlight button:hover {
opacity: 1
}
table.rouge-table {
margin: 0;
}
td.rouge-gutter,
td.rouge-code {
padding: 0;
border-bottom: none;
}
pre.lineno {
padding: 0 10px 0 0;
border: none;
}

View File

@ -76,7 +76,7 @@ $(function () {
highlightTextNodes(this);
});
});
$(function () {
var codeBlocks = document.querySelectorAll('div.highlight');
codeBlocks.forEach(function (codeBlock) {
@ -88,7 +88,7 @@ codeBlocks.forEach(function (codeBlock) {
codeBlock.append(copyButton);
copyButton.addEventListener('click', function () {
var code = codeBlock.querySelector('.rouge-code pre').innerText.trim();
var code = codeBlock.querySelector('pre code').innerText.trim();
window.navigator.clipboard.writeText(code)
.then(() => {
copyButton.innerText = '✅';
@ -103,6 +103,7 @@ codeBlocks.forEach(function (codeBlock) {
}, 1500);
});
});
});
today = new Date();
timeold = (today.getTime() - lastUpdated.getTime());