Skip to content

Commit adafdb1

Browse files
committed
Further adjust navbar CSS
1 parent fa97513 commit adafdb1

2 files changed

Lines changed: 30 additions & 28 deletions

File tree

static/style.css

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1+
/* Align with quarto bootstrap theme cosmo */
12
:root {
2-
--bs-font-sans-serif: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
3-
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
4-
--bs-body-font-family: "PT Sans", -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
5-
--font-color: #0f2a55;
3+
--bs-body-font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
4+
--bs-body-color: #343a40;
5+
--bs-root-font-size: 17px;
6+
--bs-body-font-size: 1rem;
67
}
78

89
html {
10+
font-size: var(--bs-root-font-size);
911
font-family: var(--bs-body-font-family);
10-
height: 100%;
12+
color: var(--bs-body-color);
13+
height: 100%;
1114
display: block;
12-
font-size: 17px;
1315
}
1416
body {
17+
font-size: var(--bs-body-font-size);
1518
display:block;
16-
margin:0;
17-
font-size: 1rem;
18-
font-weight: 400;
19-
line-height: 1.5;
20-
}
21-
nav {
22-
padding-left: 1em;
23-
padding-right: 1em;
19+
margin:0;
20+
font-weight: 400;
21+
line-height: 1.5;
22+
}
23+
nav.navbar {
24+
padding: 0.5em 1em;
2425
background-color: rgb(248, 249, 250);
2526
color: rgb(84, 85, 85);
2627
display: flex;
2728
align-items: center;
28-
padding-top: 0.5rem;
29-
padding-bottom: 0.5rem;
3029
}
3130
nav > div {
3231
display:flex;
@@ -39,7 +38,7 @@ nav > div {
3938
margin-right: auto;
4039
margin-left:auto;
4140
}
42-
.nav-brand {
41+
.navbar-brand {
4342
margin-left: 0px !important;
4443
margin-right: 0px !important;
4544
max-width; calc(100% - 115px);
@@ -48,15 +47,14 @@ nav > div {
4847
align-items: center;
4948
text-align:start;
5049
}
51-
.nav-logo {
50+
.navbar-logo {
5251
margin-right: 4px;
5352
display: inline-flex;
5453
color: rgb(15, 42, 85);
5554
overflow:hidden;
5655
text-overflow: ellipsis;
5756
padding-top: 0.3125rem;
5857
padding-bottom: 0.3125rem;
59-
font-size: 1.25rem;
6058
text-decoration: none;
6159
white-space: nowrap;
6260
text-underline-offset: 3px;
@@ -66,17 +64,14 @@ a > img {
6664
width: auto;
6765
padding-right: 4px;
6866
}
69-
.nav-title {
70-
font-size: 1.25rem;
67+
.navbar-title {
68+
font-size: 1.25rem;
7169
color: rgb(15, 42, 85);
7270
overflow: hidden;
7371
text-overflow: ellipsis;
74-
padding-top: 0.3125rem;
75-
padding-bottom: 0.3125rem;;
7672
margin-right: 1rem;
7773
text-decoration: none;
7874
white-space: nowrap;
79-
text-underline-offset: 3px;
8075
}
8176
.nav-list {
8277
display: flex !important;

templates/base.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
</head>
2121
<body>
2222
<header>
23-
<nav>
23+
<nav class="navbar">
2424
<div>
25-
<div class="nav-brand">
26-
<a href="https://www.nfdi4objects.net/" class="nav-logo"><img src="{{url_for('static',filename='nfdi4objects-logo.png')}}"></a>
27-
<a href="{{url_for('index')}}" class="nav-title"><span>NFDI4<strong>Objects Knowledge Graph</strong></span></a>
25+
<div class="navbar-brand">
26+
<a href="https://www.nfdi4objects.net/" class="navbar-logo"><img src="{{url_for('static',filename='nfdi4objects-logo.png')}}"></a>
27+
<a href="{{url_for('index')}}" class="navbar-title"><span>NFDI4<strong>Objects Knowledge Graph</strong></span></a>
2828
</div>
2929
<div class= "nav-list">
3030
<ul>
@@ -47,6 +47,13 @@
4747
<a href="{{url_for('terminology')}}"><span><strong>Terminologies</strong></span></a>
4848
{% else %}
4949
<a href="{{url_for('terminology')}}"><span>Terminologies</span></a>
50+
{% endif %}
51+
</li>
52+
<li>
53+
{% if request.path.startswith("/repository") %}
54+
<a href="{{url_for('repository')}}"><span><strong>Repositories</strong></span></a>
55+
{% else %}
56+
<a href="{{url_for('repository')}}"><span>Repositories</span></a>
5057
{% endif %}
5158
</li>
5259
{% if config.tools %}

0 commit comments

Comments
 (0)