secretsanta/pairing.html

109 lines
3 KiB
HTML
Raw Normal View History

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 {
background-image: url(assets/santa.png);
background-position: bottom right;
background-repeat: no-repeat;
font-family: 'Comic Sans MS';
}
.main {
display: flex;
}
.content {
margin: auto;
text-align: center;
}
.title {
font-size: 30px;
}
.pairing {
font-size: 90px;
}
.affiliate {
display: block;
box-sizing: content-box;
margin-top: 70px;
border: 10px solid #0CB50C;
border-radius: 10px;
background: rgba(255, 255, 255, .7);
}
.affiliate + .affiliate {
margin-top: 40px;
}
</style>
<script>1
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;
var pairing = CryptoJS.AES.decrypt( queryString.pairing, queryString.key ).toString(CryptoJS.enc.Utf8);
</script>
</head>
<body>
<div class="main">
<div class="content">
<h3 class="title">Hi <span id="name"></span>! You've been paired with</h3>
<script>document.getElementById('name').innerText = name</script>
<h1 class="pairing"><span id="pairing"></span></h1>
<script>document.getElementById('pairing').innerText = pairing</script>
2015-12-12 16:34:00 +01:00
<h3 class="title">Good luck!</h3>
<!--
2015-12-12 16:34:00 +01:00
<iframe class="affiliate" src="http://rcm-eu.amazon-adsystem.com/e/cm?t=secrsant02e-21&o=8&p=48&l=ur1&category=jeuxetjouets&banner=0HS03ACZ89HPK7F4F5G2&f=ifr" width="728" height="90" scrolling="no" border="0" marginwidth="0" frameborder="0"></iframe>
<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>
-->
2015-12-12 16:34:00 +01:00
</div>
</div>
</body>
</html>