mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
This commit improves the copy codeblock button and playground button in the codeblocks to improve their visibility, particularly when on top of some code. Previously, the text under these buttons was difficult to select, as the buttons would block the selection. This commit now hides these buttons when a user clicks on any part of the codeblock, allowing to view the code without any distractions, as well as, allowing the user to select any part of the code.
12 lines
538 B
Handlebars
12 lines
538 B
Handlebars
<div class="code-buttons-container">
|
|
<span class="copy_codeblock copy-btn copy-btn-square" data-tippy-content="{{t 'Copy code' }}" aria-label="{{t 'Copy code' }}" role="button">
|
|
<i class="zulip-icon zulip-icon-copy" aria-hidden="true"></i>
|
|
</span>
|
|
{{~#if show_playground_button~}}
|
|
{{! Display the "view code in playground" option for code blocks}}
|
|
<span class="code_external_link">
|
|
<i class="zulip-icon zulip-icon-external-link playground-links-popover-container"></i>
|
|
</span>
|
|
{{~/if~}}
|
|
</div>
|