Skip to content

Commit

Permalink
better template structure
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Apr 28, 2016
1 parent a8efc81 commit e92be7c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"budy" : [
"static/js/*.js",
"templates/*.tpl",
"templates/order/*.tpl"
"templates/order/*.tpl",
"templates/partials/*.tpl"
]
},
install_requires = [
Expand Down
2 changes: 1 addition & 1 deletion src/budy/templates/order/me.html.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html.tpl" %}
{% extends "partials/internal.html.tpl" %}
{% block title %}Orders{% endblock %}
{% block name %}Orders{% endblock %}
{% block content %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,3 @@
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename = 'css/layout.css') }}" />
<script type="text/javascript" src="{{ url_for('static', filename = 'js/main.js') }}"></script>
{% endblock %}
{% block links %}
{% if link == "repos" %}
<a href="{{ url_for('order.me') }}" class="active">orders</a>
{% else %}
<a href="{{ url_for('order.me') }}">orders</a>
{% endif %}
{% endblock %}
1 change: 1 addition & 0 deletions src/budy/templates/partials/external.html.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "partials/base.html.tpl" %}
8 changes: 8 additions & 0 deletions src/budy/templates/partials/internal.html.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "partials/base.html.tpl" %}
{% block links %}
{% if link == "repos" %}
<a href="{{ url_for('order.me') }}" class="active">orders</a>
{% else %}
<a href="{{ url_for('order.me') }}">orders</a>
{% endif %}
{% endblock %}
2 changes: 1 addition & 1 deletion src/budy/templates/signin.html.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html.tpl" %}
{% extends "partials/external.html.tpl" %}
{% block title %}Login{% endblock %}
{% block content %}
<div class="login-panel">
Expand Down

0 comments on commit e92be7c

Please sign in to comment.