diff --git a/public/css/default.css b/public/css/default.css index 0b178a7..34bcd93 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -39,7 +39,7 @@ body, html { /* Messages */ #chat li { white-space: pre; - padding: 2px 10px; + padding: 2px 15px; } /* Message types */ @@ -47,7 +47,8 @@ body, html { #chat i { font-style: normal; } -#chat i.info { color: #7777ff; } +#chat i.motd { color: #99FF99; display:inline-block; line-height: 12px !important; } +#chat i.info { color: #999999; } #chat i.server { color: #999999; } #chat i.error { color: #ff7777; } #chat i.message { color: #eeeeee; } @@ -61,7 +62,7 @@ body, html { left:0; position: absolute; - height:40px; + height:30px; } #input { @@ -75,6 +76,6 @@ body, html { padding: 5px 5px 5px 15px; - color: #00dd00; + color: #FFFFFF; background-color:#141414; } \ No newline at end of file diff --git a/public/js/cryptalk_modules/cryptalk.js b/public/js/cryptalk_modules/cryptalk.js index 4eab40d..d56c3f6 100644 --- a/public/js/cryptalk_modules/cryptalk.js +++ b/public/js/cryptalk_modules/cryptalk.js @@ -42,12 +42,11 @@ define('cryptalk', { // Chat related commands commands = { help: function () { - post('info', templates.help); + post('motd', templates.help); }, clear: function () { components.chat.html(''); - components.input[0].value = ''; }, leave: function () { @@ -133,6 +132,10 @@ define('cryptalk', { // Execute command handler commands[command](payload); + + // Clear input field + components.input[0].value = ''; + } else /* Handle ordinary message */ { // Make sure that the users has joined a room if (!room) { @@ -200,7 +203,7 @@ define('cryptalk', { }); // Post the help/welcome message - post('info', templates.help, true); + post('motd', templates.motd, true); // It's possible to provide room and key using the hashtag. // The room and key is then seperated by semicolon (room:key). diff --git a/public/js/cryptalk_modules/templates.js b/public/js/cryptalk_modules/templates.js index 1aa9d59..370dc1d 100644 --- a/public/js/cryptalk_modules/templates.js +++ b/public/js/cryptalk_modules/templates.js @@ -1,32 +1,45 @@ // The templating function only supports variables. // Define a variable as so: {variable_name} define({ + motd: '\n\n' + + '▄████▄ ██▀███ ▓██ ██▓ ██▓███ ▄▄▄█████▓ ▄▄▄ ██▓ ██ ▄█▀ \n' + + '▒██▀ ▀█ ▓██ ▒ ██▒▒██ ██▒▓██░ ██▒▓ ██▒ ▓▒▒████▄ ▓██▒ ██▄█▒ \n'+ + '▒▓█ ▄ ▓██ ░▄█ ▒ ▒██ ██░▓██░ ██▓▒▒ ▓██░ ▒░▒██ ▀█▄ ▒██░ ▓███▄░ \n'+ + '▒▓▓▄ ▄██▒▒██▀▀█▄ ░ ▐██▓░▒██▄█▓▒ ▒░ ▓██▓ ░ ░██▄▄▄▄██ ▒██░ ▓██ █▄ \n'+ + '▒ ▓███▀ ░░██▓ ▒██▒ ░ ██▒▓░▒██▒ ░ ░ ▒██▒ ░ ▓█ ▓██▒░██████▒▒██▒ █▄ \n'+ + '░ ░▒ ▒ ░░ ▒▓ ░▒▓░ ██▒▒▒ ▒▓▒░ ░ ░ ▒ ░░ ▒▒ ▓▒█░░ ▒░▓ ░▒ ▒▒ ▓▒ \n'+ + ' ░ ▒ ░▒ ░ ▒░▓██ ░▒░ ░▒ ░ ░ ▒ ▒▒ ░░ ░ ▒ ░░ ░▒ ▒░ \n'+ + '░ ░░ ░ ▒ ▒ ░░ ░░ ░ ░ ▒ ░ ░ ░ ░░ ░ \n'+ + '░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ \n'+ + '░ ░ ░ \n'+ + ' https://github.com/hexagon/cryptalk \n'+ + ' \n'+ + ' Tip of the day: /help \n'+ + ' \n'+ + '----------------------------------------------------------------------\n', + help: '' + '