wookiehangover / derp-octo-dangerzone

#JIFASNIF
2 stars 0 forks source link

doesnt work on github pages #1

Open max-mapper opened 12 years ago

max-mapper commented 12 years ago

after passing pushState: false to both Backbone.history.start and the Router instantiation this still doesn't play nicely with gh-pages. another issue is the absolute hrefs in index.html that assume this will be mounted on the root of a server, whereas gh-pages puts you one level in (e.g. http://foo.github.com/bar/)

anyway when you fix the absolute hrefs and pushState settings it still bugs out and never triggers the pushstate change stuff

max-mapper commented 12 years ago

it works as expected when it is mounted to the root URI though (in a local web server for example), just not on gh-pages

max-mapper commented 12 years ago

this apparently is only a bug in chrome 20, it works as expected in chrome 21 and above

wookiehangover commented 12 years ago

So I'm not sure about the chrome 20 bug, but I pushed some changes to clean things up a bit for non-pushState use (using relative paths for assets, no longer errors when building with grunt).

Also, one piece of weirdness that I noticed with hash routing--when scrolling up (backwards through the deck), pages will improperly "jump" rather than animating smoothly as expected. Apparently whats happening is that when the browser detects a hashchange event and the hash matches and id on the page, it automatically changes the scroll position of the page to "find" the element, which obviously fucks up viewing cat gifs.

To get around this, you can add data-route attributes to each slide, stupid browsers.