-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
174 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
html, | ||
body { | ||
height: 100%; | ||
} | ||
|
||
body { | ||
display: -ms-flexbox; | ||
display: -webkit-box; | ||
display: flex; | ||
-ms-flex-align: center; | ||
-ms-flex-pack: center; | ||
-webkit-box-align: center; | ||
align-items: center; | ||
-webkit-box-pack: center; | ||
justify-content: center; | ||
padding-top: 40px; | ||
padding-bottom: 40px; | ||
background-color: #f5f5f5; | ||
} | ||
|
||
.form-signin { | ||
width: 100%; | ||
max-width: 330px; | ||
padding: 15px; | ||
margin: 0 auto; | ||
} | ||
.form-signin .checkbox { | ||
font-weight: 400; | ||
} | ||
.form-signin .form-control { | ||
position: relative; | ||
box-sizing: border-box; | ||
height: auto; | ||
padding: 10px; | ||
font-size: 16px; | ||
} | ||
.form-signin .form-control:focus { | ||
z-index: 2; | ||
} | ||
.form-signin input[type="email"] { | ||
margin-bottom: -1px; | ||
border-bottom-right-radius: 0; | ||
border-bottom-left-radius: 0; | ||
} | ||
.form-signin input[type="password"] { | ||
margin-bottom: 10px; | ||
border-top-left-radius: 0; | ||
border-top-right-radius: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package templates | ||
|
||
import ( | ||
"html/template" | ||
"net/http" | ||
|
||
"github.com/gin-gonic/gin" | ||
) | ||
|
||
var tmpl *template.Template | ||
|
||
type todo struct { | ||
Item string | ||
Done bool | ||
} | ||
|
||
type PageData struct { | ||
Title string | ||
Todos []todo | ||
} | ||
|
||
func LoginPage(context *gin.Context) { | ||
|
||
context.HTML(http.StatusOK, "login.html", nil) | ||
|
||
} | ||
func RegisterPage(context *gin.Context) { | ||
|
||
context.HTML(http.StatusOK, "register.html", nil) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link href="css/bootstrap.min.css" rel="stylesheet"> | ||
<link href="css/signin.css" rel="stylesheet"> | ||
</head> | ||
<body class="text-center"> | ||
<form action="/login" method="post" class="form-signin"> | ||
<h1 class="h3 mb-3 font-weight-normal">Giriş</h1> | ||
<input type="inputUsername" name="Username" class="form-control" placeholder="Username" > | ||
<input type="inputPassword" name="password" class="form-control mt-1" placeholder="Şifre" required=""> | ||
<!-- <div class="checkbox mb-3"> | ||
<label> | ||
<input type="checkbox" value="remember-me"> Beni hatırla | ||
</label> | ||
</div>--> | ||
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit">Giriş</button> | ||
</form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<h2>Account Registration</h2><br> | ||
<ul> | ||
<li>usernames must contain only letters or numbers</li> | ||
<li>usernames must be longer than 4 characters but shorter than 51</li> | ||
<li>passwords must contain a uppercase letter, lowercase letter, number, and special character</li> | ||
<li>passwords must be greater than 11 characters but less than 60</li> | ||
</ul><br> | ||
|
||
<form action="/registerauth" method="POST"> | ||
<label for="username">Name:</label><br> | ||
<input type="text" id="username" name="username"><br> | ||
<label for="password">Password:</label><br> | ||
<input type="password" id="password" name="password"><br><br> | ||
<input type="submit" value="Submit"> | ||
</form> | ||
|
||
<br><br> | ||
{{if .}} | ||
{{.}} | ||
{{end}} | ||
|
||
</body> | ||
</html> |