Skip to content

Commit

Permalink
feat(*) add twitter button
Browse files Browse the repository at this point in the history
Put the script init part at the very end of the html,
so that it will execute after the app's scripts in production
(possible to optimize it more in a near future)
  • Loading branch information
topheman committed Sep 5, 2015
1 parent 7df3b12 commit 09b188c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ <h1>Welcome</h1>
</ul>
</ul>
<p><a href="https://github.com/topheman/vanilla-es6-jspm/wiki" title="About vanilla-es6-jspm on github">Learn more on github ...</a></p>
<p>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://topheman.github.io/vanilla-es6-jspm" data-text="Project boilerplate for #ES6 #Jspm based apps w/ full production workflow #gulp #continuousintegration" data-via="topheman" data-size="large" data-count="none"><span style="display: none;">Tweet</span></a>
</p>
</div>
</div>

Expand Down Expand Up @@ -84,5 +87,7 @@ <h1>Welcome</h1>
<!-- endbuild -->
<!-- inject:analytics -->
<!-- endinject -->
<!-- twitter share button init (added at the very end so that it won't block app scripts in production - @todo possible to optimize a little more ...) -->
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</body>
</html>

0 comments on commit 09b188c

Please sign in to comment.