mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 12:40:40 +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. |
||
---|---|---|
.. | ||
cloud/cloud66 | ||
environments | ||
initializers | ||
locales | ||
application.rb | ||
boot.rb | ||
cdn.yml.sample | ||
database.yml | ||
deploy.rb.sample | ||
dev_defaults.yml | ||
discourse_defaults.conf | ||
discourse.config.sample | ||
discourse.pill.sample | ||
environment.rb | ||
logrotate.conf | ||
multisite.yml.production-sample | ||
nginx.global.conf | ||
nginx.sample.conf | ||
projections.json | ||
puma.rb | ||
routes.rb | ||
sidekiq.yml | ||
site_settings.yml | ||
spring.rb | ||
thin.yml.sample | ||
unicorn_launcher | ||
unicorn_upstart.conf | ||
unicorn.conf.rb |