-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy to Clipboard Button #234
Copy to Clipboard Button #234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool. It works really well and looks good on both light and dark themes already. Just left a couple of comments. Mostly one, as the style of the schema code blocks got a bit messed up after introducing the relative positioning container
assets/main.js
Outdated
|
||
document.addEventListener("DOMContentLoaded", function () { | ||
const copyBtns = document.querySelectorAll(".copy-btn"); | ||
copyBtns.forEach((btn) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copyBtns.forEach((btn) => { | |
document.querySelectorAll(".copy-btn").forEach((btn) => { |
Pretty minor thing, but I guess we can loop directly here?
@@ -9,5 +9,10 @@ | |||
Schema</span> | |||
</div> | |||
{{ $code := trim .Inner "\n" }} | |||
{{ transform.Highlight ($code) "json" }} | |||
<div class="position-relative"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! |
Fixes #171
2024-05-20.22-34-58.mp4