Skip to content

Commit b391c78

Browse files
committed
fixes to the nav bar
1 parent 3c8f155 commit b391c78

3 files changed

Lines changed: 26 additions & 26 deletions

File tree

static/css/app.css

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,10 @@ main {
9898
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
9999
}
100100

101-
/* Standard container is block with 0 15px padding; we need flex + our padding */
102-
.govuk-header__container--full-width {
103-
max-width: 1600px;
104-
margin: 0 auto;
105-
padding: 14px 24px;
101+
/* govuk-width-container handles max-width/margin; we need flex + our padding */
102+
.govuk-header > .govuk-width-container {
103+
padding-top: 14px;
104+
padding-bottom: 14px;
106105
display: flex;
107106
align-items: flex-end;
108107
justify-content: space-between;
@@ -118,18 +117,6 @@ main {
118117
padding: 0;
119118
}
120119

121-
/* Design system sets 30px on this class; inherit from the h1 instead */
122-
.govuk-header__homepage-link {
123-
font-size: inherit;
124-
}
125-
126-
/* Suppress focus styles for mouse clicks; keyboard focus still shows them */
127-
.govuk-header__homepage-link:focus:not(:focus-visible) {
128-
background: transparent;
129-
box-shadow: none;
130-
color: #fff;
131-
}
132-
133120
/* Reset the -3px offset; separator moved here since the logo is no longer a link */
134121
.govuk-header__logotype {
135122
top: 0;
@@ -148,8 +135,8 @@ main {
148135
letter-spacing: -0.01em;
149136
}
150137

151-
.govuk-header .status {
152-
margin: 4px 0 0;
153-
font-size: 14px;
154-
color: rgba(255, 255, 255, 0.85);
138+
/* ---------- Service navigation ---------- */
139+
140+
.govuk-service-navigation__list .app-nav__push-right {
141+
margin-left: auto;
155142
}

templates/base.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</head>
1111
<body>
1212
<header class="govuk-header">
13-
<div class="govuk-header__container govuk-header__container--full-width">
13+
<div class="govuk-header__container govuk-width-container">
1414
<div class="govuk-header__logo">
1515
<svg class="govuk-header__logotype" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 324 60" height="28" width="150" fill="currentColor" aria-label="GOV.UK">
1616
<title>GOV.UK</title>
@@ -29,7 +29,7 @@
2929
<path d="M93.94 41.25c.4 1.81 1.2 3.21 2.21 4.62 1 1.4 2.21 2.41 3.61 3.21s3.21 1.2 5.22 1.2 3.61-.4 4.82-1c1.4-.6 2.41-1.4 3.21-2.41.8-1 1.4-2.01 1.61-3.01s.4-2.01.4-3.01v.14h-10.86v-7.02h20.07v24.08h-8.03v-5.56c-.6.8-1.38 1.61-2.19 2.41-.8.8-1.81 1.2-2.81 1.81-1 .4-2.21.8-3.41 1.2s-2.41.4-3.81.4a18.56 18.56 0 0 1-14.65-6.63c-1.6-2.01-3.01-4.41-3.81-7.02s-1.4-5.62-1.4-8.83.4-6.02 1.4-8.83a20.45 20.45 0 0 1 19.46-13.65c3.21 0 4.01.2 5.82.8 1.81.4 3.61 1.2 5.02 2.01 1.61.8 2.81 2.01 4.01 3.21s2.21 2.61 2.81 4.21l-7.63 4.41c-.4-1-1-1.81-1.61-2.61-.6-.8-1.4-1.4-2.21-2.01-.8-.6-1.81-1-2.81-1.4-1-.4-2.21-.4-3.61-.4-2.01 0-3.81.4-5.22 1.2-1.4.8-2.61 1.81-3.61 3.21s-1.61 2.81-2.21 4.62c-.4 1.81-.6 3.71-.6 5.42s.8 5.22.8 5.22Zm57.8-27.9c3.21 0 6.22.6 8.63 1.81 2.41 1.2 4.82 2.81 6.62 4.82S170.2 24.39 171 27s1.4 5.62 1.4 8.83-.4 6.02-1.4 8.83-2.41 5.02-4.01 7.02-4.01 3.61-6.62 4.82-5.42 1.81-8.63 1.81-6.22-.6-8.63-1.81-4.82-2.81-6.42-4.82-3.21-4.41-4.01-7.02-1.4-5.62-1.4-8.83.4-6.02 1.4-8.83 2.41-5.02 4.01-7.02 4.01-3.61 6.42-4.82 5.42-1.81 8.63-1.81Zm0 36.73c1.81 0 3.61-.4 5.02-1s2.61-1.81 3.61-3.01 1.81-2.81 2.21-4.41c.4-1.81.8-3.61.8-5.62 0-2.21-.2-4.21-.8-6.02s-1.2-3.21-2.21-4.62c-1-1.2-2.21-2.21-3.61-3.01s-3.21-1-5.02-1-3.61.4-5.02 1c-1.4.8-2.61 1.81-3.61 3.01s-1.81 2.81-2.21 4.62c-.4 1.81-.8 3.61-.8 5.62 0 2.41.2 4.21.8 6.02.4 1.81 1.2 3.21 2.21 4.41s2.21 2.21 3.61 3.01c1.4.8 3.21 1 5.02 1Zm36.32 7.96-12.24-44.15h9.83l8.43 32.77h.4l8.23-32.77h9.83L200.3 58.04h-12.24Zm74.14-7.96c2.18 0 3.51-.6 3.51-.6 1.2-.6 2.01-1 2.81-1.81s1.4-1.81 1.81-2.81a13 13 0 0 0 .8-4.01V13.9h8.63v28.15c0 2.41-.4 4.62-1.4 6.62-.8 2.01-2.21 3.61-3.61 5.02s-3.41 2.41-5.62 3.21-4.62 1.2-7.02 1.2-5.02-.4-7.02-1.2c-2.21-.8-4.01-1.81-5.62-3.21s-2.81-3.01-3.61-5.02-1.4-4.21-1.4-6.62V13.9h8.63v26.95c0 1.61.2 3.01.8 4.01.4 1.2 1.2 2.21 2.01 2.81.8.8 1.81 1.4 2.81 1.81 0 0 1.34.6 3.51.6Zm34.22-36.18v18.92l15.65-18.92h10.82l-15.03 17.32 16.03 26.83h-10.21l-11.44-20.21-5.62 6.22v13.99h-8.83V13.9" />
3030
</svg>
3131
<div>
32-
<h1><a href="{{ url_for('visualisations_page') }}" class="govuk-header__homepage-link">AI Graph Tools</a></h1>
32+
<h1>AI Graph Tools</h1>
3333
</div>
3434
</div>
3535
{% block header_nav %}{% endblock %}
@@ -40,14 +40,27 @@ <h1><a href="{{ url_for('visualisations_page') }}" class="govuk-header__homepage
4040
<div class="govuk-service-navigation__container">
4141
<nav aria-label="Menu" class="govuk-service-navigation__wrapper">
4242
<ul class="govuk-service-navigation__list" id="navigation">
43-
{% if request.path == url_for('graph_page') %}
43+
{% if request.path == url_for('visualisations_page') %}
4444
<li class="govuk-service-navigation__item govuk-service-navigation__item--active">
45+
<a class="govuk-service-navigation__link" href="{{ url_for('visualisations_page') }}" aria-current="true">
46+
<strong class="govuk-service-navigation__active-fallback">Home</strong>
47+
</a>
48+
</li>
49+
{% else %}
50+
<li class="govuk-service-navigation__item">
51+
<a class="govuk-service-navigation__link" href="{{ url_for('visualisations_page') }}">
52+
Home
53+
</a>
54+
</li>
55+
{% endif %}
56+
{% if request.path == url_for('graph_page') %}
57+
<li class="govuk-service-navigation__item govuk-service-navigation__item--active app-nav__push-right">
4558
<a class="govuk-service-navigation__link" href="{{ url_for('graph_page', run_path=run_path) }}" aria-current="true">
4659
<strong class="govuk-service-navigation__active-fallback">Graph</strong>
4760
</a>
4861
</li>
4962
{% else %}
50-
<li class="govuk-service-navigation__item">
63+
<li class="govuk-service-navigation__item app-nav__push-right">
5164
<a class="govuk-service-navigation__link" href="{{ url_for('graph_page', run_path=run_path) }}">
5265
Graph
5366
</a>

templates/visualisations.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% block content %}
44
<div class="vis-menu">
5-
<p class="vis-menu__heading">Choose a graph to explore:</p>
5+
<p class="vis-menu__heading">Choose a knowledge graph to explore:</p>
66
{% if visualisations %}
77
<ul class="vis-menu__list">
88
{% for v in visualisations %}

0 commit comments

Comments
 (0)