Skip to content

Instantly share code, notes, and snippets.

@alphabet
Last active August 29, 2015 14:13
Show Gist options
  • Save alphabet/3e4f940d088525075969 to your computer and use it in GitHub Desktop.
Save alphabet/3e4f940d088525075969 to your computer and use it in GitHub Desktop.
CQ Head Include
<script src="/etc/designs/cro/shared-resources/scripts/user-info.js"></script>
<script src="http://reactv-cq.herokuapp.com/css/bower_components/css-modal/modal.js"></script>
<!-- sitecatalyst setup -->
<script language="JavaScript">var s_account="cuconsumer,cuglobal" </script>
<script language="JavaScript" type="text/javascript" src="/etc/designs/cro/shared-resources/scripts/s_code.js"></script>
<!-- end sitecatalyst setup -->
<script>
function checkAuth() {
if (CRUserInfo.hasCRO()) {
console.log('Start the app as an auth user!');
$("#login-page").addClass("hidden");
$("#main-container").after("<script src='http://reactv-cq.herokuapp.com/js/app.js' defer></script\>");
/*Userzoom */
//<![CDATA[
(function() {
var uz = document.createElement('script'); uz.type = 'text/javascript'; uz.async = true; uz.charset = 'utf-8';
uz.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn4.userzoom.com/files/js/QzUxMFQz.js?t=uz_feed&cuid=109E17F86232E2119DA70022196C4538';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uz, s);
})();
//]]>
//<![CDATA[
//(function() {
// var uz = document.createElement('script'); uz.type = 'text/javascript'; uz.async = true; uz.charset = 'utf-8';
// uz.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn4.userzoom.com/files/js/QzUxMFQ0.js?t=uz_til&cuid=109E17F86232E2119DA70022196C4538';
// var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uz, s);
//})();
//]]>
} else {
console.log('Hide the app NOT an auth user!');
$("#login-page").removeClass("hidden");
}
}
checkAuth();
window.onload = function(){
checkAuth();
// retry after 5 secs if the CRUserInfo has not been populated yet...
if(!CRUserInfo.hasCRO()) {
setTimeout(function(){ checkAuth(); }, 5000);
}
};
var ecConfig = function() {
return {
rootUrl: "http://ec-qa3.truman.consumer.org",
uri: {
login: "/ec/cro/login.htm",
forgotUsername: "/ec/myaccount/forgot_username.htm",
forgotPassword: "/ec/myaccount/forgot_password.htm",
subscribe: "/ec/cro/order.htm?INTKEY=I51TLB0"
}
}
}
var pageConfig = ecConfig();
</script>
<link type="text/css" rel="stylesheet" href="http://fast.fonts.net/cssapi/1d1daa4a-4b6a-4e83-9455-69988909810a.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link media="all" href="http://reactv-cq.herokuapp.com/css/main.css" type="text/css" rel="stylesheet">
<link media="all" href="http://reactv-cq.herokuapp.com/css/animate.min.css" type="text/css" rel="stylesheet">
<link media="all" href="http://reactv-cq.herokuapp.com/css/bower_components/css-modal/build/modal.min.css" type="text/css" rel="stylesheet">
<style type="text/css">
div.login-page {
height: 100vh;
background: url("http://reactv-cq.herokuapp.com/images/TV_grid_background_image.png") no-repeat fixed center top / cover #d7d7d7;
}
div.login-page a {
cursor: pointer;
}
#cro_auth a,
#cro_auth a:link,
#cro_auth a:visited,
#cro_auth a:hover,
#cro_auth a:active,
#cro_auth a:focus {
color: #fff;
}
#cro_auth a:hover,
#cro_auth a:focus {
text-decoration: underline;
}
#cro_auth .login-container a {
color: #fff;
font-weight: 600;
}
#cro_auth .subscribe-container > a,
#cro_auth .subscribe-container > a:link,
#cro_auth .subscribe-container > a:visited,
#cro_auth .subscribe-container > a:hover,
#cro_auth .subscribe-container > a:active,
#cro_auth .subscribe-container > a:focus {
color: #dc3e42;
font-size: 1em;
text-transform: capitalize;
}
section#cro_auth {
/*background: url("http://reactv-cq.herokuapp.com/images/TV_grid_background_image.png") no-repeat fixed center top / cover #d7d7d7;*/
font-family: "neue helvetica w01";
height: 100%;
margin: 0 auto;
max-width: 100%;
width: 100%;
}
header#login-header {
margin: 0 auto;
max-width: 1140px;
padding: 60px 0 0;
z-index: 10;
}
#login-header .logo {
text-align: left;
width: 780px;
margin-bottom: 130px;
}
#login-header h2,
#login-header p,
#login-header span {
color: #fff;
font-size: 48px;
font-weight: 500;
line-height: 120%;
margin: 0 auto -20px;
max-width: 780px;
text-align: center;
}
#login-header span {
letter-spacing: 2px;
}
#login-header p {
font-family: "neue helvetica w02";
font-size: 27px;
font-weight: 100;
margin: 1em auto;
}
.login-content {
clear: both;
margin: 2em auto 1em;
max-width: 740px;
padding: 20px 0;
}
.login-content form {
clear: both;
display: block;
float: left;
margin: 1em auto;
}
.login-content input,
.login-content input[type="submit"],
.login-content button {
background: none repeat scroll 0 0 #fff;
border: 0 none;
border-right: 1px solid #e1e1e1;
float: left;
font-family: "neue helvetica w01";
font-size: 1.7em;
font-weight: 300;
line-height: 120%;
max-width: 42%;
padding: 23px 35px;
width: 41%;
}
.login-content input[type="submit"],
.login-content button {
background: #e1e1e1;
border-right: 0 none;
color: #fff;
max-width: 18%;
}
.login-content input[type="submit"].active,
.login-content button.active {
background: #dc3e42;
}
.login-container {
clear: both;
color: #fff;
font-family: "neue helvetica w01";
font-size: 1em;
font-weight: 300;
width: auto;
}
.login-content ::-webkit-input-placeholder {
color: #999;
}
.login-content :-moz-placeholder { /* Firefox 18- */
color: #999;
}
.login-content ::-moz-placeholder { /* Firefox 19+ */
color: #999;
}
.login-content :-ms-input-placeholder {
color: #999;
}
.subscribe-container {
border-top: 1px solid #e1e1e1;
clear: both;
color: #fff;
float: none;
margin: 40px auto 30px;
padding: 25px 0;
text-align: right;
font-family: 'Neue Helvetica W01';
font-weight: 300;
font-size: 18px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment