UNPKG

3.56 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>jsreport</title>
6 <link rel="shortcut icon" href="/img/favicon.ico">
7 <meta name="author" content="Jan Blaha">
8 <meta name="description" content="jsreport - javascript business reports">
9 <style>
10 .login-page {
11 width: 360px;
12 padding: 8% 0 0;
13 margin: auto;
14 }
15
16 .form {
17 position: relative;
18 z-index: 1;
19 background: #FFFFFF;
20 max-width: 360px;
21 margin: 0 auto 100px;
22 padding: 45px;
23 text-align: center;
24 box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
25 }
26
27 .form input {
28 font-family: "Roboto", sans-serif;
29 outline: 0;
30 background: #f2f2f2;
31 width: 100%;
32 border: 0;
33 margin: 0 0 15px;
34 padding: 15px;
35 box-sizing: border-box;
36 font-size: 14px;
37 }
38
39 .form button {
40 font-family: "Roboto", sans-serif;
41 text-transform: uppercase;
42 outline: 0;
43 background: #1C97EA;
44 width: 100%;
45 border: 0;
46 padding: 15px;
47 color: #FFFFFF;
48 font-size: 14px;
49 cursor: pointer;
50 }
51
52 .form button:hover, .form button:active, .form button:focus {
53 background: #007ACC;
54 }
55
56 h1 {
57 font-family: "Roboto", sans-serif;
58 font-weight: normal;
59 margin-top: 0px;
60 color: #007ACC;
61 font-size: 24px;
62 }
63
64 body {
65 background: #1C97EA; /* fallback for old browsers */
66 background: linear-gradient(to left, #1C97EA, #007ACC);
67 font-family: "Roboto", sans-serif;
68 }
69 </style>
70 </head>
71 <body>
72 <div class="login-page">
73 <div class="form">
74 <h1>jsreport</h1>
75 <form class="login-form" id="loginForm" method="POST">
76 <input type="text" id="username" name="username" placeholder="username" />
77 <input type="password" name="password" type="password" placeholder="password" />
78
79 <% if (viewModel.login) { %>
80 <div class="form-group" style="color: red;">
81 <strong><%= viewModel.login %></strong>
82 </div>
83 <% } %>
84
85 <button>login</button>
86 </form>
87 </div>
88 </div>
89 <script>
90 var form = document.getElementById("loginForm");
91 if (window.location.pathname.lastIndexOf("login", 0) === 0) {
92 form.action = window.location.pathname + window.location.search;
93 }
94 else {
95 if (window.location.search.indexOf("returnUrl") === -1) {
96 form.action = "<%= options.appPath %>login?returnUrl=" + encodeURIComponent(window.location.pathname + window.location.hash + window.location.search);
97 } else {
98 form.action = "<%= options.appPath %>login" + window.location.search;
99 }
100 }
101 </script>
102 </body>
103</html>