summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authortimb <timb@mb.home>2010-01-15 17:33:12 -0800
committertimb <timb@mb.home>2010-01-15 17:33:12 -0800
commit420353a562942a7b4045464cc3981ec18bdabe33 (patch)
tree5aa4e4faf12654e08bfe4a6030e067fab2a2f88e /template
parent5e46c68c3b3ccd164772f3879890df0173825835 (diff)
added login form to banner
Diffstat (limited to 'template')
-rwxr-xr-xtemplate/banner.st4
-rw-r--r--template/form_login.st40
-rwxr-xr-xtemplate/head.st3
3 files changed, 46 insertions, 1 deletions
diff --git a/template/banner.st b/template/banner.st
index 3998ff0..ee1ba77 100755
--- a/template/banner.st
+++ b/template/banner.st
@@ -20,10 +20,12 @@
</div>
</div>
</div>
+ $if(user_nick)$
<div id="logout7" class="white">
- <div align="center">$if(user_nick)$ <a href="/logout">Logout</a> $else$ <a href="/" class="btnav">Log In</a>$endif$
+ <div align="center"> <a href="/logout">Logout</a>
</div>
</div>
+ $else$ $form_login()$ $endif$
<div align="center"><br />
</div>
</div>
diff --git a/template/form_login.st b/template/form_login.st
new file mode 100644
index 0000000..b90834f
--- /dev/null
+++ b/template/form_login.st
@@ -0,0 +1,40 @@
+<div id="login-container">
+ <div class="topnav"> <a href="login" class="signin"><span>Sign in</span></a> </div>
+ <fieldset id="signin_menu">
+ <form onsubmit="return false">
+ <label for="username">Username or email</label>
+ <input id="nickInput" name="nickInput" value="" title="username" tabindex="4" type="text">
+ </p>
+ <p>
+ <label for="password">Password</label>
+ <input id="passwordInput" name="passwordInput" value="" title="password" tabindex="5" type="password">
+ </p>
+ <p class="remember">
+ <input id="loginSubmit" value="Sign in" tabindex="6" type="submit">
+ </p>
+ </form>
+ </fieldset>
+</div>
+<script src="/static/home.js" type="text/javascript"></script>
+<script type="text/javascript">
+ jQuery(document).ready(function() {
+
+ initHome();
+
+ jQuery(".signin").click(function(e) {
+ e.preventDefault();
+ jQuery("fieldset#signin_menu").toggle();
+ jQuery(".signin").toggleClass("menu-open");
+ });
+
+ jQuery("fieldset#signin_menu").mouseup(function() {
+ return false
+ });
+ jQuery(document).mouseup(function(e) {
+ if(jQuery(e.target).parent("a.signin").length==0) {
+ jQuery(".signin").removeClass("menu-open");
+ jQuery("fieldset#signin_menu").hide();
+ }
+ });
+});
+</script> \ No newline at end of file
diff --git a/template/head.st b/template/head.st
index d46687f..3fa0dce 100755
--- a/template/head.st
+++ b/template/head.st
@@ -7,6 +7,9 @@
<link rel="stylesheet" type="text/css" href="/static/reset.css">
<link rel="stylesheet" type="text/css" href="/static/header.css">
+$if(!user_nick)$
+<link href="/static/form_login/front.css" media="screen, projection" rel="stylesheet" type="text/css">
+$endif$
<link rel="shortcut icon" href="/static/favicon.ico">
<script type="text/javascript">