Self hosted FLOSS fitness/workout, nutrition and weight tracker
Redesign main top menu, make language selection a dropdown
Roland Geider526a25fd63f7
diff --git a/wger/core/static/css/bootstrap-custom.css b/wger/core/static/css/bootstrap-custom.cssindex 33f3d60df..3d9bb0753 100644--- a/wger/core/static/css/bootstrap-custom.css+++ b/wger/core/static/css/bootstrap-custom.css@@ -33,37 +33,25 @@ body {background-color: #204A87;}-.navbar {- margin-bottom: 0px;-}#main-content{min-height: 40em;}-#nav, .navbar-inverse .navbar-inner {- background-color: #1b1b1b;- background-image: -moz-linear-gradient(top, #222222, #111111);- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));- background-image: -webkit-linear-gradient(top, #222222, #111111);- background-image: -o-linear-gradient(top, #222222, #111111);- background-image: linear-gradient(to bottom, #222222, #111111);- background-repeat: repeat-x;- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);- border-color: transparent;-}--.dropdown li{- margin-left:0px;+.navbar {+ margin-bottom: 0px;}-.close{float:right;opacity: 0.2;font-weight: bold;}+/**************************************************************+ * Alerts+ **************************************************************/+/** Links within boostrap's alert boxes are rendered in black*/@@ -136,4 +124,12 @@ fieldset[disabled] .btn-default.active {.btn-default .badge {color: #fff;background-color: #babdb6;+}++/**************************************************************+ * Header+ **************************************************************/+header a:hover, header a:focus {+ color: white;+ /*text-decoration: none;*/}\ No newline at end of filediff --git a/wger/core/templates/index.html b/wger/core/templates/index.htmlindex 334aee60c..ee4c9e096 100644--- a/wger/core/templates/index.html+++ b/wger/core/templates/index.html@@ -167,17 +167,6 @@ day in your current workout:{% endblocktrans %} <strong>{{current_workout}}</str{% block sidebar %}-<h3>{% trans "Options" %}</h3>-<p>-<a href="{% url 'core:preferences' %}">-<img src="{% static 'images/icons/preferences.svg' %}"- width="32"- height="32"- alt="{% trans 'My preferences' %}"- title="{% trans 'My preferences' %}">-{% trans "My preferences" %}</a>-</p>-<h3>{% trans "Info" %}</h3><p>{% blocktrans %}The current workout is selected from your active scheduleor, if you don't have one, simply by date.{% endblocktrans %}</p>diff --git a/wger/core/templates/navigation.html b/wger/core/templates/navigation.htmlindex e49ed3f55..08bf7f067 100644--- a/wger/core/templates/navigation.html+++ b/wger/core/templates/navigation.html@@ -1,8 +1,8 @@{% load i18n %}{% load cache %}<nav id="nav">- <div class="ym-wrapper">+ <div><div class="navbar navbar-inverse ">- <div class="container-fluid">+ <div class="container"><div class="navbar-header"><a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span>@@ -142,7 +142,7 @@<li class="divider-vertical"></li><li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">- {% trans "Options" %}+ {% trans "Login" %} / {% trans "Register" %}<b class="caret"></b></a><ul class="dropdown-menu">@@ -150,6 +150,31 @@<li><a href="{% url 'core:registration' %}">{% trans "Register" %}</a></li><li><a href="{% url 'core:password_reset' %}">{% trans "Reset password" %}</a></li></ul>+ </li>+ </ul>+ {% else %}+ <ul class="nav navbar-nav navbar-right">+ <li class="dropdown">+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">+ {% if user.email %}+ {{user.email}}+ {% else %}+ {{user.username}}+ {% endif %}+ <b class="caret"></b>+ </a>+ <ul class="dropdown-menu">+ <li>+ <a href="{% url 'core:preferences' %}">{% trans "My preferences" %}</a>+ </li>+ <li>+ <a href="{% url 'core:logout' %}" class="browserid-logout">+ <span class="glyphicon glyphicon-log-out"></span>+ {% trans "Logout" %}+ </a>+ </li>+ </ul>+ </li></ul>{% endif %}</div><!--/.nav-collapse -->diff --git a/wger/core/templates/template.html b/wger/core/templates/template.htmlindex bbf51bc86..80fb4f856 100644--- a/wger/core/templates/template.html+++ b/wger/core/templates/template.html@@ -80,34 +80,40 @@<body>{% browserid_info %}<header>- <div class="float-right" style="margin-right:1em;margin-top:0em;position:absolute;right:0px;">-- {% if user.is_authenticated and not user.userprofile.is_temporary %}- <a href="{% url 'core:preferences' %}">- {% if user.email %}- {{user.email}}- {% else %}- {{user.username}}- {% endif %}- </a>+ <div class="container">+ <div class="row">+ <div class="col-md-offset-8 col-md-4" style="text-align: right;">+ <a href="{% url 'core:contact' %}">{% trans "Get in touch" %}</a>|- <a href="{% url 'core:logout' %}" class="browserid-logout">- {% trans "Logout" %}- </a>- {% else %}- <a href="{% url 'core:login' %}">{% trans "Login" %}</a>- |- <a href="{% url 'core:registration' %}">{% trans "Register" %}</a>- {% endif %}- |- <a href="{% url 'core:contact' %}">{% trans "Get in touch" %}</a>- |-- {# Render the links to the other languages #}- {% for language in languages %}- {% language_select language %}- {% endfor %}+ {# #}+ {# Render the links to the other languages #}+ {# #}+ <div class="btn-group" style="text-align: left;">+ <button type="button" class="btn btn-primary dropdown-toggle btn-xs" data-toggle="dropdown">+ <img src="/static/images/icons/flag-{{language.short_name}}.svg"+ width="18"+ height="11"+ alt="{% trans language.full_name %}"+ title="{% trans language.full_name %}"+ style="border: 1px solid #151515;">+ {{language.full_name}} <span class="caret"></span>+ </button>+ <ul class="dropdown-menu" role="menu">+ {% for language in languages %}+ {% language_select language %}+ {% endfor %}+ <li class="divider"></li>+ <li>+ <a href="https://www.transifex.com/projects/p/wger-workout-manager/">+ <span class="glyphicon glyphicon-plus"></span>+ {% trans "Translate" %}+ </a>+ </li>+ </ul>+ </div>+ </div>+ </div></div><div class="container">diff --git a/wger/manager/templates/tags/language_select.html b/wger/manager/templates/tags/language_select.htmlindex b977b97da..f743bd5e9 100644--- a/wger/manager/templates/tags/language_select.html+++ b/wger/manager/templates/tags/language_select.html@@ -1,6 +1,7 @@{% load i18n %}{% load staticfiles %}+<li><a href="{{i18n_path}}"><img src="{% static path %}"width="18"@@ -9,4 +10,4 @@title="{% trans language_name %}"style="border: 1px solid #151515;">{% trans language_name %}</a>-|\ No newline at end of file+</li>\ No newline at end of file