Skip to content
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

[Feature Request] Copy code button should be optional #1043

Closed
DhruvDh opened this issue Oct 1, 2019 · 2 comments · Fixed by #1050
Closed

[Feature Request] Copy code button should be optional #1043

DhruvDh opened this issue Oct 1, 2019 · 2 comments · Fixed by #1050

Comments

@DhruvDh
Copy link

DhruvDh commented Oct 1, 2019

The copy code button functionality should configurable in book.toml.

Particularly on mobile, the copy button is an eye-sore and is mostly useless, since no one is going to be able to make use of copied code on non-computers. On mobile the button is also relatively large compared to the rest of the content and seems to take away from what is otherwise a very clean and minimal design.

Also, for some books, the code blocks then to contain code that is incomplete or just are meant to show a skeleton of how actual code might look like and there isn't any value in copying that code.

It seems the way the code is written in index.js it is non-trival to get rid of this functionality; getting rid of the code that creates the copy button ends up breaking the functionality of other buttons, such as the sidebar. It could just be that I do not understand the way index.js is structured enough to be able to remove this functionality.

Setting the css for .fa-copy.fa to display: none works, but feels like a dirty hack.

@andymac-2
Copy link
Contributor

@ehuss I'd like to claim this issue

@Dylan-DPC-zz
Copy link

@andymac-2 sure go ahead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants