Skip to content

Commit 2ed0a20

Browse files
Upgrade to Bootstrap 5.3
Mainly following Wikidata Lexeme Forms commit 0d201ca1a4 for reference.
1 parent a28f598 commit 2ed0a20

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

{{cookiecutter.tool_identifier}}/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ def authentication_area(){% if cookiecutter.set_up_mypy == "True" %} -> Markup{%
105105

106106
session = authenticated_session()
107107
if session is None:
108-
return (Markup(r'<a id="login" class="navbar-text" href="') +
108+
return (Markup(r'<span class="nav-item"><a id="login" class="nav-link navbar-text" href="') +
109109
Markup.escape(flask.url_for('login')) +
110-
Markup(r'">Log in</a>'))
110+
Markup(r'">Log in</a></span>'))
111111

112112
userinfo = session.get(action='query',
113113
meta='userinfo')['query']['userinfo']
114-
return (Markup(r'<span class="navbar-text">Logged in as ') +
114+
return (Markup(r'<span class="nav-item navbar-text">Logged in as ') +
115115
user_link(userinfo['name']) +
116116
Markup(r'</span>'))
117117

{{cookiecutter.tool_identifier}}/templates/base.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,21 @@
55
<meta charset="utf-8">
66
<title>{% block title %}{% endraw %}{{ cookiecutter.tool_name }}{% raw %}{% endblock title %}</title>
77
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8-
<link rel="stylesheet" href="https://tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
8+
<link rel="stylesheet" href="https://tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
99
{% endblock head %}
1010
</head>
1111
<body>
12-
<a href="#main" class="sr-only sr-only-focusable">Skip to main content</a>
12+
<a href="#main" class="visually-hidden visually-hidden-focusable">Skip to main content</a>
1313
<nav class="navbar navbar-expand-sm navbar-dark bg-dark">
14-
<a href="{{ url_for('index') }}" class="navbar-brand">{% endraw %}{{ cookiecutter.tool_name }}{% raw %}</a>
15-
<ul class="navbar-nav mr-auto">
16-
<li class="nav-item"><a href="https://{% endraw %}{{ cookiecutter.wiki_domain }}{% raw %}/wiki/User:{% endraw %}{{ cookiecutter.user_name | replace(' ', '_') }}/{{ cookiecutter.tool_name | replace(' ', '_') }}{% raw %}" class="nav-link">Documentation</a></li>
17-
<li class="nav-item"><a href="https://toolforge.org/" class="nav-link">Wikimedia Toolforge</a></li>
18-
<li class="nav-item"><a href="https://gitlab.wikimedia.org/toolforge-repos/{% endraw %}{{ cookiecutter.tool_identifier }}{% raw %}" class="nav-link">Source code</a></li>
19-
</ul>
20-
{{ authentication_area() }}
14+
<div class="container-fluid">
15+
<a href="{{ url_for('index') }}" class="navbar-brand">{% endraw %}{{ cookiecutter.tool_name }}{% raw %}</a>
16+
<ul class="navbar-nav me-auto">
17+
<li class="nav-item"><a href="https://{% endraw %}{{ cookiecutter.wiki_domain }}{% raw %}/wiki/User:{% endraw %}{{ cookiecutter.user_name | replace(' ', '_') }}/{{ cookiecutter.tool_name | replace(' ', '_') }}{% raw %}" class="nav-link">Documentation</a></li>
18+
<li class="nav-item"><a href="https://toolforge.org/" class="nav-link">Wikimedia Toolforge</a></li>
19+
<li class="nav-item"><a href="https://gitlab.wikimedia.org/toolforge-repos/{% endraw %}{{ cookiecutter.tool_identifier }}{% raw %}" class="nav-link">Source code</a></li>
20+
</ul>
21+
{{ authentication_area() }}
22+
</div>
2123
</nav>
2224
<main id="main" class="container mt-3">
2325
{% block main %}

0 commit comments

Comments
 (0)