Gitlab CSE Unil

Commit 4350ffda authored by Julien Furrer's avatar Julien Furrer
Browse files

Consolidé mainbar

- ajouté main navbar sur home page quand loggé
- ajusté css
- mis dropdown en sombre
- ajouté lien pour site admin dans menu pour les membre staff
parent c5608a5b
......@@ -263,11 +263,32 @@ body {
#main-navbar li.info {
border-left: 1px solid rgba(255, 255, 255, 0.1);
}
#main-navbar li.info span {
float: left;
}
#main-navbar .dropdown-menu {
background-color: #202020;
}
#main-navbar .dropdown-menu .divider {
background-color: #777;
}
#main-navbar .dropdown-menu > li > a {
color: #c0c0c0;
}
#main-navbar .dropdown-menu > li > a:hover,
#main-navbar .dropdown-menu > li > a:focus {
background-color: #0A0A0A;
background-image: none;
color: #fff;
}
#main-navbar .dropdown-menu .dropdown-header {
color: #aaa;
}
.navbar-separator {
background-color: rgba(255, 255, 255, 0.1);
margin: 1px 15px 0;
margin: 0 15px;
padding: 15px 1px;
line-height: 1.5em;
line-height: 20px;
border-color: rgba(255, 255, 255, 0.1);
border-style: solid;
border-width: 0 1px;
......@@ -301,34 +322,40 @@ body.home {
overflow: auto;
background-color: #333333;
}
body.home #main-navbar {
body.home.anonymous #main-navbar {
display: none;
}
@media (min-width: 1200px) {
body.home #home-container {
padding: 40px 0 60px;
body.home.anonymous #home-container {
padding: 71px 0 40px;
}
body.home #home-image {
body.home.anonymous #home-image {
padding-top: 20px;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
body.home #home-container {
padding: 20px 0 40px;
body.home.anonymous #home-container {
padding: 71px 0 40px;
}
body.home #home-image {
padding-top: 0px;
body.home.anonymous #home-image {
padding-top: 0;
}
}
@media (min-width: 768px) and (max-width: 991px) {
body.home #home-container {
padding: 20px 0 20px;
body.home.anonymous #home-container {
padding: 71px 0 20px;
}
body.home #home-image {
body.home.anonymous #home-image {
padding-top: 15px;
margin-bottom: 10px;
}
}
body.home.authenticated #main-navbar .navbar-header .navbar-brand {
display: none;
}
body.home.authenticated #home-container #home-action-box .well {
margin-bottom: 28px;
}
#home-container {
background: #424242;
padding: 20px 0 40px;
......
......@@ -168,14 +168,37 @@ html, body {
li.info {
border-left: 1px solid rgba(255, 255, 255, 0.1);
span { float: left; }
}
.dropdown-menu {
background-color: #202020;
.divider {
background-color: #777;
}
> li > a {
color: #c0c0c0;
&:hover,
&:focus {
background-color: #0A0A0A;
background-image: none;
color: #fff;
}
}
.dropdown-header {
color: #aaa;
}
}
}
.navbar-separator {
background-color: rgba(255, 255, 255, 0.1);
margin: 1px 15px 0;
margin: 0 15px;
padding: 15px 1px;
line-height: 1.5em;
line-height: 20px;
border-color: rgba(255, 255, 255, 0.1);
border-style: solid;
border-width: 0 1px;
......@@ -228,7 +251,7 @@ input[type=number]::-webkit-outer-spin-button {
// Large
@media (min-width: @screen-lg-min) {
#home-container {
padding: 40px 0 60px;
padding: 71px 0 40px;
}
#home-image {
......@@ -238,17 +261,17 @@ input[type=number]::-webkit-outer-spin-button {
// Medium
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
#home-container {
padding: 20px 0 40px;
padding: 71px 0 40px;
}
#home-image {
padding-top: 0px;
padding-top: 0;
}
}
// Small
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
#home-container {
padding: 20px 0 20px;
padding: 71px 0 20px;
}
#home-image {
......@@ -261,8 +284,18 @@ input[type=number]::-webkit-outer-spin-button {
body.home {
overflow: auto;
// .vertical-four-colors(@start-color: @x-bodyBg, @sec-color: @x-bodyBg, @color-stop-sec: 850px, @thrd-color: @main-footer-bg, @color-stop-thrd: 851px, @end-color: @main-footer-bg);
background-color: @main-footer-bg;
.home-variante(1);
&.anonymous {
.home-variante(1);
}
&.authenticated {
#main-navbar .navbar-header .navbar-brand { display: none }
#home-container #home-action-box .well { margin-bottom: 28px; }
}
//#main-navbar {
// visibility: hidden;
//}
}
#home-container {
......
{% extends "adim/base_annotation.html" %}
{% load static i18n %}
{% block page_title %}
{{ block.super }} - {{ anobj.name|truncatechars:"32" }}
{% endblock %}
{% block navbar_content %}
<ul class="nav navbar-nav">
<li><a href="#" class="adim-image-name {{ is_owner|yesno:",read-only" }}">
......
{% extends "adim/base_annotation.html" %}
{% load static i18n %}
{% block page_title %}
{{ block.super }} - Choisir une image
{% endblock %}
{% block page_head %}{% endblock %}
{% block overlay %}
......
{% extends "base.html" %}
{% load static i18n %}
{% block page_title %}
{{ block.super }} - {{ user.username }}
{% endblock %}
{% block page_head %}{% endblock %}
......@@ -31,7 +28,7 @@
{{ block.super }}
<li class="info">
<a href="#" id="adim-about-but"><span class="icon-info-sign"></span></a>
<a href="#" id="adim-about-but"><span class="icon-info-sign"></span>&nbsp;</a>
</li>
{% endblock navbar_right_content %}
......
......@@ -4,7 +4,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width"/>
<title>{% block page_title %}ADIM{% endblock %}</title>
<title>{% block page_title %}ADIM{% endblock %}{% if user.is_authenticated %} - {{ user.username }}{% endif %}</title>
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/libs.css" %}" />
{# <link rel="stylesheet" type="text/css" media="all" href="{% static "css/adim.css" %}" />#}
......@@ -13,7 +13,7 @@
{% block page_head %}{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}">{% block page_body %}
<body class="{% if user.is_anonymous %}anonymous{% else %}authenticated{% endif %} {% block body_class %}{% endblock %}">{% block page_body %}
{% block overlay %}{% endblock %}
{% block main_header %}
{% block main_navbar %}
......@@ -36,8 +36,11 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li class="dropdown-header">{{ user.username|default:user.email }}</li>
<li class="dropdown-header"><span class="glyphicon glyphicon-user"></span> {{ user.username|default:user.email }}</li>
<li class="divider"></li>
{% if user.is_staff %}
<li><a href="{% url "admin:index" %}"><span class="glyphicon glyphicon-cog"></span> Administration</a></li>
{% endif %}
<li><a id="adim-logout-but" href="{% url "logout" %}"><span class="glyphicon glyphicon-log-out"></span> Déconnexion</a></li>
</ul>
</li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment