rstudio / quillt

A pkgdown template for the R Markdown Ecosystem
https://pkgs.rstudio.com/quillt
Other
27 stars 8 forks source link

border on hover does not work as expected when a source repo link is added. #12

Closed cderv closed 3 years ago

cderv commented 3 years ago

I may have miss something in #6

apreshill commented 3 years ago

Also a pkgdown issue: https://github.com/r-lib/pkgdown/issues/1519

Does dev pkgdown fix the issue? https://github.com/r-lib/pkgdown/pull/1521

cderv commented 3 years ago

Dev pkgdown fix the issue of not having the hover, but maybe it creates another one. See current https://pkgs.rstudio.com/bookdown/articles/articles/examples.html

cderv commented 3 years ago

The test I added in quillt seems to correctly pass so we get the correct structure. But pkgdown rewrites it... so looking into this.

apreshill commented 3 years ago

Oh yikes!

cderv commented 3 years ago

No it isn't pkgdown - the HTML source is ok - it seems th tweak I made are not correct 😞 Still looking. Maybe I need to tweak the hover thing. Can you point me where is the piece of code doing this in the template ?

apreshill commented 3 years ago

This is just CSS: https://github.com/apreshill/quillt/blob/2c58047aa3ef987c0659d06bd2244927c8d3aa4d/inst/pkgdown/assets/rmd.css#L415-L419

apreshill commented 3 years ago

Looks like the issue is that thumbnail as a class is being applied to the <div class="caption"> elements

apreshill commented 3 years ago

From distill:

<a class="thumbnail" title="Piping Hot Data" href="https://www.pipinghotdata.com/">
  <img src="images/piping-hot-data.png">
  <div class="caption">Piping Hot Data</div>
</a>
cderv commented 3 years ago

Yes this is the issue. But I don't yet know why. I will check the HTML I am writing for source, I must have done a mistake there.

cderv commented 3 years ago

Oh I know. Rookie mistake. I made the source a link inside a link 🤕 not good.

cderv commented 3 years ago

Closed by #13