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,
|
||||
promptHistory: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)');
|
||||
});
|
||||
|
@ -1,4 +1,5 @@
|
||||
(import [sys]
|
||||
(import [os]
|
||||
[sys]
|
||||
[StringIO [StringIO]]
|
||||
[json]
|
||||
[hy.cmdline [HyREPL]]
|
||||
@ -22,7 +23,8 @@
|
||||
|
||||
(with-decorator (kwapply (app.route "/") {"methods" ["GET"]})
|
||||
(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"]})
|
||||
|
@ -8,6 +8,7 @@
|
||||
<script type="text/javascript" src="js/repl.js"></script>
|
||||
<script type="text/javascript">
|
||||
var hy_version = '{{hy_version}}';
|
||||
var server_software = '{{server_software}}';
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css">
|
||||
</head>
|
||||
|
Loading…
Reference in New Issue
Block a user