uv/docs
eth3lbert 89947681d1
Improve copy of console command examples (#5397)
## Summary

This PR improves the copy of the console command example by:

- Preventing the selection of generic prompts and generic output
- Lazily setting copy content by leveraging intersection observer

Most of the changes are inspired by
https://github.com/opensafely/documentation/pull/1461

Some other useful refs:
- https://github.com/squidfunk/mkdocs-material/issues/3647
-
https://mkdocstrings.github.io/recipes/#prevent-selection-of-prompts-and-output-in-python-code-blocks

Resolves #5355

## Test Plan

- 
  ``` shell-session
  mkdocs serve -f mkdocs.public.yml
  ``` 
- Navigate to http://localhost:8000/uv/first-steps/#viewing-the-version
- Try clicking the copy button
- Try copying by selecting the content

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-07-31 14:52:02 +00:00
..
.overrides/partials/integrations/analytics Migrate from MdBook to MkDocs (#5062) 2024-07-15 22:22:07 +00:00
assets Use logo in documentation (#5421) 2024-07-24 15:45:10 -05:00
concepts Improvements to the Python version concepts documentation (#5638) 2024-07-31 08:40:50 -05:00
configuration Deprecate the --isolated flag (#5466) 2024-07-30 22:40:38 +00:00
guides Improve the project guide (#5626) 2024-07-30 18:26:23 -05:00
js Improve copy of console command examples (#5397) 2024-07-31 14:52:02 +00:00
pip Wrap documentation at 100 characters (#5635) 2024-07-30 22:17:58 +00:00
stylesheets Improve copy of console command examples (#5397) 2024-07-31 14:52:02 +00:00
.gitignore Add structured documentation (#4426) 2024-06-26 11:28:42 -05:00
features.md Wrap documentation at 100 characters (#5635) 2024-07-30 22:17:58 +00:00
first-steps.md Wrap documentation at 100 characters (#5635) 2024-07-30 22:17:58 +00:00
index.md Drop badges from docs landing (#5617) 2024-07-31 09:36:01 -05:00
installation.md Wrap documentation at 100 characters (#5635) 2024-07-30 22:17:58 +00:00
platforms.md Wrap documentation at 100 characters (#5635) 2024-07-30 22:17:58 +00:00
requirements-insiders.in Reference the root requirements from the insiders requirements file (#5105) 2024-07-16 09:51:16 -05:00
requirements-insiders.txt Reference the root requirements from the insiders requirements file (#5105) 2024-07-16 09:51:16 -05:00
requirements.in Migrate from MdBook to MkDocs (#5062) 2024-07-15 22:22:07 +00:00
requirements.txt Migrate from MdBook to MkDocs (#5062) 2024-07-15 22:22:07 +00:00
settings.md Replace --python-preference installed with managed (#5637) 2024-07-31 08:40:39 -05:00
versioning.md Add structured documentation (#4426) 2024-06-26 11:28:42 -05:00