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

Fix /contribute link offsets so we can see the headers #13

Closed
nwinter opened this issue Jan 1, 2014 · 1 comment
Closed

Fix /contribute link offsets so we can see the headers #13

nwinter opened this issue Jan 1, 2014 · 1 comment

Comments

@nwinter
Copy link
Contributor

nwinter commented Jan 1, 2014

Often we do things like link eager players to specific character classes in the /contribute page, like this: http://codecombat.com/contribute#artisan

When the page loads, though, the scroll doesn't take account the top bar, so we get the character class title cut off:

screenshot 2014-01-01 11 12 38

It should instead scroll like this:

screenshot 2014-01-01 11 16 40

We're already doing something funky with hashes in app/views/kinds/RootView.coffee:

  afterInsert: ->
    # force the browser to scroll to the hash
    # also messes with the browser history, so perhaps come up with a better solution
    super()
    hash = location.hash
    location.hash = ''
    location.hash = hash

    # TODO: automate tabs to put in hashes and navigate to them here

I wonder if this should be fixed on the HTML/CSS side, or if we should just add more code in afterInsert to take the top bar height into account.

@TomSteinbrecher
Copy link
Contributor

I'll investigate making a HTML/CSS fix to this when I look in to the other issue on the contributor page. The better fix for this is most certainly on the HTML/CSS side because applying a fix in script would be more of a bandage than an actual fix.

@nwinter nwinter closed this as completed in 3a448d5 Jan 5, 2014
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

No branches or pull requests

2 participants