Skip to content

Commit

Permalink
Merge branch 'master' of bitbucket.org:jrand0m/flashcrowdapp
Browse files Browse the repository at this point in the history
  • Loading branch information
and3rson committed Jun 3, 2016
2 parents d13d3be + e109a7b commit d698c7f
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 12 deletions.
8 changes: 5 additions & 3 deletions etc/app/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import jQuery from 'lib/jquery'
import $ from 'lib/jquery'

import Layout from 'templates/layout.jade'

jQuery(() => {
$(() => {
"use strict";

jQuery.parseHTML(Layout({})).appendTo('body');
var data = JSON.parse($('#profile').text());

$($.parseHTML(Layout(data))).appendTo('body');
});
26 changes: 26 additions & 0 deletions etc/app/sass/index.sass
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
@import "../bower/bootstrap-sass/assets/stylesheets/bootstrap"

header
position: fixed
top: 0
left: 0
right: 0
height: 100px
background: transparentize(lime, .9)

img
border-radius: 25%
overflow: hidden
background: #ddd

footer
position: fixed
bottom: 0
left: 0
right: 0
height: 50px

background: transparentize(red, .9)

#page-cnt
overflow: scroll
margin-top: 100px
margin-bottom: 50px
background: #fafafa
height: calc(100vh - 150px)
8 changes: 4 additions & 4 deletions etc/app/templates/layout.jade
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
header.header.container-fluid
.row
.col-xs-3
img(width=100 height=100 src="about:_blank")
.col-xs-9
| John Doe
.col-xs-6
img(width=100 height=100 src=avatar)
.col-xs-6
| #{username} (#{points})

#page-cnt.container-fluid

Expand Down
1 change: 1 addition & 0 deletions etc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"devDependencies": {
"babel-core": "^6.3.13",
"babel-loader": "^6.2.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2015": "^6.3.13",
"bower": "^1.7.9",
"cpx": "^1.3.1",
Expand Down
2 changes: 1 addition & 1 deletion etc/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
test: /\.js$/,
exclude: /(node_modules|bower)/,
loader: "babel?presets[]=es2015"
loader: "babel?presets[]=es2015&plugins[]=babel-plugin-transform-decorators-legacy"
}
]
},
Expand Down
8 changes: 5 additions & 3 deletions flashcrowd/core/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Flashcrowd index</title>
<link href="/static/index.css" rel="stylesheet" type="text/css" >
<script src="/static/jquery.min.js"></script>
<script src="/static/app.compiled.js"></script>
</head>
<body>
<h1>Hello world</h1>
<script type="application/json">
<script type="application/json" id="profile">
{%autoescape off%}
{{bootstrap_json}}
{%endautoescape%}
</script>

</body>
</html>

2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
import os
import sys

Expand Down

0 comments on commit d698c7f

Please sign in to comment.