Fixed login button clicking, minor css

This commit is contained in:
Kenneth Jao 2016-09-09 02:17:32 -04:00
parent 8299918ea7
commit 93e1eff12f
4 changed files with 14 additions and 5 deletions

View File

@ -153,10 +153,6 @@ p.text {
bottom: 0;
}
.login-button {
display: none !important;
}
#github {
font-size: 3vh;
color: #000 !important;

View File

@ -195,6 +195,7 @@ input, textarea {
height: 5.5vh;
float: right;
display: inline-block;
cursor: pointer;
-webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease;

View File

@ -220,7 +220,7 @@
{{/if}}
</div>
<div style="background-color:{{divColor 'dropdown'}}">
<div id="myprofile" class="userFunction" onclick='document.getElementById("login-buttons-logout").click();'>
<div id="myprofile" class="userFunction" onclick="document.getElementById('login-buttons-logout').click();">
<i class="fa fa-sign-out" aria-hidden="true"></i>
<p>Sign out</p>
</div>

View File

@ -50,6 +50,18 @@ Session.set("classDispHover", null); // Stores current hovered filter.
Session.set("refetchEvents", null); // Stores whether to get calendar events again.
Session.set("commentRestrict", ""); // Stores text for comment character restriction.
Template.login.rendered = function() {
Accounts._loginButtonsSession.set('dropdownVisible', true);
};
Template.main.rendered = function() {
Accounts._loginButtonsSession.set('dropdownVisible', true);
};
Template.profile.rendered = function() {
Accounts._loginButtonsSession.set('dropdownVisible', true);
};
Template.registerHelper('userProfile', () => {
if(Meteor.user() === undefined || Meteor.user() === null) return;
Session.set("user", Meteor.user().profile);