weflock/partials/floating-header.hbs
Kevin Ansfield 978ffe0eb6
Concatenated all JS into a single file (#624)
no issue

- moved large inline JS from templates into separate JS files
  - floating header
  - gallery card support
- use `gulp-concat` to concatenate all JS files into a single `built/casper.js` file
- reduces external JS file requests from 3 (jquery, infinite-scroll.js, jquery.fitvids.js) down to 2 (jquery, casper.js) and reduces page size by removing repeated inline code
2019-10-20 15:55:06 +02:00

36 lines
1.4 KiB
Handlebars

<div class="floating-header">
<div class="floating-header-logo">
<a href="{{@site.url}}">
{{#if @site.icon}}
<img src="{{img_url @site.icon size="xxs"}}" alt="{{@site.title}} icon" />
{{/if}}
<span>{{@site.title}}</span>
</a>
</div>
<span class="floating-header-divider">&mdash;</span>
<div class="floating-header-title">{{title}}</div>
<div class="floating-header-share">
<div class="floating-header-share-label">Share this {{> "icons/point"}}</div>
<a class="floating-header-share-tw" href="https://twitter.com/share?text={{encode title}}&amp;url={{url absolute="true"}}"
onclick="window.open(this.href, 'share-twitter', 'width=550,height=235');return false;">
{{> "icons/twitter"}}
</a>
<a class="floating-header-share-fb" href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}"
onclick="window.open(this.href, 'share-facebook','width=580,height=296');return false;">
{{> "icons/facebook"}}
</a>
</div>
<progress id="reading-progress" class="progress" value="0">
<div class="progress-container">
<span class="progress-bar"></span>
</div>
</progress>
</div>
{{#contentFor "scripts"}}
<script>
$(document).ready(function () {
Casper.floatingHeader();
})
</script>
{{/contentFor}}