Datasets:
Download data/train/codepen-AGomeO-bddQEz/full.html from anim2code/dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.9 kB
-
https://huggingface.co/datasets/anim2code/dataset/resolve/main/data/train/codepen-AGomeO-bddQEz/full.html
- Command line
-
hf download hf://datasets/anim2code/dataset/data/train/codepen-AGomeO-bddQEz/full.html
-
curl -L -o full.html https://huggingface.co/datasets/anim2code/dataset/resolve/main/data/train/codepen-AGomeO-bddQEz/full.html
2.9 kB
| <html> | |
| <head> | |
| <style>body { | |
| background-color: #303969; | |
| overflow: hidden; | |
| } | |
| body, | |
| html { | |
| height: 100%; | |
| width: 100%; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| .container { | |
| width: 600px; | |
| height: 600px; | |
| }</style> | |
| <script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/DrawSVGPlugin.js?r=12"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/TweenMax.min.js"></script> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <svg version="1.1" width="600px" height="600px"> | |
| <defs> | |
| <mask id="liquidMask" x="0" y="-50" width="121" height="189"> | |
| <path fill="rgba(255,255,255,0.85)" d="M354.6,371.5h-82.2c-2.2,0-4-1.8-4-4l-15.8-180.9c0-2.2,1.8-4,4-4h113c2.2,0,4,1.8,4,4 l-15,180.9C358.6,369.8,356.8,371.5,354.6,371.5z" /> | |
| </mask> | |
| </defs> | |
| <svg class="glassSVG" x="-400" y="0"> | |
| <path class="glass" opacity="0.08" fill="#FFFFFF" d="M363.9,383.1H260.5c-3.6,0-6.6-3-6.6-6.6l-15.2-188.1 | |
| c0-3.6,3-6.6,6.6-6.6h135.5c3.6,0,6.6,3,6.6,6.6l-17,188.1C370.5,380.1,367.5,383.1,363.9,383.1z" /> | |
| <polygon class="reflection" opacity="0.2" fill="#FFFFFF" points="298.9,383.1 270,383.1 251,181.8 279.9,181.8 " /> | |
| <g class="liquidGroup" mask="url(#liquidMask)" x="0" y="0"> | |
| <g class="beerHeadGroup"> | |
| <rect class="beer" x="178.3" y="272.3" fill="#FFB241" width="294" height="164.7" /> | |
| <rect class="head" x="178.3" y="245" fill="#FFEBD3" width="294" height="29.3" /> | |
| </g> | |
| </g> | |
| <circle class="splash" cx="268" cy="260" r="6" fill="#E5D1C4" /> | |
| </svg> | |
| </svg> | |
| </div> | |
| <script>var container = document.querySelector('.container'); | |
| var beerHeadGroup = document.querySelector('.beerHeadGroup'); | |
| var glassSVG = document.querySelector('.glassSVG'); | |
| var splash = document.querySelector('.splash'); | |
| TweenMax.set(container, { | |
| position: 'absolute', | |
| top: '50%', | |
| left: '50%', | |
| xPercent: -50, | |
| yPercent: -50 | |
| }) | |
| var tl = new TimelineMax({ | |
| repeat: -1 | |
| }); | |
| tl.set(beerHeadGroup, { | |
| rotation: 0 | |
| }) | |
| .to(glassSVG, 2, { | |
| attr: { | |
| x: 0 | |
| }, | |
| ease: Power4.easeInOut | |
| }) | |
| .to(splash, 0.3, { | |
| attr: { | |
| cy: 210 | |
| }, | |
| scaleY: 1.6, | |
| ease: Power1.easeInOut | |
| }, '-=1.2') | |
| .to(splash, 0.2, { | |
| attr: { | |
| cy: 270 | |
| }, | |
| scaleY: 1, | |
| ease: Power4.easeIn | |
| }, '-=0.9') | |
| .set(splash, { | |
| attr: { | |
| r: 0 | |
| } | |
| }, '-=0.65') | |
| .fromTo(beerHeadGroup, 1, { | |
| rotation: 0 | |
| }, { | |
| rotation: 29, | |
| transformOrigin: '50% 50%', | |
| ease: Power4.easeIn | |
| }, '-=2') | |
| .fromTo(beerHeadGroup, 4, { | |
| rotation: 29 | |
| }, { | |
| rotation: 0, | |
| transformOrigin: '50% 50%', | |
| ease: Elastic.easeOut.config(1.6, 0.12) | |
| }, '-=.9') | |
| .to(glassSVG, 1, { | |
| attr: { | |
| x: 400 | |
| }, | |
| ease: Power4.easeInOut | |
| }) | |
| .fromTo(beerHeadGroup, 0.6, { | |
| rotation: 0 | |
| }, { | |
| rotation: 26, | |
| transformOrigin: '50% 50%', | |
| ease: Power4.easeIn | |
| }, '-=1')</script> | |
| </body> | |
| </html> |