Skip to content

Commit 18e4c45

Browse files
committed
fix
1 parent 635eb2e commit 18e4c45

1 file changed

Lines changed: 54 additions & 54 deletions

File tree

starter.py

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -30,60 +30,60 @@
3030
app.cli.add_command(db_cli)
3131
app.cli.add_command(plugin_cli)
3232

33-
34-
@app.route("/")
35-
def slogan():
36-
return """
37-
<style type="text/css">
38-
* {
39-
padding: 0;
40-
margin: 0;
41-
}
42-
43-
div {
44-
padding: 4px 48px;
45-
}
46-
47-
a {
48-
color: black;
49-
cursor: pointer;
50-
text-decoration: none
51-
}
52-
53-
a:hover {
54-
text-decoration: None;
55-
}
56-
57-
body {
58-
background: #fff;
59-
font-family:
60-
"Century Gothic", "Microsoft yahei";
61-
color: #333;
62-
font-size: 18px;
63-
}
64-
65-
h1 {
66-
font-size: 100px;
67-
font-weight: normal;
68-
margin-bottom: 12px;
69-
}
70-
71-
p {
72-
line-height: 1.6em;
73-
font-size: 42px
74-
}
75-
</style>
76-
<div style="padding: 24px 48px;">
77-
<p>
78-
<a href="https://www.talelin.com" target="_Blank">Lin</a>
79-
<br />
80-
<span style="font-size:30px">
81-
<a href="/apidoc/redoc">心上无垢</a>,<a href="/apidoc/swagger">林间有风</a>。
82-
</span>
83-
</p>
84-
</div>
85-
"""
86-
33+
if app.config.get("ENV") != "production":
34+
@app.route("/")
35+
def slogan():
36+
return """
37+
<style type="text/css">
38+
* {
39+
padding: 0;
40+
margin: 0;
41+
}
42+
43+
div {
44+
padding: 4px 48px;
45+
}
46+
47+
a {
48+
color: black;
49+
cursor: pointer;
50+
text-decoration: none
51+
}
52+
53+
a:hover {
54+
text-decoration: None;
55+
}
56+
57+
body {
58+
background: #fff;
59+
font-family:
60+
"Century Gothic", "Microsoft yahei";
61+
color: #333;
62+
font-size: 18px;
63+
}
64+
65+
h1 {
66+
font-size: 100px;
67+
font-weight: normal;
68+
margin-bottom: 12px;
69+
}
70+
71+
p {
72+
line-height: 1.6em;
73+
font-size: 42px
74+
}
75+
</style>
76+
<div style="padding: 24px 48px;">
77+
<p>
78+
<a href="https://www.talelin.com" target="_Blank">Lin</a>
79+
<br />
80+
<span style="font-size:30px">
81+
<a href="/apidoc/redoc">心上无垢</a>,<a href="/apidoc/swagger">林间有风</a>。
82+
</span>
83+
</p>
84+
</div>
85+
"""
86+
8787

8888
if __name__ == "__main__":
8989
app.logger.warning(

0 commit comments

Comments
 (0)