File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030app .cli .add_command (db_cli )
3131app .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
8888if __name__ == "__main__" :
8989 app .logger .warning (
You can’t perform that action at this time.
0 commit comments