{"size": 1086, "ext": "js", "max_stars_repo_path": "public/js/signin.js", "max_stars_repo_name": "bimaaul/rpl1920", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/js/signin.js", "max_issues_repo_name": "bimaaul/rpl1920", "max_issues_repo_issues_event_min_datetime": "2021-02-02T17:59:03.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T03:18:16.000Z", "max_forks_repo_path": "public/js/signin.js", "max_forks_repo_name": "bimaaul/rpl1920", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 25.2558139535, "max_line_length": 70, "alphanum_fraction": 0.6887661142}
const inputs = document.querySelectorAll(".input");
const x = document.getElementById("login");
const y = document.getElementById("register");
const z = document.getElementById("btn");
var btnContainer = document.getElementById("button-box");
var btns = btnContainer.getElementsByClassName("toggle-btn");

for (var i = 0; i < btns.length; i++) {
	btns[i].addEventListener("click", function() {
	  var current = document.getElementsByClassName("active");
	  current[0].className = current[0].className.replace(" active", "");
	  this.className += " active";
	});
}

function addcl(){
	let parent = this.parentNode.parentNode;
	parent.classList.add("focus");
}

function remcl(){
	let parent = this.parentNode.parentNode;
	if(this.value == ""){
		parent.classList.remove("focus");
	}
}

inputs.forEach(input => {
	input.addEventListener("focus", addcl);
	input.addEventListener("blur", remcl);
});

function register() {
		x.style.left = "-400px";
	y.style.left = "50px";
	z.style.left ="110px"
}

function login() {
	x.style.left = "50px";
	y.style.left = "450px";
	z.style.left ="0px"
}