Skip to content

Commit

Permalink
include jquery mobile and serve node_modules folder
Browse files Browse the repository at this point in the history
  • Loading branch information
hellofeiwu committed Jul 3, 2016
1 parent cb81164 commit c07edd7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
</head>
<body>
<script type="text/javascript" src="build/bundle.js" charset="utf-8"></script>
<script type="text/javascript" src="node_modules/jquery-mobile/dist/jquery.mobile.min.js" charset="utf-8"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions client/views/home.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="container center home">
<div class="options-home">
<a class="btn btn-primary" href="#truth">Truth</a>
<a class="btn btn-primary" href="#truth" data-ajax='false'>Truth</a>
or
<a class="btn btn-default" href="#dare">Dare</a>
<a class="btn btn-default" href="#dare" data-ajax='false'>Dare</a>
</div>
</div>

Expand Down
9 changes: 7 additions & 2 deletions client/views/truth-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ TruthView.prototype.render = function () {
};

getQuestion();

$truthTmpl.find('#change').click(function() {
$truthTmpl.find('.card-container').on('swipeleft', function () {
$truthTmpl.find('.card').addClass('move-left');
getQuestion();
});

// $truthTmpl.find('#change').click(function() {
// $truthTmpl.find('.card').addClass('move-left');
// getQuestion();
// });

$truthTmpl.find("#submit").click(function() {
console.log('button works ' + $truthTmpl.find("#new-question").val());
var url = 'api/truth';
Expand Down
1 change: 1 addition & 0 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ app.post('/api/login', function (req, res) {
});

app.use(express.static('../client'));
app.use('/node_modules', express.static('../node_modules'))

app.listen(process.env.PORT || 3000, process.env.IP || 'localhost', function () {
console.log("I'm listening on port " + process.env.PORT);
Expand Down

0 comments on commit c07edd7

Please sign in to comment.