Skip to content

Commit

Permalink
Remove script on static website. Reduce cards size. Add url to README>
Browse files Browse the repository at this point in the history
  • Loading branch information
BrOrlandi committed Aug 15, 2017
1 parent f035926 commit 1d141a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# GitTrainingWall
A project for training participants to collaborate using GitHub.

## See the Wall

[http://brorlandi.github.io/GitTrainingWall/](http://brorlandi.github.io/GitTrainingWall/)

## Running

pip install Flask
Expand Down
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

env = Environment(loader=FileSystemLoader('templates'))
template = env.get_template('index.html')
output_from_parsed_template = template.render(users=list_users()).encode('utf-8')
output_from_parsed_template = template.render(users=list_users(),script=False).encode('utf-8')

# print output_from_parsed_template

Expand Down
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def list_users():

@app.route('/')
def index():
return render_template('index.html', users=list_users())
return render_template('index.html', users=list_users(), script=True)


@app.route('/users')
Expand Down
6 changes: 3 additions & 3 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h5 class="header col s12 light">Galera do Curso de Git</h5>

<div class="row">
{% for user in users %}
<div class="col s12 m6 l3">
<div class="col s12 m4 l2">
{% include 'users/'+user %}
</div>
{% endfor %}
Expand All @@ -50,8 +50,8 @@ <h5 class="header col s12 light">Galera do Curso de Git</h5>
<!-- Scripts-->
<script src="static/bower/jquery/dist/jquery.min.js"></script>
<script src="static/bower/materialize/dist/js/materialize.min.js"></script>
{% if script %}
<script >

var users = -1;

function doPoll(){
Expand All @@ -68,6 +68,6 @@ <h5 class="header col s12 light">Galera do Curso de Git</h5>
doPoll();
});
</script>

{% endif %}
</body>
</html>

0 comments on commit 1d141a1

Please sign in to comment.