mirror of
https://github.com/cheveguerra/whatsapp-api-tutorial.git
synced 2026-04-17 19:36:59 +00:00
Improve UI styles
This commit is contained in:
40
index.html
40
index.html
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user