eg/tryhy: add server_sofware to welcome message
This commit is contained in:
parent
b099925eb2
commit
68891f5d32
@ -25,7 +25,10 @@ $(document).ready(function(){
|
|||||||
animateScroll:true,
|
animateScroll:true,
|
||||||
promptHistory:true,
|
promptHistory:true,
|
||||||
autofocus:true,
|
autofocus:true,
|
||||||
welcomeMessage: 'hy ({hy_version})'.supplant({hy_version: hy_version})
|
welcomeMessage: 'hy ({hy_version}) [{server_software}]'.supplant({
|
||||||
|
hy_version: hy_version,
|
||||||
|
server_software: server_software
|
||||||
|
})
|
||||||
});
|
});
|
||||||
console.promptText('(+ 41 1)');
|
console.promptText('(+ 41 1)');
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
(import [sys]
|
(import [os]
|
||||||
|
[sys]
|
||||||
[StringIO [StringIO]]
|
[StringIO [StringIO]]
|
||||||
[json]
|
[json]
|
||||||
[hy.cmdline [HyREPL]]
|
[hy.cmdline [HyREPL]]
|
||||||
@ -22,7 +23,8 @@
|
|||||||
|
|
||||||
(with-decorator (kwapply (app.route "/") {"methods" ["GET"]})
|
(with-decorator (kwapply (app.route "/") {"methods" ["GET"]})
|
||||||
(fn []
|
(fn []
|
||||||
(kwapply (render_template "index.html") {"hy_version" hy.__version__})
|
(kwapply (render_template "index.html")
|
||||||
|
{"hy_version" hy.__version__ "server_software" (get os.environ "SERVER_SOFTWARE")})
|
||||||
))
|
))
|
||||||
|
|
||||||
(with-decorator (kwapply (app.route "/eval") {"methods" ["POST"]})
|
(with-decorator (kwapply (app.route "/eval") {"methods" ["POST"]})
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<script type="text/javascript" src="js/repl.js"></script>
|
<script type="text/javascript" src="js/repl.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var hy_version = '{{hy_version}}';
|
var hy_version = '{{hy_version}}';
|
||||||
|
var server_software = '{{server_software}}';
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" type="text/css" href="css/style.css">
|
<link rel="stylesheet" type="text/css" href="css/style.css">
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
Reference in New Issue
Block a user