...
 
Commits (7)
......@@ -9,7 +9,7 @@ body {
::-webkit-scrollbar-thumb {
background: #252525;
border-radius: 15%;
border-radius: 2px;
}
.contact-section {
......@@ -163,7 +163,7 @@ body {
}
.projects div {
border-radius: 5%;
border-radius: 15px;
padding: 5px;
}
......@@ -176,4 +176,4 @@ body {
.contact-form {
max-width: 700px;
}
\ No newline at end of file
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -9,7 +9,7 @@
<title>Home | Amano Team</title>
<link rel="stylesheet" href="css/spinner.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.9.0/css/all.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/mdb.min.css">
......@@ -400,11 +400,11 @@
<div class="row header-container contact-section">
<div class="col-md-6">
<h2 class="animated fadeIn mb-2 white-text">Contact us</h2>
<form class="text-center contact-form">
<form id="contact-form" class="text-center contact-form">
<div class="row">
<div class="col-md-6">
<div class="md-form">
<input name="name" id="name-input" type="text" class="md-textarea form-control red-text white-text"></input>
<input name="name" id="name-input" type="text" class="md-textarea form-control red-text white-text" required></input>
<label id="name-label" for="name-input">Your name</label>
</div>
</div>
......@@ -423,18 +423,15 @@
</div>
<div class="md-form">
<textarea name="text" id="message-input" type="text" class="md-textarea form-control white-text"></textarea>
<textarea name="text" id="message-input" type="text" class="md-textarea form-control white-text" required></textarea>
<label id="message-label" for="message-input">Your message</label>
</div>
<a class="btn btn-dark" id="submit">Send</a>
<button type="submit" class="btn btn-dark">Send</button>
<br>
<span id="submitted" class="white-text"></span>
</form>
</div>
<div class="col-md-6">
<script async src="https://comments.app/js/widget.js?2" data-comments-app-website="Yj-oyMO8" data-limit="4" data-height="330" data-colorful="1"></script>
</div>
</div>
</div>
......@@ -457,4 +454,4 @@
<script src="js/contact.js"></script>
</body>
</html>
\ No newline at end of file
</html>
......@@ -9,35 +9,26 @@ $("#name-input").keyup(function(event) {
$("#name-label").removeClass("red-text");
});
$("#submit").click(function(event) {
if ($("#name-input").val() === "") {
document.getElementById("submitted").innerHTML = "<b>Please fill in your name.</b>";
$("#name-label").addClass("red-text");
} else if ($("#message-input").val() === "") {
document.getElementById("submitted").innerHTML = "<b>Please type your message.</b>";
$("#message-label").removeClass("orange-text");
$("#message-label").addClass("red-text");
} else if ($("#message-input").val().length < 25) {
$("#contact-form").submit(function(event) {
event.preventDefault();
if ($("#message-input").val().length < 25) {
document.getElementById("submitted").innerHTML = "<b>Your message can't be shorter than 25 characters.</b>";
$("#message-label").removeClass("red-text");
$("#message-label").addClass("orange-text");
} else {
document.getElementById("submitted").firstChild.nodeValue = "sending...";
$.ajax(
{
type: "POST",
url: "https://api.amanoteam.ml/sendcontact/",
data: {
name: $("#name-input").val(),
username: $("#username-input").val(),
subject: $("#subject-input").val(),
text: $("#message-input").val(),
},
success: function(data) {
document.getElementById("submitted").firstChild.nodeValue = data;
}
}
);
}
document.getElementById("submitted").firstChild.nodeValue = "sending...";
$.ajax({
type: "POST",
url: "https://api.amanoteam.ml/sendcontact/",
data: {
name: $("#name-input").val(),
username: $("#username-input").val(),
subject: $("#subject-input").val(),
text: $("#message-input").val(),
},
success: function(data) {
document.getElementById("submitted").firstChild.nodeValue = data;
}
});
}
);
});
\ No newline at end of file
......@@ -35,7 +35,7 @@ window.onload = function() {
});
$(".navbar-toggler-icon").click(function() {
if ($("#mainNav").hasClass("mobile-navbar")) {
if ($("div.navbar-collapse").hasClass("show")) {
$("#mainNav").removeClass("mobile-navbar");
} else {
$("#mainNav").addClass("mobile-navbar");
......
This source diff could not be displayed because it is too large. You can view the blob instead.