Skip to content

Conversation

@black-dragon74
Copy link
Member

[QOL] Hide 'Copy To Clipboard' button on non-code blocks
Site wide there are multiple code blocks that do not contain
any code in them. But still a Copy code to clipboard button
is shown, this patch addresses this issue. It is a QOL improvement
that makes distinguishing code blocks visually and functionally easier.

To use this new feature, we need to start our code block like:

```{ .language_name .no-copy }

Where language_name is something that can vary (console in our case mostly).
The .no-copy attribute is what disables the function on that particular block.

This is a first of many patches that'll follow for subsequent sections site-wide
which moves OLD md syntax to NEW one and also address any other semantics that come
into notice.

Regards

Sitewide there are multiple code blocks that do not contain
any code in them. But still a `Copy code to clipboard` button
is shown, this patch addresses this issue. It is a QOL improvement
that makes distinguishing code blocks visually easier.

To use this new feature, we need to start our code block like:
```{ .language_name .no-copy }
    ...
    ...
    ...
```

Where language_name is something that can vary (console in our case mostly).
The .no-copy attribute is what disables the function on that particular block.

Signed-off-by: black-dragon74 <niryadav@redhat.com>
This is a first of many patches that'll follow for subsequent sections sitewide
which moves OLD md syntax to NEW one and also address any other semantics that come
into notice.

Signed-off-by: black-dragon74 <niryadav@redhat.com>
@black-dragon74
Copy link
Member Author

CC: @aravindavk @kshithijiyer @Shwetha-Acharya

Regards

@black-dragon74
Copy link
Member Author

You can see how the copy code to clipboard is not visible in the last code block below:

Screen Shot 2022-05-13 at 1 59 21 PM

Regards

Signed-off-by: black-dragon74 <niryadav@redhat.com>
Signed-off-by: black-dragon74 <niryadav@redhat.com>
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 this pull request may close these issues.

2 participants