layer5io / getnighthawk

Putting Nighthawk into the hands of many
https://getnighthawk.dev
Apache License 2.0
127 stars 116 forks source link

added copy button issue 337 omesh-omg #348

Closed omesh-omg closed 8 months ago

omesh-omg commented 11 months ago

Description this PR adds a copy-button icon to code blocks in documentation This PR fixes #337

Notes for Reviewers I have added the button using javascript dom manipulation by searching all the code blocks and adding the button to them in the code and than there is a CSS file for button, and also imported clipboard.min.js for copy function.

https://github.com/layer5io/getnighthawk/assets/64972958/b5590516-8114-4d19-8ba8-4cd831d987b7

Signed commits

netlify[bot] commented 11 months ago

Website preview ready!

Name Link
Latest commit a52df01fd8574cf2c52d2d295e7600a665313edb
Latest deploy log https://app.netlify.com/sites/getnighthawk/deploys/65c8a3de076854000821593a
Deploy Preview https://deploy-preview-348--getnighthawk.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

omesh-omg commented 11 months ago

@Savio629

The scroll issue is also resolved

use of icon instead of text

sandramsc commented 10 months ago

// @vishalvivekm @abhijeetgauravm

omesh-omg commented 10 months ago

@abhijeetgauravm Thanks, 😄 sure if it is required I will do it.

omesh-omg commented 10 months ago

I have added the horizontal scrolling for the code blocks @abhijeetgauravm @Savio629

abhijeetgauravm commented 10 months ago

Hey @omesh-omg Let's discuss this on website call today at 6:30 PM IST / 7 AM Central time. Please add this as an agenda item in the meeting minutes.

omesh-omg commented 10 months ago

Okay

omesh-omg commented 8 months ago

hey @saurabh100ni can u mention the colors to use for the copy button in highlighted state and normal state as You mentioned it during the meeting it's been a long it I will add those colors and push it, Let's finish this

saurabh100ni commented 8 months ago

@omesh-omg I guess @ritiksaxena124 already told you the update refers to the Caribbean and caple green colours. for more details, please refer to this part of the recording to check out the feedback in detail.

omesh-omg commented 8 months ago

Okay thankyou @saurabh100ni

omesh-omg commented 8 months ago

I think everything is okay now all the required changes are resolved

omesh-omg commented 8 months ago
Screenshot 2024-01-29 at 9 58 47 PM

I assume both code blocks are different, but they lack spacing, OR you can merge them into one and add copy button for individual codeblock.

Hi @MUzairS15 I have implemented the required changes adding the margin for better readability

welcome[bot] commented 8 months ago

Thanks for your contribution to the Layer5 community! :tada:

Congrats!