mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Add and copy 404.html to the generated docs
This commit is contained in:
parent
d5ba259d4e
commit
9787fb8c46
|
@ -218,6 +218,7 @@ def generate_documentation(scheme_file):
|
|||
original_paths = {
|
||||
'css': 'css/docs.css',
|
||||
'arrow': 'img/arrow.svg',
|
||||
'404': '404.html',
|
||||
'index_all': 'index.html',
|
||||
'index_types': 'types/index.html',
|
||||
'index_methods': 'methods/index.html',
|
||||
|
@ -540,8 +541,10 @@ def generate_documentation(scheme_file):
|
|||
'constructor_urls': constructor_urls
|
||||
}
|
||||
|
||||
with open('../res/core.html') as infile:
|
||||
with open(original_paths['index_all'], 'w') as outfile:
|
||||
shutil.copy('../res/404.html', original_paths['404'])
|
||||
|
||||
with open('../res/core.html') as infile,\
|
||||
open(original_paths['index_all'], 'w') as outfile:
|
||||
text = infile.read()
|
||||
for key, value in replace_dict.items():
|
||||
text = text.replace('{' + key + '}', str(value))
|
||||
|
|
44
docs/res/404.html
Normal file
44
docs/res/404.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>Oopsie! | Telethon</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #f0f4f8;
|
||||
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
div {
|
||||
width: 560px;
|
||||
margin: 5em auto;
|
||||
padding: 50px;
|
||||
background-color: #fff;
|
||||
border-radius: 1em;
|
||||
}
|
||||
a:link, a:visited {
|
||||
color: #38488f;
|
||||
text-decoration: none;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
body {
|
||||
background-color: #fff;
|
||||
}
|
||||
div {
|
||||
width: auto;
|
||||
margin: 0 auto;
|
||||
border-radius: 0;
|
||||
padding: 1em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1>You seem a bit lost…</h1>
|
||||
<p>You seem to be lost! Don't worry, that's just Telegram's API being
|
||||
itself. Shall we go back to the <a href="index.html">Main Page</a>?</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user