use an imagemap for the "fork me on github" ribbon #1474

Merged
merged 1 commit into from Nov 13, 2012

Conversation

Projects
None yet
5 participants
Member

ivanov commented Nov 10, 2012

Right now, the ribbon on the front page blocks out the possiblity of clicking
on the "Index" link, because the "Fork me on Github" link is on top of it.

I've rectified this by providing an imagemap, which only makes part of the
image clickable as a link. I've verified that it works under Firefox, Chromium,
and w3m.

I have also moved the ribbon from being only on the front page, to
appearing on all pages, since that has the potential of inviting
contributors more actively, as most people won't spend much time on the
index page, once they are actually using matplotlib, whereas they will
be peaking at the gallery, as well as the api docs, etc.

I got the numbers for the ribbon from here: susestudio/studio-help#20, but then
adjusted them so that the full upper left triangle would be clickable, and not
just the ribbon.

this is a version of #1468 against v1.2.x

use an imagemap for the "fork me on github" ribbon
Right now, the ribbon on the front page blocks out the possiblity of clicking
on the "Index" link, because the "Fork me on Github" link is on top of it.

I've rectified this by providing an imagemap, which only makes part of the
image clickable as a link. I've verified that it works under Firefox, Chromium,
and w3m.

I have also moved the ribbon from being only on the front page, to
appearing on all pages, since that has the potential of inviting
contributors more actively, as most people won't spend much time on the
index page, once they are actually using matplotlib, whereas they will
be peaking at the gallery, as well as the api docs, etc.

I got the numbers for the ribbon from here: susestudio/studio-help#20, but then
adjusted them so that the full upper left triangle would be clickable, and not
just the ribbon.
Member

pelson commented Nov 10, 2012

Just to make it completely explicit, this change puts the github banner on all pages, not just the index page.
In general, I have no problems with that. @mdboom might like to make the final call on it though...

👍

Member

dmcdougall commented Nov 10, 2012

I am in favour of the multi-page love.

Owner

mdboom commented Nov 12, 2012

I'm cool with this being on every page.

dmcdougall added a commit that referenced this pull request Nov 13, 2012

Merge pull request #1474 from ivanov/gh-ribbon-imagemap-1.2
use an imagemap for the "fork me on github" ribbon

@dmcdougall dmcdougall merged commit 067e992 into matplotlib:v1.2.x Nov 13, 2012

1 check passed

default The Travis build passed
Details
Owner

mdboom commented Nov 14, 2012

Pushed to website.

Owner

jenshnielsen commented Nov 21, 2012

While this change means that only the triangle works as a link to Github in the 1.2.0 documentation I'm still not able to click on the index link neither in Chrome or Firefox. Does it work for everybody else?

Member

ivanov commented Nov 21, 2012

@jenshnielsen mea culpa - I verified that the trangular mapped region was clickable, but somehow missed the fact that the links underneath are still not clickable.

I just spent some time trying to route around this with z-index our trying to get mouse events to be ignored in the other part of the map, but no success so far. The closes thing so far is to make the "fork me" image have z-index:-1 - which makes the "index" clickable, but unfortunately, part of the "fork me" image is then obscured by the body of the page.

Member

ivanov commented Nov 21, 2012

another option would be to change 10px to 80px in this bit:

       <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>

which moves that link out of the way of the "fork me" image - except I can't figure out where in sphinx this bit is generated (sidebar, presumably?)

Member

ivanov commented Nov 22, 2012

ok, I have a solution, PR coming shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment