2015-12-12 16:34:00 +01:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<title>Secret Santa Pairing</title>
|
|
|
|
|
|
|
|
<script src="vendors/Lodash-3.10.1.js"></script>
|
|
|
|
<script src="vendors/Cryptojs.aes-3.1.2.js"></script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
* {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
html, body, .main {
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
2018-10-30 05:09:22 +01:00
|
|
|
background: url(./assets/snow.png), url(./assets/santa.png), url(./assets/snow.png), radial-gradient(#FB3B3B, #EF3D3D);
|
|
|
|
background-repeat: repeat, no-repeat, repeat, no-repeat;
|
|
|
|
|
|
|
|
animation-name: snow;
|
|
|
|
animation-duration: 5s;
|
|
|
|
animation-iteration-count: infinite;
|
|
|
|
animation-timing-function: linear;
|
2015-12-12 16:34:00 +01:00
|
|
|
|
|
|
|
font-family: 'Comic Sans MS';
|
|
|
|
}
|
|
|
|
|
2018-10-30 05:09:22 +01:00
|
|
|
@keyframes snow {
|
|
|
|
from { background-position: 130px 40px, bottom right, 0 0, 0 0; }
|
|
|
|
to { background-position: 130px 640px, bottom right, 0 300px, 0 0; }
|
|
|
|
}
|
|
|
|
|
|
|
|
.spirit-of-christmas {
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
|
|
|
|
2015-12-12 16:34:00 +01:00
|
|
|
.main {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
2018-10-30 05:09:22 +01:00
|
|
|
.background {
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wrapper {
|
2015-12-12 16:34:00 +01:00
|
|
|
margin: auto;
|
2018-10-30 05:09:22 +01:00
|
|
|
padding: 20px;
|
|
|
|
|
|
|
|
background: repeating-linear-gradient(
|
|
|
|
45deg,
|
|
|
|
#5CC48A,
|
|
|
|
#5CC48A 30px,
|
|
|
|
#FFFFFF 30px,
|
|
|
|
#FFFFFF 60px,
|
|
|
|
#EF3D3D 60px,
|
|
|
|
#EF3D3D 90px,
|
|
|
|
#FFFFFF 90px,
|
|
|
|
#FFFFFF 120px
|
|
|
|
);
|
|
|
|
|
|
|
|
box-shadow: 3px 3px 10px rgba(0, 0, 0, .5);
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
padding: 40px;
|
|
|
|
|
|
|
|
background: #ffffff;
|
2015-12-12 16:34:00 +01:00
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
font-size: 30px;
|
|
|
|
}
|
|
|
|
|
2018-11-18 15:56:45 +01:00
|
|
|
#pairing-name {
|
2015-12-12 16:34:00 +01:00
|
|
|
font-size: 90px;
|
|
|
|
}
|
|
|
|
|
2018-11-18 15:56:45 +01:00
|
|
|
#pairing-details {
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
}
|
|
|
|
|
2015-12-12 16:34:00 +01:00
|
|
|
.affiliate {
|
|
|
|
display: block;
|
|
|
|
box-sizing: content-box;
|
|
|
|
|
2018-10-30 05:09:22 +01:00
|
|
|
margin-top: 40px;
|
2015-12-12 16:34:00 +01:00
|
|
|
|
2018-10-30 05:09:22 +01:00
|
|
|
border: none;
|
2015-12-12 16:34:00 +01:00
|
|
|
|
|
|
|
background: rgba(255, 255, 255, .7);
|
|
|
|
}
|
|
|
|
|
|
|
|
.affiliate + .affiliate {
|
|
|
|
margin-top: 40px;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
2018-10-30 05:09:22 +01:00
|
|
|
<script>
|
2015-12-12 16:34:00 +01:00
|
|
|
|
|
|
|
var queryString = _.chain( location.search.slice( 1 ).split( /&/g ) )
|
|
|
|
.map( function ( item ) { if ( item ) return item.split( /=/ ).map( function ( str ) { return decodeURIComponent( str ); } ); } )
|
|
|
|
.compact().object().value();
|
|
|
|
|
|
|
|
var name = queryString.name;
|
2018-11-18 15:56:45 +01:00
|
|
|
|
2015-12-12 16:34:00 +01:00
|
|
|
var pairing = CryptoJS.AES.decrypt( queryString.pairing, queryString.key ).toString(CryptoJS.enc.Utf8);
|
2018-11-18 15:56:45 +01:00
|
|
|
var pairingDefinition = pairing.match( /^([^(]+)(?: (\([^)]+\)))?$/ );
|
2015-12-12 16:34:00 +01:00
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div class="main">
|
|
|
|
|
2018-10-30 05:09:22 +01:00
|
|
|
<div class="wrapper">
|
|
|
|
<div class="content">
|
|
|
|
|
|
|
|
<div class="title">Hi <span id="name"></span>! You've been paired with</div>
|
|
|
|
<script>document.getElementById('name').innerText = name</script>
|
|
|
|
|
2018-11-18 15:56:45 +01:00
|
|
|
<div class="pairing">
|
|
|
|
<div id="pairing-name"></div>
|
|
|
|
<div id="pairing-details"></div>
|
|
|
|
<script>
|
|
|
|
document.getElementById('pairing-name').innerText = pairingDefinition[1];
|
|
|
|
|
|
|
|
if (pairingDefinition[2]) {
|
|
|
|
document.getElementById('pairing-details').innerText = pairingDefinition[2];
|
|
|
|
} else {
|
|
|
|
document.getElementById('pairing-details').style.display = 'none';
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</div>
|
2018-10-30 05:09:22 +01:00
|
|
|
|
|
|
|
<div class="title">Good luck!</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
if (queryString.extra) {
|
|
|
|
document.write('<iframe class="affiliate" src="http://rcm-eu.amazon-adsystem.com/e/cm?t=secrsant02e-21&o=8&p=48&l=ur1&category=books&banner=10DQAXJ7D1D2VTXMR682&f=ifr" width="728" height="90" scrolling="no" border="0" marginwidth="0" frameborder="0"></iframe>');
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</div>
|
2015-12-12 16:34:00 +01:00
|
|
|
</div>
|
|
|
|
|
2018-10-30 05:09:22 +01:00
|
|
|
<a href="http://arcanis.github.io/secretsanta/" class="spirit-of-christmas">
|
|
|
|
Want to start your own Secret Santa with your friends? Click here to get started!
|
|
|
|
</a>
|
|
|
|
|
2015-12-12 16:34:00 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|