| for newline and drum roll + text edit for hostux
This commit is contained in:
		
							parent
							
								
									75dc799599
								
							
						
					
					
						commit
						a2abbf41a0
					
				
					 2 changed files with 44 additions and 14 deletions
				
			
		
							
								
								
									
										25
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								index.html
									
									
									
									
									
								
							| 
						 | 
					@ -1,4 +1,3 @@
 | 
				
			||||||
<!doctype html>
 | 
					 | 
				
			||||||
<html>
 | 
					<html>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <head>
 | 
					    <head>
 | 
				
			||||||
| 
						 | 
					@ -158,7 +157,28 @@
 | 
				
			||||||
                    <p>No signup, no email, no bullshit. Just a straightforward <a href="https://github.com/arcanis/secretsanta">open-source</a> tool to help you generate your secret santa pairings. One static page, and that's it.</p>
 | 
					                    <p>No signup, no email, no bullshit. Just a straightforward <a href="https://github.com/arcanis/secretsanta">open-source</a> tool to help you generate your secret santa pairings. One static page, and that's it.</p>
 | 
				
			||||||
                    <p>In the most common case (no exclusion rules, pair each guest with another at random), enter the name of your guests one line at a time. Once done, press "generate" and you're all set: send the generated links to your guests (by mail, chat, whatever floats your boat) and their pairing will be revealed to them (and only them) once they open the link.</p>
 | 
					                    <p>In the most common case (no exclusion rules, pair each guest with another at random), enter the name of your guests one line at a time. Once done, press "generate" and you're all set: send the generated links to your guests (by mail, chat, whatever floats your boat) and their pairing will be revealed to them (and only them) once they open the link.</p>
 | 
				
			||||||
                    <h2>Where does this tool come from?</h2>
 | 
					                    <h2>Where does this tool come from?</h2>
 | 
				
			||||||
                    <p>I wanted to make a Secret Santa over Facebook without having to reveal to anyone my guests email addresses (so nothing that would require a backend). I also wanted not to know who was paired with me, so I had to find a way to somehow obfuscate the information. And being a developer, well, my first thought was "Let's AES it, for fun and profits!". Classic.</p>
 | 
					                    <p>This tool has been forked from <a href="https://github.com/arcanis/secretsanta" target="_blank">arcanis/secretsanta</a>. It is self-hosted on <a href="https://hostux.fr" target="_blank">hostux.fr</a>.</p>
 | 
				
			||||||
 | 
					                    <h2>What about my privacy?</h2>
 | 
				
			||||||
 | 
					                    <p>There is no backend, i.e. no data stored on my server! The links that are generated contain all the encrypted information.</p>
 | 
				
			||||||
 | 
					                    <h2>How to use?</h2>
 | 
				
			||||||
 | 
					<pre># You can add a user by adding a line
 | 
				
			||||||
 | 
					Santa
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# You can add some details if you want to, using parentheses after the name
 | 
				
			||||||
 | 
					Nicholas (the elf)
 | 
				
			||||||
 | 
					Nicholas (the elf|with a second line)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# You can prevent someone from being paired with someone else
 | 
				
			||||||
 | 
					Maël !Aurélie
 | 
				
			||||||
 | 
					Aurélie !Maël
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can also exclude someone from being paired with multiple people
 | 
				
			||||||
 | 
					Careful: too many exclusion rules can make your secret santa less interesting!
 | 
				
			||||||
 | 
					Rudolph !Santa !Nicholas (the elf)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can also cheat a bit and force someone to be paired with another
 | 
				
			||||||
 | 
					Nicholas (the saint) =Nicholas (the elf)
 | 
				
			||||||
 | 
					...</pre>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -176,6 +196,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # You can add some details if you want to, using parentheses after the name
 | 
					            # You can add some details if you want to, using parentheses after the name
 | 
				
			||||||
            Nicholas (the elf)
 | 
					            Nicholas (the elf)
 | 
				
			||||||
 | 
					            Nicholas (the elf|with a second line)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # You can prevent someone from being paired with someone else
 | 
					            # You can prevent someone from being paired with someone else
 | 
				
			||||||
            Maël !Aurélie
 | 
					            Maël !Aurélie
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										33
									
								
								pairing.html
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								pairing.html
									
									
									
									
									
								
							| 
						 | 
					@ -50,7 +50,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                padding: 20px;
 | 
					                padding: 20px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                font-size: 10px;
 | 
					                font-size: 12px;
 | 
				
			||||||
                text-decoration: none;
 | 
					                text-decoration: none;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                color: #FFFFFF;
 | 
					                color: #FFFFFF;
 | 
				
			||||||
