This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateSnapshot(user, dataUrl) { | |
// We start our flash effect | |
let rectCanvas = document.querySelector('.canvas-container').getBoundingClientRect(); | |
let flashDiv = document.getElementById('flash-effect') | |
flashDiv.style.top = (rectCanvas.top - 250) + "px"; | |
flashDiv.style.left = (rectCanvas.left - 250) + "px"; | |
flashDiv.classList.add('flash'); | |
//When the animation is done (1s of opacity .7 -> 0 => ~500ms to wait) | |
setTimeout(() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$size-photo: 200px; | |
$size-photo-big: 500px; | |
.img-ori-parent.big{ | |
width:$size-photo-big+90px; | |
height: $size-photo-big+200px; | |
background:white; | |
box-shadow : 0px 0px 5px 0px rgba(50, 50, 50, 0.75); | |
.img-ori{ | |
top:45px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.img-ori-parent{ | |
position:absolute; | |
width:calc(200px + 40px); | |
height: calc(200px + 100px); | |
background:white; | |
z-index: 10; | |
box-shadow : 0px 0px 5px 0px rgba(50, 50, 50, 0.75); | |
} | |
.img-ori{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="img-ori-parent" data-author="jefBinomed"> | |
<img class="img-ori" src="/assets/2016-12-legonnary/gdg_logo_legonnary.png" > | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#flash-effect{ | |
position:absolute; | |
width:500px; | |
height:500px; | |
background:radial-gradient(ellipse at center, rgba(255,255,255,1) 0%, rgba(0,0,0,0) 80%); | |
opacity:0; | |
} | |
#flash-effect.flash{ | |
animation: flash; | |
animation-duration: 1s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new fabric.Text('GDG', { | |
fontSize: cellSize / 5, | |
fill: ColorLuminance(color, -0.15), | |
originX: 'center', | |
originY: 'center', | |
stroke: ColorLuminance(color, -0.20), | |
strokeWidth: 1 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new fabric.Circle({ | |
radius: (cellSize / 2) - 5, | |
fill: ColorLuminance(color, -0.1), | |
originX: 'center', | |
originY: 'center', | |
shadow : "0px 2px 10px rgba(0,0,0,0.2)" | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new fabric.Circle({ | |
radius: (cellSize / 2) - 4, | |
fill: ColorLuminance(color, 0.1), | |
originX: 'center', | |
originY: 'center' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.rectBasic = new fabric.Rect({ | |
width: cellSize * size.col, | |
height: cellSize * size.row, | |
fill: color, | |
originX: 'center', | |
originY: 'center', | |
centeredRotation: true, | |
hasControls: false, | |
shadow : "5px 5px 10px rgba(0,0,0,0.2)" | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules":{ | |
"drawSaved":{ | |
"$userId":{ | |
".read": "auth != null && $userId === auth.uid", | |
".write": "auth != null && root.child('admins').child(auth.token.email.replace('.', '*')).exists() && auth.token.email_verified == true" | |
} | |
} | |
} | |
} |