mirror of
				https://github.com/Mabbs/mabbs.github.io
				synced 2025-10-31 15:41:15 +08:00 
			
		
		
		
	Update 3 files
- /_config.yml - /assets/css/style.scss - /assets/js/main.js
This commit is contained in:
		
							parent
							
								
									9f2bed804e
								
							
						
					
					
						commit
						9d255a0a6f
					
				|  | @ -7,13 +7,6 @@ description: Mayx's Home Page | ||||||
| timezone: Asia/Shanghai | timezone: Asia/Shanghai | ||||||
| excerpt_separator: <!--more--> | excerpt_separator: <!--more--> | ||||||
| paginate: 7 | paginate: 7 | ||||||
| kramdown: |  | ||||||
|   syntax_highlighter_opts: |  | ||||||
|     span: |  | ||||||
|       line_numbers: false |  | ||||||
|     block: |  | ||||||
|       line_numbers: true |  | ||||||
|       start_line: 1 |  | ||||||
| plugins: | plugins: | ||||||
|   - jekyll-sitemap |   - jekyll-sitemap | ||||||
|   - jekyll-feed |   - jekyll-feed | ||||||
|  |  | ||||||
|  | @ -100,18 +100,3 @@ div.highlight button:focus, | ||||||
| div.highlight button:hover { | div.highlight button:hover { | ||||||
|     opacity: 1 |     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; |  | ||||||
| } |  | ||||||
|  | @ -76,10 +76,10 @@ $(function () { | ||||||
|         highlightTextNodes(this); |         highlightTextNodes(this); | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
|  | $(function () { | ||||||
|  |     var codeBlocks = document.querySelectorAll('div.highlight'); | ||||||
| 
 | 
 | ||||||
| var codeBlocks = document.querySelectorAll('div.highlight'); |     codeBlocks.forEach(function (codeBlock) { | ||||||
| 
 |  | ||||||
| codeBlocks.forEach(function (codeBlock) { |  | ||||||
|         var copyButton = document.createElement('button'); |         var copyButton = document.createElement('button'); | ||||||
|         copyButton.className = 'copy'; |         copyButton.className = 'copy'; | ||||||
|         copyButton.type = 'button'; |         copyButton.type = 'button'; | ||||||
|  | @ -88,7 +88,7 @@ codeBlocks.forEach(function (codeBlock) { | ||||||
|         codeBlock.append(copyButton); |         codeBlock.append(copyButton); | ||||||
| 
 | 
 | ||||||
|         copyButton.addEventListener('click', function () { |         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) |             window.navigator.clipboard.writeText(code) | ||||||
|                 .then(() => { |                 .then(() => { | ||||||
|                     copyButton.innerText = '✅'; |                     copyButton.innerText = '✅'; | ||||||
|  | @ -102,6 +102,7 @@ codeBlocks.forEach(function (codeBlock) { | ||||||
|                 copyButton.innerText = '📋'; |                 copyButton.innerText = '📋'; | ||||||
|             }, 1500); |             }, 1500); | ||||||
|         }); |         }); | ||||||
|  |     }); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| today = new Date(); | today = new Date(); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 mayx
						mayx