| 
						 | 
					@ -103,6 +103,7 @@
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #pairing-details {
 | 
					            #pairing-details {
 | 
				
			||||||
 | 
					                margin-top: 20px;
 | 
				
			||||||
                margin-bottom: 20px;
 | 
					                margin-bottom: 20px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                font-size: 20px;
 | 
					                font-size: 20px;
 | 
				
			||||||
| 
						 | 
					@ -134,7 +135,7 @@
 | 
				
			||||||
            var name = queryString.name;
 | 
					            var name = queryString.name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var pairing = CryptoJS.AES.decrypt( queryString.pairing, queryString.key ).toString(CryptoJS.enc.Utf8);
 | 
					            var pairing = CryptoJS.AES.decrypt( queryString.pairing, queryString.key ).toString(CryptoJS.enc.Utf8);
 | 
				
			||||||
            var pairingDefinition = pairing.match( /^([^(]+)(?: (\([^)]+\)))?$/ );
 | 
					            var pairingDefinition = pairing.match( /^([^(]+)(?: \(([^)]+)\))?$/ );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        </script>
 | 
					        </script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -147,35 +148,43 @@
 | 
				
			||||||
            <div class="wrapper">
 | 
					            <div class="wrapper">
 | 
				
			||||||
                <div class="content">
 | 
					                <div class="content">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    <div class="title">Hi <span id="name"></span>! You've been paired with</div>
 | 
					                    <div class="title">
 | 
				
			||||||
 | 
					                        Hej <span id="name"></span>!<br>
 | 
				
			||||||
 | 
					                        Your secret child is (drum roll<span id="drum-roll"></span>)
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
                    <script>document.getElementById('name').innerText = name</script>
 | 
					                    <script>document.getElementById('name').innerText = name</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    <div class="pairing">
 | 
					                    <div class="pairing" id="pairing-box">
 | 
				
			||||||
                        <div id="pairing-name"></div>
 | 
					                        <div id="pairing-name"></div>
 | 
				
			||||||
                        <div id="pairing-details"></div>
 | 
					                        <div id="pairing-details"></div>
 | 
				
			||||||
                        <script>
 | 
					                        <script>
 | 
				
			||||||
                            document.getElementById('pairing-name').innerText = pairingDefinition[1];
 | 
					                            document.getElementById('pairing-name').innerText = pairingDefinition[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            if (pairingDefinition[2]) {
 | 
					                            if (pairingDefinition[2]) {
 | 
				
			||||||
                                document.getElementById('pairing-details').innerText = pairingDefinition[2];
 | 
					                                document.getElementById('pairing-details').innerHTML = pairingDefinition[2].replace(/\|/g, '<br>');
 | 
				
			||||||
                            } else {
 | 
					                            } else {
 | 
				
			||||||
                                document.getElementById('pairing-details').style.display = 'none';
 | 
					                                document.getElementById('pairing-details').style.display = 'none';
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        </script>
 | 
					                        </script>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    <div class="title">Good luck!</div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    <script>
 | 
					                    <script>
 | 
				
			||||||
                        if (queryString.extra) {
 | 
					                        document.getElementById('pairing-box').style.color = 'white';
 | 
				
			||||||
                            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>');
 | 
					                        intervalId = window.setInterval(function() {
 | 
				
			||||||
                        }
 | 
					                            document.getElementById('drum-roll').innerText += '.';
 | 
				
			||||||
 | 
					                        }, 200);
 | 
				
			||||||
 | 
					                        window.setTimeout(function() {
 | 
				
			||||||
 | 
					                            document.getElementById('pairing-box').style.color = 'inherit';
 | 
				
			||||||
 | 
					                            clearInterval(intervalId);
 | 
				
			||||||
 | 
					                        }, 3000);
 | 
				
			||||||
                    </script>
 | 
					                    </script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <div class="title">
 | 
				
			||||||
 | 
					                        May you bring them joy and happiness with your gift!
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <a href="http://arcanis.github.io/secretsanta/" class="spirit-of-christmas">
 | 
					            <a href="https://louis.hostux.fr/secretsanta/" class="spirit-of-christmas">
 | 
				
			||||||
                Want to start your own Secret Santa with your friends? Click here to get started!
 | 
					                Want to start your own Secret Santa with your friends? Click here to get started!
 | 
				
			||||||
            </a>
 | 
					            </a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue