Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified browse/static/browse/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
233 changes: 185 additions & 48 deletions browse/templates/browse/base_generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,115 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">

<title>{% block title %}This is a title{% endblock %}</title>

<style>
.navbar {
background-color: #2c3e50 !important;
padding: 0.5rem 1rem !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
height: 140px;
}

.navbar-brand img {
max-width: 6rem;
margin-right: 0.5rem;
margin-left: 12.5rem;
height:60px;
}

.navbar-nav .nav-item {
margin-left: 0.5rem;
margin-right: 0.5rem;
}


.navbar-nav .nav-link {
color: #ecf0f1 !important;
font-weight: 500;
transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
color: #3498db !important;
}

.navbar-toggler {
border: none;
outline: none;
}

.navbar-toggler-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

.user-content {
margin-left: 1rem;
color: #ecf0f1;
}

.user-content a {
margin-left: 1rem;
color: #3498db;
text-decoration: none;
}

.user-content a:hover {
text-decoration: underline;
}

.footer {
background-color: #2c3e50 !important;
padding: 0.5rem 1rem !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
height:40px;
}

.header {
background: linear-gradient(to bottom, #ffffff, #c5c5c5);
color: #333333;
padding: 0.5rem 1rem;
display: flex;
justify-content: flex-end;
align-items: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
height:35px;
}

.header-content {
margin-left: 1rem;
}

.header a {
color: #3498db;
text-decoration: none;
margin-left: 1rem;
}

.header a:hover {
text-decoration: underline;
}


.full-width-hr-container {
position: relative;
width: 100%;
margin: 0;
padding: 0;
margin-bottom: 0.1rem;
}

.full-width-hr {
position: absolute;
width: 100vw;
left: 50%;
transform: translateX(-50%);
border: none;
border-top: 1px solid #888;
}
</style>
</head>

<body class="d-flex flex-column min-vh-100">
Expand All @@ -21,53 +128,80 @@

{% load static %}
{% load active_link_tags %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#"><img class="img-fluid" src="{% static "browse/logo.png" %}" style="max-width: 6rem"></a>
<button class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse order-1 col-auto" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item {% active_link 'release-list-view' 'active' strict=True %}">
<a class="nav-link" href="{% url 'release-list-view' %}">
Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item {% active_link 'entity-list-view' 'active' %}">
<a class="nav-link" href="{% url 'entity-list-view' %}">
Entity tree
</a>
</li>
<li class="nav-item {% active_link 'format-spec-list-view' 'active' %}">
<a class="nav-link" href="{% url 'format-spec-list-view' %}">
Format specifications
</a>
</li>
</ul>
</div>
<!-- Header with username and login/logout -->
<div class="header">
<div class="header-content">
{% if user.is_authenticated %}
<i class="fas fa-user"></i>
<a href="{% url 'user-view' user.username %}">{{ user.username }}</a>
<i class="fas fa-sign-out-alt"></i>
<a href="{% url 'logout' %}">Logout</a>
{% else %}
<a href="{% url 'login' %}">Login</a>
{% endif %}
</div>
</div>

<div class="navbar-collapse collapse w-50 order-2">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
{% block content %}
{% if user.is_authenticated %}
<a href="{% url 'user-view' user.username %}">{{ user.username }}</a>
(<a href="{% url 'logout' %}">logout</a>)
{% else %}
<a href="{% url 'login' %}">Login</a>
{% endif %}
{% endblock %}
</li>
</ul>
<nav class="navbar navbar-expand-lg navbar-dark flex-column">
<!-- First Row: Logo + Title -->
<div class="d-flex align-items-center w-100">
<a class="navbar-brand" href="#">
<img class="img-fluid" src="{% static "browse/logo.png" %}" style="max-width: 6rem;">
</a>
<h2 style="color: #ecf0f1; margin: 0;">LiteBIRD Instrument Model Database</h2>
</div>

<!-- Toggler on the Right -->
<button class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="full-width-hr-container">
<hr class="full-width-hr">
</div>
<!-- Second Row: Navigation Items and User Content -->
<div class="d-flex w-100" style="margin-left:-105px; margin-top: 1rem;">
<!-- Navigation Items in the Middle -->
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mx-auto">
<li class="nav-item {% active_link 'release-list-view' 'active' strict=True %}">
<a class="nav-link" href="{% url 'release-list-view' %}">
Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item {% active_link 'entity-list-view' 'active' %}">
<a class="nav-link" href="{% url 'entity-list-view' %}">
Entity tree
</a>
</li>
<li class="nav-item {% active_link 'format-spec-list-view' 'active' %}">
<a class="nav-link" href="{% url 'format-spec-list-view' %}">
Format specifications
</a>
</li>
<li class="nav-item {% active_link 'focal-plane-ui-view' 'active' strict=True %}">
<a class="nav-link" href="{% url 'focal-plane-ui-view' %}">
Focal Plane
</a>
</li>
</ul>
</div>

<!-- User Content in the header, top right -->
<div class="navbar-collapse collapse">
<ul class="navbar-nav">
<li class="nav-item user-content">
</li>
</ul>
</div>
</div>
</nav>

<div class="container p-4">
Expand All @@ -78,9 +212,12 @@

<footer class="footer mt-auto py-3 bg-dark">
<div class="container">
<p class="text-secondary">
Made with <a href="https://github.com/ziotom78/instrumentdb">InstrumentDB</a>
</p>
<div class="d-flex justify-content-end">
<p class="text-secondary">
Made with <a href="https://github.com/ziotom78/instrumentdb">InstrumentDB</a>
</p>
</div>
</div>
</footer>
</body>
</html>
Loading
Loading