FireBase Demo

Developer
Size
3,081 Kb
Views
20,240

How do I make an firebase demo?

What is a firebase demo? How do you make a firebase demo? This script and codes were developed by Robert on 04 September 2022, Sunday.

FireBase Demo Previews

FireBase Demo - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>FireBase Demo</title> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='http://cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.3/animate.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html>
<head>
</head>
<body> <div class="container"> <div class="topBar"> <ul> <li class="corners" id="add"> <img src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTO2mXv6Imc6Mtqzj9T8L9_-bGqwH4jhQ3GreN9yXXlI2IMa7VneA" width="24px" alt="" /> </li> <li id="msg"> <input type='text' id='nameInput' placeholder='Enter UserName'> </li> <li class="corners ends" id="status"> <div class="light"></div> </li> </ul> </div> <div class="msgContainer"> <div id="messagesDiv"></div> </div> <div class="controlBar"> <ul> <li class="corners" id="add"> <img src="https://cdn4.iconfinder.com/data/icons/ionicons/512/icon-person-add-512.png" width="24px" alt="" /> </li> <li id="msg"> <input type='text' id='messageInput' placeholder='Message'> </li> <li class="corners ends" id="send"> <a href="#" onclick="addMsg();">Send</a> </li> </ul> </div> </div>
</body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdn.firebase.com/js/client/2.2.1/firebase.js'></script> <script src="js/index.js"></script>
</body>
</html>

FireBase Demo - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=Lato);
html, body { width: 100%; height: 98%; background-image: url("http://cu.t-ads.org/wp-content/uploads/2015/02/effective-communication.jpg");	background-repeat:no-repeat;	background-size: cover;
/* background-attachment: fixed; */ background-color: darkgray;
}
body { font-family: 'Lato', sans-serif;
}
ul { padding: 0px; margin: 0px;
}
li { list-style: none; float: left;
}
li:not(.ends) { border-right: 1px solid rgba(0,0,0,.05);
}
input { border: none; width: 320px; margin-left: 10px; height: 30px; font-size: .85em;
}
input:focus{ outline: none;
}
.container { width: 450px; height: 450px; margin-top: 20px;
/*position: relative; top: 50%; left:50%; transform: translate(-50%, -50%); */ border-radius: 10px; background: rgba(0,0,0,.05); padding: 0px; border: 1px solid rgba(0,0,0,.05); overflow: hidden;
}
.topBar, .controlBar {
/* position: fixed; bottom: 0px;*/ background: white; border-top-radius: 10px; height: 40px; padding: 5px;
}
.light { border-radius: 50%; background: lightgray; width: 10px; height: 10px; margin: 5px auto;
}
.lightOn { background: green;
}
.corners { width: 50px; font-size: 1.5em; text-align: center; color: darkgray;
}
.ends { margin-left: 5px; margin-top: 5px; font-size: 1em;
}
.msgContainer { height: 370px; padding: 10px; background: rgba(0,0,0,.8); color: white;
}

FireBase Demo - Script Codes JS Codes

var myDataRef = new Firebase('https://wnmpre3jtnc.firebaseio-demo.com/');
$('#messageInput').keypress(function(e) { if (e.keyCode == 13) { addMsg(); }
});
$('#nameInput').on('blur', function(){ console.log("Name: " + $(this).val().length); if($(this).val().length > 0){ $('.light').css({background: 'lime', border: '1px solid darkgray'}); }
});
function addMsg(e){ var name = $('#nameInput').val(); var text = $('#messageInput').val(); if(name.length > 0){ myDataRef.push({ name: name, text: text }); // ---------------------------- $('#messageInput').val(''); } else { $('#nameInput').focus(); }
}
function displayChatMessage(name, text) { $('<div/>').text(text).prepend($('<em/>').text(name + ': ')).appendTo($('#messagesDiv')); $('#messagesDiv')[0].scrollTop = $('#messagesDiv')[0].scrollHeight;
};
myDataRef.on('child_added', function(snapshot) { var message = snapshot.val(); displayChatMessage(message.name, message.text);
});
FireBase Demo - Script Codes
FireBase Demo - Script Codes
Home Page Home
Developer Robert
Username AgentRR007
Uploaded September 04, 2022
Rating 3
Size 3,081 Kb
Views 20,240
Do you need developer help for FireBase Demo?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Robert (AgentRR007) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!