login.ejs 4.12 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>logined</title>

    <link rel="stylesheet" href="stylesheets/bootstrap.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@700&display=swap" rel="stylesheet">

    <style>
        img{
            max-width: 100%;
            height: 100% !important;
        }
        h1{font-family: 'Noto Sans KR', sans-serif;}
        h4{font-family: 'Noto Sans KR', sans-serif;}
        h2{font-family: 'Noto Sans KR', sans-serif;}
        h3{font-family: 'Noto Sans KR', sans-serif;}
        h5{font-family: 'Noto Sans KR', sans-serif;}
        .middle{
            display: inline-block;
            vertical-align: middle;
        }
    </style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <a class="navbar-brand" href="/"><img src="images/home.png" width="40" height="40" alt="">
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <a class="navbar-brand" href="/" ><strong>Home</strong></a>
        <ul class="navbar-nav mr-auto mt-2 mt-lg-0">

            <li class="nav-item active">
                <a class="nav-link" style="color:#ffffff" href="/" onclick="signOut();">Logout<span class="sr-only">(current)</span></a>
            </li>

        </ul>
    </div>
</nav>
<div class="pricing-header px-3 py-1 pt-md-3 pb-md-1 mx-auto text-center">
    <h3 class="display-6 font-weight-bold" >Signup</h3>
</div>


<hr class="my-2" >
<section id="carousel-1">
    <div class="row">
        <div class="col-2"></div>
        <div class="col-8">
            <hr class="my-4" style="background-color: white">
            <form method="post">
                <div class="form-group ">
                    <label for="id_input">닉네임을 입력하세요</label>
                    <input type="text" class="form-control form-control-lg" name="nickname" aria-describedby="idHelp" placeholder="ID">
                    <small id="idHelp" class="form-text text-muted">중복이 허용되지 않습니다.</small>
                </div>
                <hr class="my-3" style="background-color: white">
                <div class="form-group">
                    <label for="age_input">나이를 입력하세요</label>
                    <input class="form-control form-control-lg" type="number" name="age"placeholder="Age">
                </div>
                <hr class="my-3" style="background-color: white">

                <label for="gender" class="form-label ">성별을 입력하세요</label>
                <select class="form-select form-select-lg" id="gender"  name="gender" required>
                    <option selected disabled value="">Choose...</option>
                    <option value="male">Male</option>
                    <option value="female">Female</option>
                </select>

                <hr class="my-4" style="background-color: white">
                <button type="submit" style="float:right" class="btn btn-primary btn-lg" id="please">Submit</button>

            </form>
        </div>
        <div class="col-2"></div>
    </div>
</section>

<a href="/logout" onclick="signOut();">Sign Out</a>
<%if (message=='same nickname'){%>
    <script type="text/javascript">

        alert("입력하신 NICKNAME은 사용하지 못합니다." +
            "다른 NICKNAME을 입력하여 주세요");

    </script>
<%}%>

</body>
<script>
    function signOut() {
        var auth2 = gapi.auth2.getAuthInstance();
        auth2.signOut().then(function () {
            console.log('User signed out.');
        });
    }
    function signOut() {
        var auth2 = gapi.auth2.getAuthInstance();
        auth2.signOut().then(function () {
            console.log('User signed out.');
        });
    }
</script>
<script src="javascripts/bootstrap.js"></script>
</html>