mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 12:23:45 +08:00
ff96d541e9
This commit extends the original copy-codeblocks initializer, renaming it to codeblock-buttons, and adding another button to make the code block fullscreen in a modal window. The fullscreen code is then run through highlight.js. This commit also moves much of the code out of the initializer and into a reusable CodeblockButtons class, so it can also be used in the fullscreen code modal for the copy + paste button. The fullscreen button will not be shown if there is no scroll overflow in the code block, nor will it be shown on mobile. This commit also changes the fullscreen table button to not show on mobile. This will make long lines of code much easier to read and interact with. This is gated behind the same `show_copy_button_on_codeblocks` site setting. |
||
---|---|---|
.. | ||
admin | ||
components | ||
_index.scss | ||
admin_customize.scss | ||
category-list.scss | ||
compose.scss | ||
discourse.scss | ||
edit-category.scss | ||
group.scss | ||
header.scss | ||
history.scss | ||
latest-topic-list.scss | ||
login.scss | ||
menu-panel.scss | ||
modal.scss | ||
topic-list.scss | ||
topic-post.scss | ||
topic.scss | ||
upload.scss | ||
user.scss |