Skip to content

Instantly share code, notes, and snippets.

@iezer
Created January 13, 2017 22:58
Show Gist options
  • Save iezer/b5d4317376155db570bf838afa2059df to your computer and use it in GitHub Desktop.
Save iezer/b5d4317376155db570bf838afa2059df to your computer and use it in GitHub Desktop.
Ember Elsewhere application.hbs
<style>
.header, .footer {
position: fixed;
height: 75px;
width: 100%;
background: orange;
left: 0px;
}
.header { top: 0px; }
.footer { bottom: 0px; }
.scroll-container {
position: fixed;
width: 100%;
top: 75px;
bottom: 75px;
overflow-y: scroll;
/* Required for momentum scrolling in iOS Safari.
also overflow-y has to be 'scroll' and not 'auto'
*/
-webkit-overflow-scrolling: touch;
}
</style>
<div class='header'>
{{#from-elsewhere name="header" as |header|}}
{{#liquid-bind header rules=animationRules as |opts|}}
{{opts.title}}
{{/liquid-bind}}
{{/from-elsewhere}}
</div>
<div class='scroll-container'>
{{outlet}}
</div>
<div class='footer'>
Footer
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment