playframework / playframework.com

The Play Framework website
https://playframework.com/
Apache License 2.0
43 stars 65 forks source link

COPY button in document code section would move along with the scroll bar #579

Open dongxuwang opened 10 months ago

dongxuwang commented 10 months ago

For example, in this page: https://www.playframework.com/documentation/3.0.x/ScalaActions

Right above the section "Controllers are action generators", you might see that COPY button in the right corner of the code box would move if scrollbar move

ScreenRecording2024-01-11at23 26 51-ezgif com-video-to-gif-converter

mkurz commented 9 months ago

@dongxuwang Do you want to provide a pull request to fix that?

dongxuwang commented 9 months ago

@dongxuwang Do you want to provide a pull request to fix that?

Looks like this is not easy.

I could not even find where to fix the css.

In here, it might be related to omnidoc which, I found, is an empty sbt project.

@mkurz can you give some advice about where I can fix?

mkurz commented 8 months ago

@dongxuwang Actually you can run the documention locally by cloning this repository and then

cd documentation
sbt run

The docs can be found here: https://github.com/playframework/playframework/tree/main/documentation and the css is in the styles folder in there.

pckrishnadas88 commented 6 months ago

@mkurz as per the latest main branch I cannot see the copy button when I executed sbt run locally. Is that removed from source code?

Screenshot 2024-04-13 at 6 15 33 PM
mkurz commented 6 months ago

No it's not removed. Maybe in dev mode locally it does not show up because of how things are configured or maybe CSP kicks in and blocks a js file.

pckrishnadas88 commented 6 months ago

@mkurz If you could guide me through how to enable those buttons locally I will try to fix this issue. I'm currently on mac m1.

Thank you

pckrishnadas88 commented 6 months ago

@mkurz added a PR for this kindly verify ~https://github.com/playframework/playframework/pull/12533~ https://github.com/playframework/playframework.com/pull/578