mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-02 19:36:12 +01:00 
			
		
		
		
	style/code blocks/copy button: tweak appearance
This commit is contained in:
		@@ -35,7 +35,7 @@ export async function formatCodeBlocks($container: JQuery<HTMLElement>) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export function applyCopyToClipboardButton($codeBlock: JQuery<HTMLElement>) {
 | 
					export function applyCopyToClipboardButton($codeBlock: JQuery<HTMLElement>) {
 | 
				
			||||||
    const $copyButton = $("<button>")
 | 
					    const $copyButton = $("<button>")
 | 
				
			||||||
        .addClass("bx component btn tn-tool-button bx-copy copy-button")
 | 
					        .addClass("bx component icon-action tn-tool-button bx-copy copy-button")
 | 
				
			||||||
        .attr("title", t("code_block.copy_title"))
 | 
					        .attr("title", t("code_block.copy_title"))
 | 
				
			||||||
        .on("click", () => copyText($codeBlock.text()));
 | 
					        .on("click", () => copyText($codeBlock.text()));
 | 
				
			||||||
    $codeBlock.parent().append($copyButton);
 | 
					    $codeBlock.parent().append($copyButton);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -535,9 +535,8 @@ pre {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
pre > button.copy-button {
 | 
					pre > button.copy-button {
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    top: 1em;
 | 
					    top: .35em;
 | 
				
			||||||
    right: 1em;
 | 
					    right: .35em;
 | 
				
			||||||
    opacity: 0.8;    
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pre > button.copy-button:hover {
 | 
					pre > button.copy-button:hover {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user