Improve UI styles

This commit is contained in:
Nur Muhammad
2022-07-05 17:42:13 +08:00
parent e1eb461cbb
commit b16bf4a5e2
2 changed files with 110 additions and 16 deletions

View File

@@ -2,6 +2,44 @@
<html>
<head>
<title>Whatsapp API by Ngekoding</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- This parts is optional, just for improve the styles -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Montserrat', sans-serif;
padding: 20px;
}
#app {
max-width: 500px;
margin: 20px auto;
}
#qrcode {
display: none; /* Showed when qr code received */
width: 100%;
margin: 10px 0;
border: 1px solid #efefef;
border-radius: 4px;
}
ul.logs {
max-height: 150px;
padding: 15px 15px 15px 30px;
margin-top: 5px;
border-radius: 4px;
overflow-y: auto;
background: #efefef;
color: #666;
font-size: 14px;
}
ul.logs li:first-child {
color: green;
}
</style>
</head>
<body>
@@ -20,7 +58,7 @@
var socket = io();
socket.on('message', function(msg) {
$('.logs').append($('<li>').text(msg));
$('.logs').prepend($('<li>').text(msg));
});
socket.on('qr', function(src) {