aboutsummaryrefslogtreecommitdiff
path: root/budget
diff options
context:
space:
mode:
Diffstat (limited to 'budget')
-rw-r--r--budget/static/css/main.css7
-rw-r--r--budget/templates/home.html8
-rw-r--r--budget/templates/layout.html72
-rw-r--r--budget/templates/sidebar_table_layout.html4
4 files changed, 50 insertions, 41 deletions
diff --git a/budget/static/css/main.css b/budget/static/css/main.css
index 11963d2..54a0008 100644
--- a/budget/static/css/main.css
+++ b/budget/static/css/main.css
@@ -74,7 +74,12 @@ body {
background-repeat: no-repeat;
height: 100%;
color: black;
- position: fixed;
+}
+
+@media (min-width: 768px) {
+ .sidebar {
+ position: fixed;
+ }
}
#add-member-form { padding-top: 1em; padding-bottom: 1em; }
diff --git a/budget/templates/home.html b/budget/templates/home.html
index c7a9d1e..9bfe467 100644
--- a/budget/templates/home.html
+++ b/budget/templates/home.html
@@ -3,19 +3,19 @@
{% block body %}
<header id="header" class="row">
- <div class="col-5 offset-md-2">
+ <div class="col-xs-12 col-sm-5 offset-md-2">
<h2>{{ _("Manage your shared <br>expenses, easily") }}</h2>
{% if is_demo_project_activated %}
<a href="{{ url_for(".demo") }}" class="tryout btn">{{ _("Try out the demo") }}</a>
{% endif %}
</div>
- <div class="col-4">
+ <div class="col-xs-12 col-sm-4">
<p class="additional-content">{{ _("You're sharing a house?") }}<br /> {{ _("Going on holidays with friends?") }}<br /> {{ _("Simply sharing money with others?") }} <br /><strong>{{ _("We can help!") }}</strong></p>
</div>
</header>
<main class="row home">
- <div class="col-4 offset-md-2">
+ <div class="col-xs-12 col-sm-5 col-md-4 offset-md-2">
<form id="authentication-form" class="form-horizontal" action="{{ url_for(".authenticate") }}" method="post">
<fieldset class="form-group">
<legend>{{ _("Log to an existing project") }}...</legend>
@@ -27,7 +27,7 @@
</div>
</form>
</div>
- <div class="col-3 offset-md-1">
+ <div class="col-xs-12 col-sm-5 col-md-3 offset-sm-1">
{% if is_admin_mode_enabled %}
<a href="{{ url_for(".create_project") }}">...{{ _("or create a new one") }}</a>
{% else %}
diff --git a/budget/templates/layout.html b/budget/templates/layout.html
index 979f994..3f2c35d 100644
--- a/budget/templates/layout.html
+++ b/budget/templates/layout.html
@@ -34,41 +34,45 @@
</script>
</head>
<body>
-
- <nav class="navbar navbar-toggleable-md navbar fixed-top navbar-inverse bg-inverse">
- <h1 class="col-2"><a class="navbar-brand" href="{{ url_for(".home") }}">#! money?</a></h1>
- <ul class="navbar-nav col-5 offset-md-1">
- {% if g.project %}
- {% block navbar %}
- <li class="nav-item{% if current_view == 'list_bills' %} active{% endif %}"><a class="nav-link" href="{{ url_for(".list_bills") }}">{{ _("Bills") }}</a></li>
- <li class="nav-item{% if current_view == 'settle_bill' %} active{% endif %}"><a class="nav-link" href="{{ url_for(".settle_bill") }}">{{ _("Settle") }}</a></li>
- {% endblock %}
- {% endif %}
- </ul>
- <ul class="navbar-nav secondary-nav col-4">
- {% if g.project %}
- <li class="nav-item dropdown">
- <a href="#" class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><strong>{{ g.project.name }}</strong> {{ _("options") }} <b class="caret"></b></a>
- <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
- <li><a class="dropdown-item" href="{{ url_for(".edit_project") }}">{{ _("Project settings") }}</a></li>
- <li class="dropdown-divider"></li>
- {% for id, name in session['projects'] %}
- {% if id != g.project.id %}
- <li><a class="dropdown-item" href="{{ url_for(".list_bills", project_id=id) }}">{{ _("switch to") }} {{ name }}</a></li>
- {% endif %}
- {% endfor %}
- <li><a class="dropdown-item" href="{{ url_for(".create_project") }}">{{ _("Start a new project") }}</a></li>
- <li class="dropdown-divider"></li>
- <li><a class="dropdown-item" href="{{ url_for(".exit") }}">{{ _("Logout") }}</a></li>
- </ul>
- </li>
- {% endif %}
- <li class="nav-item{% if g.lang == "fr" %} active{% endif %}"><a class="nav-link" href="{{ url_for(".change_lang", lang="fr") }}">fr</a></li>
- <li class="nav-item{% if g.lang == "en" %} active{% endif %}"><a class="nav-link" href="{{ url_for(".change_lang", lang="en") }}">en</a></li>
+ <div class="container">
+ <nav class="navbar navbar-toggleable-sm fixed-top navbar-inverse bg-inverse">
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
+ <span class="navbar-toggler-icon"></span>
+ </button>
+ <div class="collapse navbar-collapse" id="navbarToggler">
+ <h1><a class="navbar-brand" href="{{ url_for(".home") }}">#! money?</a></h1>
+ <ul class="navbar-nav ml-auto mr-auto">
+ {% if g.project %}
+ {% block navbar %}
+ <li class="nav-item{% if current_view == 'list_bills' %} active{% endif %}"><a class="nav-link" href="{{ url_for(".list_bills") }}">{{ _("Bills") }}</a></li>
+ <li class="nav-item{% if current_view == 'settle_bill' %} active{% endif %}"><a class="nav-link" href="{{ url_for(".settle_bill") }}">{{ _("Settle") }}</a></li>
+ {% endblock %}
+ {% endif %}
+ </ul>
+ <ul class="navbar-nav secondary-nav">
+ {% if g.project %}
+ <li class="nav-item dropdown">
+ <a href="#" class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><strong>{{ g.project.name }}</strong> {{ _("options") }} <b class="caret"></b></a>
+ <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
+ <li><a class="dropdown-item" href="{{ url_for(".edit_project") }}">{{ _("Project settings") }}</a></li>
+ <li class="dropdown-divider"></li>
+ {% for id, name in session['projects'] %}
+ {% if id != g.project.id %}
+ <li><a class="dropdown-item" href="{{ url_for(".list_bills", project_id=id) }}">{{ _("switch to") }} {{ name }}</a></li>
+ {% endif %}
+ {% endfor %}
+ <li><a class="dropdown-item" href="{{ url_for(".create_project") }}">{{ _("Start a new project") }}</a></li>
+ <li class="dropdown-divider"></li>
+ <li><a class="dropdown-item" href="{{ url_for(".exit") }}">{{ _("Logout") }}</a></li>
</ul>
-
-
-</nav>
+ </li>
+ {% endif %}
+ <li class="nav-item{% if g.lang == "fr" %} active{% endif %}"><a class="nav-link" href="{{ url_for(".change_lang", lang="fr") }}">fr</a></li>
+ <li class="nav-item{% if g.lang == "en" %} active{% endif %}"><a class="nav-link" href="{{ url_for(".change_lang", lang="en") }}">en</a></li>
+ </ul>
+ </div>
+ </nav>
+ </div>
<div class="container-fluid">
{% block body %}
diff --git a/budget/templates/sidebar_table_layout.html b/budget/templates/sidebar_table_layout.html
index 7c831f4..239acb3 100644
--- a/budget/templates/sidebar_table_layout.html
+++ b/budget/templates/sidebar_table_layout.html
@@ -2,11 +2,11 @@
{% block body %}
<div class="row" style="height: 100%">
-<aside id="sidebar" class="sidebar col-3 " style="height: 100%">
+<aside id="sidebar" class="sidebar col-xs-12 col-md-3 " style="height: 100%">
{% block sidebar %}{% endblock %}
</aside>
-<main class="offset-md-3 col-9">
+<main class="offset-md-3 col-xs-12 col-md-9">
{% block content %}{% endblock %}
</main>