Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Removing ScrollTo on table of contents, it goes against everything we…
Browse files Browse the repository at this point in the history
… are preaching about smooth jank-free performance
  • Loading branch information
PaulKinlan committed Mar 14, 2013
1 parent 8a2b333 commit 7a9beac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion content/profiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<!--
<link type="text/css" rel="stylesheet" href="/static/css/profiles{% if prod %}.min{% endif %}.css"/>
-->
<!--<script defer src="/static/js/jquery.scrollTo-min.js"></script>-->
<script src="/static/js/profiles{% if prod %}.min{% endif %}.js"></script>
{% endblock %}
{% block onload %}scrollToProfile();{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion customtags/templatetags/templatefilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def render(self, context):
else:
output += "</li>"
level = entry['level']
output += "<li><a href='#%s' onclick='$.scrollTo(\"#%s\", 800, {offset: {top: -35}})'>%s</a>" % (entry['id'], entry['id'], entry.get('text', ''))
output += "<li><a href='#%s'>%s</a>" % (entry['id'], entry.get('text', ''))

output += "</li></ul>" * level
return output
Expand Down

4 comments on commit 7a9beac

@ebidel
Copy link
Contributor

@ebidel ebidel commented on 7a9beac Mar 15, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you missed removed the lib in the main template? Can you do a grep for jquery.scrollTo-min.js?

@cwilso
Copy link
Contributor

@cwilso cwilso commented on 7a9beac Mar 15, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and done: b66a074.

@PaulKinlan
Copy link
Member Author

@PaulKinlan PaulKinlan commented on 7a9beac Mar 15, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ebidel
Copy link
Contributor

@ebidel ebidel commented on 7a9beac Mar 15, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in app.js. IIRC, the feature page TOCs also do the same scroll effect. If it's janky, we should remove it everywhere.

Please sign in to comment.