Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
a25f9ca7
Commit
a25f9ca7
authored
Jul 01, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add layout to login page
parent
9daf0245
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
47 deletions
+67
-47
app/src/main/assets/login.html
app/src/main/assets/login.html
+66
-9
app/src/main/assets/lotus.png
app/src/main/assets/lotus.png
+0
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
.../main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
+0
-22
app/src/main/res/layout/activity_login.xml
app/src/main/res/layout/activity_login.xml
+1
-16
No files found.
app/src/main/assets/login.html
View file @
a25f9ca7
<html>
<head>
<style>
.logodiv
{
width
:
45%
;
margin
:
0
auto
;
margin-top
:
25%
;
text-align
:
center
;
}
.logo
{
width
:
100%
;
}
.app-name
{
margin-top
:
10px
;
font-weight
:
200
;
font-size
:
1.5em
;
}
.gap
{
height
:
35%
;
}
.logindiv
{
margin
:
0
auto
;
width
:
100%
;
text-align
:
center
;
}
a
{
color
:
black
;}
a
:link
{
color
:
black
;}
/* unvisited link */
a
:visited
{
color
:
black
;}
/* visited link */
a
:hover
{
color
:
black
;}
/* mouse over link */
a
:active
{
color
:
black
;}
/* selected link */
.login
{
font-size
:
1.05em
;
padding
:
10px
28%
;
border-radius
:
4px
;
background-color
:
rgb
(
255
,
215
,
64
);
text-decoration
:
none
;
}
.guest
{
text-decoration
:
none
;
font-weight
:
200
;
line-height
:
1.7em
;
font-size
:
1.05em
;
}
</style>
</head>
<body>
<table>
<tr>
<td>
Hello World
<br>
<a
href=
"https://gymkhana.iitb.ac.in/sso/account/login/?next=/sso/oauth/authorize/%3Fclient_id%3DvR1pU7wXWyve1rUkg0fMS6StL1Kr6paoSmRIiLXJ%26response_type%3Dcode%26scope%3Dbasic%2520profile%2520picture%2520sex%2520ldap%2520phone%2520insti_address%2520program%2520secondary_emails%26redirect_uri=https://redirecturi"
>
:LOGIN:
<div
class=
"logodiv"
>
<img
src=
"lotus.png"
class=
"logo"
>
<div
class=
"app-name"
>
InstiApp
</div>
</div>
<div
class=
"gap"
></div>
<div
class=
"logindiv"
>
<a
class=
"login"
href=
"https://gymkhana.iitb.ac.in/sso/account/login/?next=/sso/oauth/authorize/%3Fclient_id%3DvR1pU7wXWyve1rUkg0fMS6StL1Kr6paoSmRIiLXJ%26response_type%3Dcode%26scope%3Dbasic%2520profile%2520picture%2520sex%2520ldap%2520phone%2520insti_address%2520program%2520secondary_emails%26redirect_uri=https://redirecturi"
>
LOG IN VIA SSO
</a>
</td>
</tr>
</table>
<br><br>
or
<br>
<a
class=
"guest"
href=
"https://guesturi"
>
Continue as a Guest
</a>
</div>
</body>
</html>
\ No newline at end of file
app/src/main/assets/lotus.png
0 → 100644
View file @
a25f9ca7
24.7 KB
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/LoginActivity.java
View file @
a25f9ca7
...
...
@@ -93,28 +93,6 @@ public class LoginActivity extends AppCompatActivity {
}
};
registerReceiver
();
Button
ldapLogin
=
(
Button
)
findViewById
(
R
.
id
.
ldap_login
);
ldapLogin
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
Log
.
d
(
TAG
,
"Initiating auth"
);
AuthorizationServiceConfiguration
config
=
new
AuthorizationServiceConfiguration
(
mAuthEndpoint
,
mTokenEndpoint
);
makeAuthRequest
(
config
);
}
});
Button
guestLogin
=
(
Button
)
findViewById
(
R
.
id
.
guest_login
);
guestLogin
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
//TODO This is for debug purposes, change once SSO is implemented
Intent
intent
=
new
Intent
(
LoginActivity
.
this
,
MainActivity
.
class
);
startActivity
(
intent
);
}
});
}
@Override
...
...
app/src/main/res/layout/activity_login.xml
View file @
a25f9ca7
...
...
@@ -4,25 +4,10 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<Button
android:id=
"@+id/guest_login"
android:layout_width=
"wrap_content"
android:layout_height=
"48dp"
android:layout_gravity=
"center"
android:text=
"Guest Login"
/>
<Button
android:id=
"@+id/ldap_login"
android:layout_width=
"wrap_content"
android:layout_height=
"48dp"
android:layout_gravity=
"center"
android:text=
"LDAP login"
/>
<WebView
android:id=
"@+id/login_webview"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_cont
ent"
>
android:layout_height=
"
match_par
ent"
>
</WebView>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment