github.com/kotovmak/go-admin@v1.1.1/template/login/login.tmpl (about)

     1  {{define "login_theme1"}}
     2      <!DOCTYPE html>
     3      <!--[if lt IE 7]>
     4      <html class="no-js lt-ie9 lt-ie8 lt-ie7">
     5      <![endif]-->
     6      <!--[if IE 7]>
     7      <html class="no-js lt-ie9 lt-ie8">
     8      <![endif]-->
     9      <!--[if IE 8]>
    10      <html class="no-js lt-ie9">
    11      <![endif]-->
    12      <!--[if gt IE 8]><!-->
    13      <html class="no-js">
    14      <!--<![endif]-->
    15      <head>
    16          <meta charset="utf-8">
    17          <meta http-equiv="X-UA-Compatible" content="IE=edge">
    18          <title>{{.Title}}</title>
    19          <meta name="viewport" content="width=device-width, initial-scale=1">
    20  
    21          <link rel="stylesheet" href="{{link .CdnUrl .UrlPrefix "/assets/login/dist/all.min.css"}}">
    22  
    23          <!--[if lt IE 9]>
    24          <script src="{{link .CdnUrl .UrlPrefix "/assets/login/dist/respond.min.js"}}"></script>
    25          <![endif]-->
    26  
    27      </head>
    28      <body>
    29  
    30      <div class="container">
    31          <div class="row" style="margin-top: 80px;">
    32              <div class="col-md-4 col-md-offset-4">
    33                  <form action="##" onsubmit="return false" method="post" id="sign-up-form" class="fh5co-form animate-box"
    34                        data-animate-effect="fadeIn">
    35                      <h2>{{.Title}}</h2>
    36                      <div class="form-group">
    37                          <label for="username" class="sr-only">Username</label>
    38                          <input type="text" class="form-control" id="username" placeholder="{{lang "username"}}"
    39                                 autocomplete="off">
    40                      </div>
    41                      <div class="form-group">
    42                          <label for="password" class="sr-only">Password</label>
    43                          <input type="password" class="form-control" id="password" placeholder="{{lang "password"}}"
    44                                 autocomplete="off">
    45                      </div>
    46                      <div class="form-group">
    47                          <button class="btn btn-primary" onclick="submitData()">{{lang "login"}}</button>
    48                      </div>
    49                  </form>
    50              </div>
    51          </div>
    52          <div class="row" style="padding-top: 60px; clear: both;">
    53              <div class="col-md-12 text-center">
    54                  <p>
    55                      <small>&copy; All Rights Reserved. GoAdmin</small>
    56                  </p>
    57              </div>
    58          </div>
    59      </div>
    60  
    61      <div id="particles-js">
    62          <canvas class="particles-js-canvas-el" width="1606" height="1862" style="width: 100%; height: 100%;"></canvas>
    63      </div>
    64  
    65      <script src="{{link .CdnUrl .UrlPrefix "/assets/login/dist/all.min.js"}}"></script>
    66  
    67      <script>
    68          function submitData() {
    69              $.ajax({
    70                  dataType: 'json',
    71                  type: 'POST',
    72                  url: '{{.UrlPrefix}}/signin',
    73                  async: 'true',
    74                  data: {
    75                      'username': $("#username").val(),
    76                      'password': $("#password").val()
    77                  },
    78                  success: function (data) {
    79                      location.href = data.data.url
    80                  },
    81                  error: function (data) {
    82                      alert('{{lang "login fail"}}');
    83                  }
    84              });
    85          }
    86      </script>
    87  
    88      </body>
    89      </html>
    90  {{end}}