Files
louiscklaw 6c60a73f30 update,
2025-01-31 19:15:17 +08:00

163 lines
8.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Yummy Everywhere</title>
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="../css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link href="../css/style.css" type="text/css" rel="stylesheet" />
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="../js/materialize.js"></script>
<script src="main.js"></script>
</head>
<script>
$(document).ready(function(){
$("#actionComment").click(function(){
var foodComment = $("#foodComment").val();
var foodRato =$("#foodRato").val();
console.log(foodComment);
if(foodComment.length=="" || foodRato==""){
$("#commentAlert").html("<div class='row'><div class='col s12'><div class='card-panel red lighten-1 left' style=' width: 100%; line-height: 0px; text-align: left'><font size='2' class='white-text'>Comment and Rato is required</font></div></div></div>");
return;
}
if(foodRato>5|| foodRato<0)
return;
var date = new Date();
console.log(date.getDate()+ " " + date.getDay()+ " " + date.getMonth());
var curDate = date.getFullYear() + "-" + (date.getMonth()+1)+ "-"+ date.getDate();
$("#comment").append("<div class='card horizontal'><div class='card-stacked'><div class='card-content'><h6>"+sessionStorage.getItem("username")+" said:</h6>"+foodComment+" ("+foodRato+"/5.0)<br><br>Date: "+curDate+"</div></div></div>");
$("#foodComment").val("");
$("#foodRato").val("");
});
})
</script>
<body>
<nav>
<div class="nav-wrapper container">
<a id="logo-container" href="../index.html" class="brand-logo ">Yummy Everywhere</a>
<ul class="right">
</ul>
</div>
</nav>
<ul id="slide-out" class="sidenav">
</ul>
<!--- Fav Box -->
<div id="modal_box" class="bottom-sheet">
</div>
<div id="index-banner" class="parallax-container">
<div class="parallax" style="height: 10px"><img src="../images/TamJai-1.jpg"></div>
</div>
<div class="container" style="margin-top: 50px">
<div class="row">
<div class="col s12">
<div class="card horizontal">
<div class="card-stacked">
<div class="card-content">
<p id="foodRestaurantLocation"><h4>TamJai SamGor</h4>Open Hour: 11:00 AM - 10:00 PM<br>Tel: 21805650<br>Address: Portion A, Shop 15, G/F, Kai Tin Tower, 55-63 Kai Tin Road, Lam Tin, Hong Kong<br>
<iframe src="https://www.google.com/maps/embed?pb=!1m16!1m12!1m3!1d3691.174919978861!2d114.23165941537265!3d22.30922344820756!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!2m1!1s%20Portion%20A%2C%20Shop%2015%2C%20G%2FF%2C%20Kai%20Tin%20Tower%2C%2055-63%20Kai%20Tin%20Road%2C%20Lam%20Tin%2C%20Hong%20Kong!5e0!3m2!1szh-TW!2shk!4v1570883956564!5m2!1szh-TW!2shk" frameborder="0" style="border:0;" width="100%" height=300px></iframe>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="card horizontal">
<div class="card-stacked">
<div class="card-content">
Comment<br>
<div id="comment">
</div>
<div class="card">
<div class="card-content">
<div class="row">
<div class="col s12">
<div class="row">
<div id="commentAlert"></div>
<div class="input-field col s12">
Input Your comment:<br>
<textarea id="foodComment" class="materialize-textarea" placeholder="Comment..."></textarea>
</div>
<div class="input-field col s3 m3">
Rato:<input id="foodRato" type="number" class="validate" min="0.0" max="5.0">/5.0
</div>
</div>
<button class="btn waves-effect waves-light" type="submit" id="actionComment">Submit
<i class="material-icons right">send</i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="../search.html" class="waves-effect waves-light btn" id="btnBack">Back</a>
</div>
<!-- Modal Structure -->
<div id="modal1" class="modal" style="width: 400px;">
<div class="row center-align">
<div class="col s12 modal-content">
<span class="flow-text" id="loginInfo">
<div id="loginAlert"></div>
<h4 style="border-bottom: 1px solid #ebebeb; height: 50px;">LOGIN</h4>
<div class="input-field col s12">
<i class="material-icons prefix">account_circle</i>
<input id="loginEmail" type="text" class="validate" required>
<label for="loginEmail">Email</label>
</div><br>
<div class="input-field col s12">
<i class="material-icons prefix">vpn_key</i>
<input id="loginPwd" type="password" class="validate" required>
<label for="loginPwd">Password</label>
</div>
<a class="waves-effect waves-light btn col s10 offset-s1" style="margin-top: 50px" id="btnSubmitLogin">LOGIN</a>
<h6 class=" col s12">Don"t have an account? <a href="#" id="createAccount">Sign up here</a></h6>
</span>
<span class="flow-text" id="createInfo">
<div id="pwdAlert"></div>
<h4 style='border-bottom: 1px solid #ebebeb; height: 50px;'>REGISTER</h4><div class='input-field col s6'><input id='first_name' type='text' class='validate' required><label for='first_name'>First Name</label></div><div class='input-field col s6'><input id='last_name' type='text' class='validate' required><label for='last_name'>Last Name</label></div><div class='input-field col s12'><input id='regEmail' type='email' class='validate' required><label for='regEmail'>Email</label></div><div class='input-field col s12'><input id='regPassword' type='password' class='validate' required><label for='regPassword'>Password</label></div><div class='input-field col s12'><input id='checkPassword' type='password' class='validate' required><label for='checkPassword'>Confirm Password</label></div><a class='waves-effect waves-light btn col s10 offset-s1' style='margin-top: 50px' id='btnSubmitRegister'>REGISTER</a><h6 class='col s12' id="changeLogin">You have an account? <a href='#' id='loginAccount'>Login</a></h6>
</span>
</div>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a>
</div>
</div>
<footer class="page-footer teal">
<div class="container">
<div class="row">
<div class="col l3 s12">
<h5 class="white-text">Connect</h5>
<ul>
<li><a class="white-text" href="../aboutus.html">About Us</a></li>
<li><a class="white-text" href="../userGuide.html">User Guide</a></li>
</ul>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">Copyright © 2019 InnoTech HK Inc. All rights reserved</div>
</div>
</footer>
<!-- Scripts-->
</body>
</html>