mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
gh-123430: Add dark mode support to pages generated by http.server (#123475)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
13f61bf7f1
commit
9684f40b9f
3 changed files with 15 additions and 0 deletions
|
|
@ -114,6 +114,11 @@ DEFAULT_ERROR_MESSAGE = """\
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
:root {
|
||||
color-scheme: light dark;
|
||||
}
|
||||
</style>
|
||||
<title>Error response</title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -804,6 +809,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
|
|||
r.append('<html lang="en">')
|
||||
r.append('<head>')
|
||||
r.append(f'<meta charset="{enc}">')
|
||||
r.append('<style type="text/css">\n:root {\ncolor-scheme: light dark;\n}\n</style>')
|
||||
r.append(f'<title>{title}</title>\n</head>')
|
||||
r.append(f'<body>\n<h1>{title}</h1>')
|
||||
r.append('<hr>\n<ul>')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue