From de1b82692863d3b3fd351b5a975132cbf82f3aaf Mon Sep 17 00:00:00 2001 From: spitkov Date: Mon, 16 Sep 2024 14:21:48 +0200 Subject: [PATCH] pastebin line offset fix --- templates/pastebin.html | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/templates/pastebin.html b/templates/pastebin.html index 7139668..21a7e53 100644 --- a/templates/pastebin.html +++ b/templates/pastebin.html @@ -43,7 +43,7 @@ padding: 20px; } - h1 { + h1, h2 { margin-bottom: 20px; } @@ -72,6 +72,31 @@ border-radius: 4px; padding: 1em; overflow: auto; + position: relative; + } + + .highlight pre { + color: var(--text-color); + white-space: pre; + word-wrap: normal; + overflow-x: auto; + margin: 0; + padding: 0; + } + + .highlight .linenos { + color: #999; + text-align: right; + padding-right: 10px; + border-right: 1px solid var(--highlight-border); + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + .highlight .code { + padding-left: 10px; } #theme-toggle { @@ -89,12 +114,6 @@ text-decoration: underline; } - .highlight pre { - color: var(--text-color); - white-space: pre-wrap; - word-wrap: break-word; - } - .btn-container { display: flex; gap: 10px;