Add html lang attribute

This commit is contained in:
augustin64 2024-01-27 12:25:52 +01:00
parent eb5e1edf5e
commit 3f888c39d2
2 changed files with 5 additions and 2 deletions

View File

@ -153,7 +153,7 @@ def inject_default_variables():
"""Inject the version number in the template variables""" """Inject the version number in the template variables"""
if __version__ == "unknown": if __version__ == "unknown":
return {"version": ''} return {"version": ''}
return {"version": __version__} return {"version": __version__, "lang": get_locale()}
@app.after_request @app.after_request

View File

@ -1,9 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="{{ lang }}">
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="description" content="{{ self.title() }}" />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#eff1f5">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1e1e2e">
<title>{% block title %}{% endblock %} - PartitionCloud</title> <title>{% block title %}{% endblock %} - PartitionCloud</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style/style.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='style/style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='style/mobile.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='style/mobile.css') }}">