Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Nov 13, 2012

Conversation

ivanov
Copy link
Member

@ivanov 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

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.
@pelson
Copy link
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...

👍

@dmcdougall
Copy link
Member

I am in favour of the multi-page love.

@mdboom
Copy link
Member

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
use an imagemap for the "fork me on github" ribbon
@dmcdougall dmcdougall merged commit 067e992 into matplotlib:v1.2.x Nov 13, 2012
@mdboom
Copy link
Member

mdboom commented Nov 14, 2012

Pushed to website.

@jenshnielsen
Copy link
Member

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?

@ivanov
Copy link
Member Author

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.

@ivanov
Copy link
Member Author

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?)

@ivanov
Copy link
Member Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants