Skip to content

Commit

Permalink
Working on
Browse files Browse the repository at this point in the history
  • Loading branch information
n.lyubchich committed Jul 31, 2015
1 parent fe71b0b commit 0fe3181
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"react": "~0.13.3",
"react-mini-router": "~1.1.7",
"react-select": "~0.5.5",
"classnames": "~2.1.3"
"classnames": "~2.1.3",
"react-responsive-carousel": "~0.1.4",
"domready": "~1.0.8"
},
"stylus": {
"includes": [
Expand Down
27 changes: 27 additions & 0 deletions project/static/src/js/gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
require('domready')(function () {
var React = require('react');
var ImageGallery = require('react-responsive-carousel').ImageGallery;

var galleryImages = [
{url: "http://lorempixel.com/700/250/sports/1"},
{url: "http://lorempixel.com/700/250/sports/2"},
{url: "http://lorempixel.com/700/250/sports/3"},
{url: "http://lorempixel.com/700/250/sports/4"},
{url: "http://lorempixel.com/700/250/sports/5"},
{url: "http://lorempixel.com/700/250/sports/6"},
{url: "http://lorempixel.com/700/250/sports/7"}
];

var DemoGallery = React.createClass({
displayName: "DemoGallery",
render() {
return (
React.createElement("div", {className: "demo-image-gallery"},
React.createElement(ImageGallery, {images: galleryImages})
)
);
}
});
React.render(React.createElement(DemoGallery, null),
document.querySelector('#links'));
});
1 change: 0 additions & 1 deletion project/static/src/js/mainpage.js

This file was deleted.

2 changes: 1 addition & 1 deletion project/templates/pages/mainpage.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% from "pages/macros.html" import list_blocks %}
{% block meta %}
<script src="{{ url_for('static', filename="dist/mainpage.bundle.js") }}" type="text/javascript"></script>
<script src="{{ url_for('static', filename="dist/gallery.bundle.js") }}" type="text/javascript"></script>
{% endblock %}


Expand Down

0 comments on commit 0fe3181

Please sign in to comment.