forum-navbar.js 487 B

12345678910111213141516171819
  1. import Ember from 'ember';
  2. export default Ember.Component.extend({
  3. classNames: 'navbar-spacer',
  4. affixNavbar: function() {
  5. // reserve navbar's height in document
  6. this.$().height(this.$().height());
  7. // affix navbar
  8. this.$('.navbar').affix({
  9. offset: {
  10. // workaround around bootstrap affix mishandling
  11. // elements with resting position on top of page
  12. top: this.$('.navbar').offset().top + 1
  13. }
  14. });
  15. }.on('didInsertElement')
  16. });