SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit dd5e22cb authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Rework new homepage navbar, based on home3

parent e64e691e
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,9 @@
.home-alt {
background-color: #fff;
.main-nav .nav-item { padding: 0 5px; }
.main-nav .nav-item {
padding: 0;// 5px;
}
//.main-nav .nav-item .dropdown-toggle::after { content: none; }
.container { max-width: 1440px; }
......@@ -294,37 +296,42 @@
#portal-tablist-home3 {
background-color: $scipost-blue50;
list-style: none;
padding: 0 0 4px 0;
padding: 0;// 0 4px 0;
margin: 0;
li button, li a {
color: black;
border: 2px solid $scipost-blue50;
color: #eee;
font-size: 0.8rem;
font-weight: 800;
display: inline-block;
// background-color: #d3e3f6;
padding: 5px 15px;
margin-right: 8px;
margin-bottom: 8px;
//margin-bottom: 8px;
border-radius: 4px;
cursor: pointer;
transition: 100ms;
}
li button.active {
background-color: #496bb6;
color: #fff;
background-color: $scipost-darkblue;
//color: black;
text-decoration: underline;
}
li button:hover, li a:hover {
background-color: $scipost-lightestblue;//#b8c8db;
//background-color: $scipost-lightestblue;//#b8c8db;
border: 2px solid $scipost-darkblue;
//color: black;
text-decoration: underline;
}
li button.active:hover {
background-color: #3e5c9d;
}
// li button.active:hover {
// background-color: $scipost-lightestblue;
// color: black;
// }
}
......@@ -46,7 +46,7 @@
.nav-item .dropdown-toggle::after {
margin-left: 0.2em;
vertical-align: 0.1255em;
//vertical-align: 0.1255em;
font-weight: bold;
}
......@@ -167,7 +167,7 @@
.nav-item {
padding-top: 0.25rem;
padding-bottom: 0.25rem;
text-transform: uppercase;
//text-transform: uppercase;
letter-spacing: 1px;
}
}
......
......@@ -3,7 +3,7 @@
<header>
<div class="d-lg-flex justify-content-between p-4 w-100">
<div class="d-lg-flex justify-content-between p-4 pb-0 pb-lg-4 w-100">
<div class="me-2 my-4 my-md-auto" style="flex: 200px">
<a href="{% url 'scipost:index' %}"><img src="{% static 'scipost/images/logo_scipost_RGB_HTML_groot.png' %}" class="m-0 p-0" alt="SciPost logo" style="max-width: unset;" width="180" /></a>
......@@ -24,7 +24,7 @@
>
</div>
<div class="ms-2 my-4 my-lg-auto">
<div class="ms-2 mt-4 my-lg-auto">
<form id="header-search-form" method="get" action="{% url 'scipost:search' %}">
<div class="form-floating">
<input type="text" id="headerSearchInput" class="form-control" name="q" placeholder="Search" value="{{ request.GET.q }}">
......
......@@ -7,57 +7,101 @@
{% is_active_fellow request.user as is_active_fellow %}
<nav class="navbar navbar-expand-lg main-nav">
<!-- <nav class="navbar navbar-expand-sm main-nav">
<div class="container">
<button class="navbar-toggler p-0 border-0" type="button" data-bs-toggle="collapse" data-bs-target="#main-navbar" aria-label="Navbar toggler">
<span class="navbar-toggler-icon">{% include 'bi/list.html' %}</span>
</button>
<div class="collapse navbar-collapse mt-3" id="main-navbar"> -->
<nav class="navbar main-nav p-2">
<div class="container">
<button class="navbar-toggler p-0 border-0" type="button" data-bs-toggle="collapse" data-bs-target="#main-navbar" aria-label="Navbar toggler">
<span class="navbar-toggler-icon">{% include 'bi/list.html' %}</span>
</button>
<div class="collapse navbar-collapse mt-lg-0 mt-3" id="main-navbar">
<ul class="navbar-nav me-auto">
<div class="flex-fill" id="main-navbar">
<ul class="nav nav-pills flex-wrap flex-sm-row mb-0 justify-content-center"
id="portal-tablist-home3"
role="tablist">
<li class="nav-item{% if request.path == '/home3' %} active{% endif %}">
<a href="{% url 'scipost:index3' %}" class="nav-link" aria-label="SciPost Home">
<span class="d-none d-lg-inline-block" aria-hidden="true" style="min-width: 16px;">{% include 'bi/house-fill.html' %}</span>
<span class="d-lg-none d-inline-block">Home</span>
</a>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab"
data-bs-toggle="tab" data-bs-target="#home"
type="button" role="tab"
aria-controls="home" aria-selected="true">
Home
</button>
</li>
{% if perms.scipost.can_preview_new_features %}
<li class="nav-item dropdown border border-warning">
<a class="nav-link dropdown-toggle" href="#" id="HomepagesDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-trigger="hover">
<span class="d-none d-lg-inline-block text-warning" aria-hidden="true" style="min-width: 16px;">{% include 'bi/house-fill.html' %}</span>
<span class="d-lg-none d-inline-block text-warning">Homepages</span>
</a>
<div class="dropdown-menu" aria-labelledby="HomepagesDropdown">
<div class="dropdown-item">
<a href="{% url 'scipost:index' %}">Current homepage</a>
</div>
<div class="dropdown-item">
<a href="{% url 'scipost:index2' %}">2: home + portal</a>
</div>
<div class="dropdown-item">
<a href="{% url 'scipost:index3' %}">3: all tabbed</a>
</div>
</div>
</li>
{% endif %}
<li class="nav-item" role="presentation">
<button class="nav-link" id="journals-tab"
data-bs-toggle="tab" data-bs-target="#journals"
type="button" role="tab"
aria-controls="journals" aria-selected="true">
Journals
</button>
</li>
</ul>
<li class="nav-item" role="presentation">
<button class="nav-link" id="publications-tab"
data-bs-toggle="tab" data-bs-target="#publications"
type="button" role="tab"
aria-controls="publications" aria-selected="true">
Publications
</button>
</li>
<hr class="lg d-lg-none">
<li class="nav-item" role="presentation">
<button class="nav-link" id="submissions-tab"
data-bs-toggle="tab" data-bs-target="#submissions"
type="button" role="tab"
aria-controls="submissions" aria-selected="true">
Submissions
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link border border-2 border-warning" id="reports-needed-tab"
data-bs-toggle="tab" data-bs-target="#reports-needed"
type="button" role="tab"
aria-controls="reports-needed" aria-selected="true">
Reports needed&nbsp;<span class="text-warning">{% include 'bi/exclamation-square-fill.html' %}</span>
</button>
</li>
<!--
<li class="nav-item" role="presentation">
<button class="nav-link" id="reports-tab"
data-bs-toggle="tab" data-bs-target="#reports"
type="button" role="tab"
aria-controls="reports" aria-selected="true">
Reports
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="comments-tab"
data-bs-toggle="tab" data-bs-target="#comments"
type="button" role="tab"
aria-controls="comments" aria-selected="true">
Comments
</button>
</li> -->
<li class="nav-item" role="presentation">
<a class="btn btn-outline-success border-2 border-success ms-2"
href="{% url 'submissions:submit_manuscript' %}">
{% include 'bi/arrow-right.html' %}<strong>Submit</strong>
</a>
</li>
<ul class="navbar-nav me-0">
{% if user.is_authenticated %}
<li class="nav-item dropdown">
<li class="nav-item dropdown me-lg-2 ms-lg-auto">
<a class="nav-link dropdown-toggle" href="#" id="PersonalDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-trigger="hover">
Logged in as {% if user.last_name %}{% if user.contributor %}{{ user.contributor.profile.get_title_display }} {% endif %}{{ user.first_name }} {{ user.last_name }}{% else %}{{ user.username }}{% endif %}</a>
Logged in as {% if user.last_name %}{% if user.contributor %}{{ user.contributor.profile.get_title_display }} {% endif %}{{ user.first_name }} {{ user.last_name }}{% else %}{{ user.username }}{% endif %}</a>
{% if request.user.contributor and not request.user.contributor.is_currently_available %}
<button type="button" class="btn btn-link p-0 text-warning" data-bs-toggle="tooltip" data-bs-title="You are currently unavailable.<br>Check your availability on your Personal Page if this should not be the case." data-bs-html="true">{% include 'bi/exclamation-triangle-fill.html' %}</button>
&nbsp;
<button type="button" class="btn btn-link p-0 text-warning" data-bs-toggle="tooltip" data-bs-title="You are currently unavailable.<br>Check your availability on your Personal Page if this should not be the case." data-bs-html="true">{% include 'bi/exclamation-triangle-fill.html' %}</button>
&nbsp;
{% endif %}
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="PersonalDropdown">
{% if user.contributor %}
{% if user.contributor %}
<div class="dropdown-item">
<a href="{% url 'scipost:personal_page' %}">Personal Page</a>
</div>
......@@ -66,38 +110,35 @@
<a href="{% url 'submissions:pool' %}">Submissions Pool</a>
</div>
{% endif %}
{% endif %}
{% if perms.scipost.can_view_production %}
{% endif %}
{% if perms.scipost.can_view_production %}
<div class="dropdown-item">
<a href="{% url 'production:production' %}">Production</a>
</div>
{% endif %}
{% if perms.scipost.can_manage_organizations or user.org_contact %}
{% endif %}
{% if perms.scipost.can_manage_organizations or user.org_contact %}
<div class="dropdown-item">
<a href="{% url 'organizations:dashboard' %}">Orgs dashboard</a>
</div>
{% endif %}
{% endif %}
<div class="dropdown-divider"></div>
<div class="dropdown-item">
<a href="{% url 'forums:forums' %}">Forums and Meetings</a>
</div>
<div class="dropdown-divider"></div>
<div class="dropdown-divider"></div>
<div class="dropdown-item">
<a href="{% url 'helpdesk:helpdesk' %}">Helpdesk</a>
</div>
<div class="dropdown-divider"></div>
<div class="dropdown-item">
<div class="dropdown-divider"></div>
<div class="dropdown-item">
<a href="{% url 'scipost:logout' %}?next={{ request.path }}">Logout</a>
</div>
</div>
</div>
</li>
<li class="nav-item">
&emsp;<a href="{% url 'helpdesk:ticket_create' %}" target="_blank" class="nav-link"><span style="font-size: 80%;" data-bs-toggle="tooltip" data-bs-html="true" title="Notice something wrong?<br/>Open a support ticket">{% include 'bi/sticky-fill.html' %}</span></a>
<a href="{% url 'helpdesk:ticket_create' %}" target="_blank" class="nav-link"><span style="font-size: 80%;" data-bs-toggle="tooltip" data-bs-html="true" title="Notice something wrong?<br/>Open a support ticket">{% include 'bi/sticky-fill.html' %}</span></a>
</li>
{% else %}
<li class="nav-item{% if request.path == '/login/' %} active{% endif %}">
<li class="me-lg-2 ms-lg-auto nav-item{% if request.path == '/login/' %} active{% endif %}">
<a class="nav-link" href="{% url 'scipost:login' %}?next={{request.path}}">Login or register</a>
</li>
{% endif %}
......
......@@ -11,7 +11,7 @@
{% load static %}
{% block navbar %}
{% include 'scipost/navbar3.html' %}
{% include 'scipost/portal/navbar.html' %}
{% endblock %}
{% block body_class %}{{ block.super }} homepage home-alt{% endblock %}
......@@ -26,85 +26,6 @@
{% block content %}
<ul class="nav nav-pills flex-wrap flex-sm-row mb-0 justify-content-center"
id="portal-tablist-home3"
role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab"
data-bs-toggle="tab" data-bs-target="#home"
type="button" role="tab"
aria-controls="home" aria-selected="true">
Home
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="journals-tab"
data-bs-toggle="tab" data-bs-target="#journals"
type="button" role="tab"
aria-controls="journals" aria-selected="true">
Journals
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="publications-tab"
data-bs-toggle="tab" data-bs-target="#publications"
type="button" role="tab"
aria-controls="publications" aria-selected="true">
Publications
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="submissions-tab"
data-bs-toggle="tab" data-bs-target="#submissions"
type="button" role="tab"
aria-controls="submissions" aria-selected="true">
Submissions
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link border border-2 border-warning" id="reports-needed-tab"
data-bs-toggle="tab" data-bs-target="#reports-needed"
type="button" role="tab"
aria-controls="reports-needed" aria-selected="true">
Reports needed&nbsp;<span class="text-warning">{% include 'bi/exclamation-square-fill.html' %}</span>
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="reports-tab"
data-bs-toggle="tab" data-bs-target="#reports"
type="button" role="tab"
aria-controls="reports" aria-selected="true">
Reports
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="comments-tab"
data-bs-toggle="tab" data-bs-target="#comments"
type="button" role="tab"
aria-controls="comments" aria-selected="true">
Comments
</button>
</li>
<li class="nav-item" role="presentation">
<a class="btn btn-outline-success border-2 ms-4"
href="{% url 'submissions:submit_manuscript' %}">
{% include 'bi/arrow-right.html' %}<strong>Submit</strong>
</a>
</li>
</ul>
<hr class="mt-0">
<div class="tab-content mt-4" id="portalTabContent">
<div class="tab-pane portal-tab fade show active" id="home"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment