Skip to content

Node.js based forum software built for the modern web

enabling twitter login

Julian Lam57080761375a
diff --git a/.gitignore b/.gitignore
index e081d8f481..714b58c685 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ node_modules/
sftp-config.json
public/config.json
config.js
+public/css/style.css
diff --git a/public/css/style.css b/public/css/style.css
deleted file mode 100644
index 6f23061dd5..0000000000
--- a/public/css/style.css
+++ /dev/null
@@ -1,122 +0,0 @@
-@media (min-width: 979px) {
- body {
- padding-top: 60px;
- }
-}
-#notification_window {
- position: absolute;
- right: 20px;
- top: 80px;
- width: 300px;
- height: 0px;
-}
-.toaster-alert {
- cursor: pointer;
-}
-footer.footer {
- color: #555;
- text-align: center;
-}
-footer.footer a {
- color: #222;
-}
-#post_window {
- width: 100%;
- position: absolute;
- height: 350px;
- left: 0px;
- bottom: 0px;
- background: white;
-}
-#post_window input {
- width: 100%;
- height: 30px;
- padding: 5px;
-}
-#post_window textarea {
- width: 100%;
- background: #222;
- height: 220px;
- resize: none;
- border-radius: 0;
- border: 1px solid #111;
- font-size: 16px;
- color: #bebebe;
- outline: 0;
-}
-#post_window textarea:focus {
- outline: 0;
- border: none !important;
- box-shadow: none !important;
-}
-#post_window .post-title-container {
- opacity: 0.8;
- height: 50px;
-}
-#post_window .post-content-container {
- opacity: 0.8;
- background: #000;
- width: 100%;
- height: 300px;
-}
-.topic-container {
- list-style-type: none;
- padding: 0;
- margin: 0;
- border: 1px solid #eee;
- margin-top: 50px;
-}
-.topic-container a:nth-child(odd) li.topic-row {
- background-color: #fdfdfd;
-}
-.topic-container a:nth-child(even) li.topic-row {
- background-color: #fff;
-}
-.topic-container li.topic-row {
- cursor: pointer;
- border-bottom: 1px solid #eee;
- padding: 10px;
-}
-.topic-container li:last-child {
- border-bottom: 0;
-}
-.topic-container li.topic-row:hover {
- background-color: #eee;
-}
-.post-container {
- list-style-type: none;
- padding: 0;
- margin: 0;
- border: 1px solid #eee;
-}
-.post-container li:last-child {
- border-bottom: 0;
-}
-.post-container li.post-row {
- cursor: pointer;
- border-bottom: 1px solid #eee;
- padding: 10px;
-}
-.post-container li.post-row:nth-child(odd) {
- background-color: #fdfdfd;
-}
-.post-container li.post-row:nth-child(even) {
- background-color: #fff;
-}
-.post-container li.post-row:hover {
- background-color: #eee;
-}
-#user_label img {
- border: 1px solid #999;
- margin-right: 8px;
- margin-top: -2px;
-}
-#user_label span {
- font-size: 12px;
- font-weight: bold;
-}
-#reply_title {
- font-size: 17px;
- padding-top: 14px;
- font-weight: 600;
-}
diff --git a/public/css/style.less b/public/css/style.less
index a36ece8fd8..06d0cda1e8 100644
--- a/public/css/style.less
+++ b/public/css/style.less
@@ -1,3 +1,14 @@
+.pointer {
+ cursor: pointer;
+ *cursor: hand;
+}
+
+.inline-block {
+ display: inline-block;
+ *display: inline;
+ zoom: 1;
+}
+
@media (min-width: 979px) {
body {
padding-top: 60px;
@@ -147,4 +158,14 @@ footer.footer {
font-size: 17px;
padding-top: 14px;
font-weight: 600;
+}
+
+.alt-logins {
+ margin: 0;
+ padding: 0;
+
+ li {
+ .inline-block;
+ .pointer;
+ }
}
\ No newline at end of file
diff --git a/public/images/twitter_login.png b/public/images/twitter_login.png
new file mode 100644
index 0000000000..c2822dc8e6
Binary files /dev/null and b/public/images/twitter_login.png differ
diff --git a/public/templates/login.tpl b/public/templates/login.tpl
index c430b90f17..8cf6aca923 100644
--- a/public/templates/login.tpl
+++ b/public/templates/login.tpl
@@ -1,13 +1,22 @@
<h1>Login</h1>
-<div class="well">
- <div class="alert alert-error" id="error" style="display:none">
- <button type="button" class="close" data-dismiss="alert">&times;</button>
- <strong>Failed Login Attempt</strong> <p></p>
- </div>
- <form method="post" action="/login">
- <label>Username</label><input type="text" placeholder="Enter Username" name="username" id="username" /><br />
- <label>Password</label><input type="password" placeholder="Enter Password" name="password" id="password" /><br />
- <button class="btn btn-primary" id="login" type="submit">Login</button> &nbsp;
- </form>
- <a href="/reset">Forgot Password?</a>
+<div class="row-fluid">
+ <div class="well span6">
+ <h4>Login via Username &amp; Password</h4>
+ <div class="alert alert-error" id="error" style="display:none">
+ <button type="button" class="close" data-dismiss="alert">&times;</button>
+ <strong>Failed Login Attempt</strong> <p></p>
+ </div>
+ <form method="post" action="/login">
+ <label>Username</label><input type="text" placeholder="Enter Username" name="username" id="username" /><br />
+ <label>Password</label><input type="password" placeholder="Enter Password" name="password" id="password" /><br />
+ <button class="btn btn-primary" id="login" type="submit">Login</button> &nbsp;
+ </form>
+ <a href="/reset">Forgot Password?</a>
+ </div>
+ <div class="well span6">
+ <h4>Alternative Logins</h4>
+ <ul class="alt-logins">
+ <li><a href="/auth/twitter"><img src="/images/twitter_login.png" /></a></li>
+ </ul>
+ </div>
</div>
\ No newline at end of file