github.com/google/go-safeweb@v0.0.0-20231219055052-64d8cfc90fbb/examples/sample-application/server/templates/index.tpl.html (about)

     1  <!--
     2  Copyright 2020 Google LLC
     3  Licensed under the Apache License, Version 2.0 (the "License");
     4  you may not use this file except in compliance with the License.
     5  You may obtain a copy of the License at
     6  	
     7  https://www.apache.org/licenses/LICENSE-2.0
     8  Unless required by applicable law or agreed to in writing, software
     9  distributed under the License is distributed on an "AS IS" BASIS,
    10  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11  See the License for the specific language governing permissions and
    12  limitations under the License.
    13  -->
    14  
    15  <!--
    16    This template is considered safe when used with the
    17    https://pkg.go.dev/github.com/google/safehtml/template package. According to
    18    the Threat Model
    19    (https://pkg.go.dev/github.com/google/safehtml/template#hdr-Threat_model), we
    20    trust that this template itself doesn't contain user generated data. When the
    21    template is executed with runtime data, contextual autosanitization is
    22    performed to prevent from code injection vulnerabilities.
    23  -->
    24  <html>
    25  
    26  <head>
    27      <title>Go Safe Web sample application</title>
    28      <link rel="stylesheet" href="/static/styles.css">
    29  
    30      <link rel="preconnect" href="https://fonts.gstatic.com">
    31      <link rel="stylesheet"
    32          href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap">
    33  </head>
    34  
    35  <body>
    36      <h2> Welcome to NoteKeeper </h2>
    37      <form action="/login" method="post">
    38          <div class="padded">
    39              <label for="username"><b>Username</b></label>
    40              <input type="text" placeholder="Username" name="username" required>
    41  
    42              <label for="password"><b>Password</b></label>
    43              <input type="password" placeholder="Password" name="password" required>
    44  
    45              <button class="full-width" type="submit">Login</button>
    46          </div>
    47      </form>
    48  </body>
    49  
    50  </html>