Skip to content

Instantly share code, notes, and snippets.

@voodoojello
Last active September 1, 2019 12:21
Show Gist options
  • Save voodoojello/7f1480bfaa7d1672e676bb39a3e94f2a to your computer and use it in GitHub Desktop.
Save voodoojello/7f1480bfaa7d1672e676bb39a3e94f2a to your computer and use it in GitHub Desktop.
ETBU Canvas Tweaks
/*
** Modified: Sun Sep 01 07:18:33 2019 -0500
*/
/*
** Mobile login tweaks
*/
.mobileLogin-Header {
z-index: 1;
background-image: url(https://instructure-uploads.s3.amazonaws.com/account_85450000000000001/attachments/355741/login-logo.png) !important;
background-position: center;
background-repeat: no-repeat;
background-size: 100% !important;
min-height: 156px;
}
/*
** Hide profile avatar change link
*/
.profile_pic_link {
pointer-events: none !important;
}
/*
** Login button fix
*/
.Button--login {
color: #000 !important;
border: 1px solid !important;
margin: -40px 0 0 0;
}
/*
** Center logo on login dialog
*/
.ic-Login-header__logo img {
max-width: none !important;
}
/*
** Links in login dialog
*/
.forgot_password_link,
.first_time_link {
color: #000 !important;
text-decoration: underline;
font-size: 14px;
}
.ic-Login__forgot {
margin-top: 40px;
}
/*
.ic-Login__forgot {
padding: 0px 0 6px 10px;
border-top: 1px solid #e0e0e0;
width: 100%;
margin: 20px;
border-bottom: 1px solid #e0e0e0;
}
*/
/*
** Add "@etbu.edu" to login username control.
** See etbu-custom.js for more info
*/
.etbu-control-wrapper {
text-align: left !important;
border: 1px solid rgb(216, 224, 230);
border-radius: 3px;
transition: all 0.2s ease-out;
box-shadow: none !important;
}
.etbu-username {
margin: 1px 0 1px 0;
border: 0 !important;
text-align: left !important;
width: 67% !important;
display: inline-block !important;
outline: none !important;
}
.etbu-username:focus {
border-color: transparent !important;
outline-color: transparent !important;
outline-width: 0 !important;
outline-offset: 0 !important;
transition: none !important;
}
.etbu-domain {
padding: 0 15px 0 0;
float: right;
color: #000;
line-height: 35px;
}
.etbu-pseudo-focus {
border-color: #081f2c;
outline-color: #2d404b;
outline-width: 2px;
outline-offset: -2px;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
transition: border linear 0.2s,box-shadow linear 0.2s;
}
//
// Modified: Sun Sep 01 07:18:54 2019 -0500
//
// Adds help link to main login dialog
$('.ic-Login__forgot').append('<br/><a class="first_time_link" href="https://www.etbu.edu/about-etbu/faq/canvas-faqs" target="_blank">First Time Signing In?</a>');
// Adds help link to mobile login dialog
$('.forgotBlock').append('<br/><a href="https://www.etbu.edu/about-etbu/faq/canvas-faqs" target="_blank">First Time Signing In?</a>');
// Adds "@etbu.edu" to user name input control and sets wrapper focus
$(document).ready(function() {
var etbu_login_mod = '<div class="ic-Form-control ic-Form-control--login">';
etbu_login_mod += ' <div class="etbu-control-wrapper">';
etbu_login_mod += ' <input class="etbu-username ic-Input text" type="text" name="pseudonym_session[unique_id]" id="pseudonym_session_unique_id">';
etbu_login_mod += ' <div class="etbu-domain">@etbu.edu</div>';
etbu_login_mod += ' </div>';
etbu_login_mod += '</div>';
$("input[type='text'][name='pseudonym_session[unique_id]']").replaceWith(etbu_login_mod);
$('#pseudonym_session_unique_id').on('focus', function() {
$('.etbu-control-wrapper').addClass('etbu-pseudo-focus');
});
$('#pseudonym_session_unique_id').on('blur', function() {
$('.etbu-control-wrapper').removeClass('etbu-pseudo-focus');
});
$('#pseudonym_session_unique_id').focus();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment