Skip to content

Commit

Permalink
[systemjs-on-blog] Refactor blog page, include SystemJS
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Artois committed Dec 13, 2015
1 parent 6384114 commit 7e7d1f7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
14 changes: 14 additions & 0 deletions public/js/blog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {OffCanvasMenu} from 'lib/OffCanvasMenu.js';
import {GalleryHandler} from 'lib/GalleryHandler.js';

new OffCanvasMenu({
name: 'sidr-main',
source: '.dima-navbar nav'
})
.init('.dima-btn-nav');

new GalleryHandler({
selector: '.gallery',
root: window
})
.init(window.location.hash);
6 changes: 3 additions & 3 deletions public/js/portfolio.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//import {OffCanvasMenu} from 'lib/OffCanvasMenu.js';
import {OffCanvasMenu} from 'lib/OffCanvasMenu.js';
import {GalleryHandler} from 'lib/GalleryHandler.js';

/*new OffCanvasMenu({
new OffCanvasMenu({
name: 'sidr-main',
source: '.dima-navbar nav'
})
.init('.dima-btn-nav');*/
.init('.dima-btn-nav');

new GalleryHandler({
selector: '.gallery',
Expand Down
7 changes: 4 additions & 3 deletions templates/layouts/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
</footer>
</div>

{% include "../mixins/block-javascript.html" %}
{% block js %}
<script>var application = {options: { slide: {owl: true}}};</script>
{% include "../mixins/block-javascript.html" %}
<script>var application = {options: { slide: {owl: true}}};</script>
<script src="/js/main.js?time=256747936"></script>
{% endblock %}
<script src="/js/main.js?time=256747936"></script>

</body>
</html>
6 changes: 6 additions & 0 deletions templates/views/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ <h3 class="h-callout">Oops</h3>

{% block pinned %}
{% endblock %}

{% block js %}
<script src="/js/vendor/system.js"></script>
<script src="/js/config.js"></script>
<script>System.import('blog.js');</script>
{% endblock %}

0 comments on commit 7e7d1f7

Please sign in to comment.