HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class="border"></div>
<div class="container">
<main>
<img class="logo" src="https://assets.codepen.io/527512/logo_1.png" alt="Logo Garaje de ideas">
<h1 class="font-l">
Garaje <bold>Code</bold> Pills
</h1>
<p class="text font-xs start">
Scrollytelling con GSAP
</p>
<div id="content-wrapper">
<svg id="line-svg" viewBox="0 -15 1160 6760" xmlns="http://www.w3.org/2000/svg">
<g id="fill">
<g id="sagrada-fill">
<path id="sagrada-fill-1" d="M861 1536.5H370L449.83 1348.46V1237.38L467.142 1223.91V997.405L507.538 865.639L531.583 997.405L558.994 817.068L580.635 925.751L590.253 1024.82L611.893 1002.21L624.397 1029.63L659.502 781L686.914 954.124L719.615 837.746L732.599 979.131L740.775 1223.91L765.782 1237.38V1337.4L861 1536.5Z" fill="#D9BB46"></path>
<g id="sagrada-fill-2">
<path d="M498.882 1524.95H404.625L445.982 1422.52C445.982 1422.52 498.882 1288.83 524.369 1288.83C542.372 1288.83 540.239 1332.11 540.239 1332.11L498.882 1524.95Z" fill="#886E2C"></path>
<path d="M514.751 1526.88L738.851 1524.95L668.159 1298.93C668.159 1298.93 648.654 1229.91 615.26 1231.61C585.74 1233.11 565.727 1288.83 565.727 1288.83L514.751 1526.88Z" fill="#886E2C"></path>
<path d="M770.591 1385.49L825.894 1524.95H746.546L703.265 1385.49C703.265 1385.49 685.952 1313.84 703.265 1298.93C720.577 1284.02 770.591 1385.49 770.591 1385.49Z" fill="#886E2C"></path>
<path d="M472.913 1279.21V1205.16L605.161 1099.36L746.546 1205.16V1279.21L620.069 1168.61L472.913 1279.21Z" fill="#886E2C"></path>
</g>
<g id="sagrada-fill-3">
<path d="M492.356 1544.65H391L435.473 1472.85C435.473 1472.85 492.356 1379.14 519.764 1379.14C539.122 1379.14 536.829 1409.48 536.829 1409.48L492.356 1544.65Z" fill="#F0F6AB"></path>
<path d="M509.421 1546L750.401 1544.65L674.384 1386.22C674.384 1386.22 653.41 1337.83 617.5 1339.02C585.757 1340.07 564.236 1379.14 564.236 1379.14L509.421 1546Z" fill="#F0F6AB"></path>
<path d="M784.531 1446.89L844 1544.65H758.675L712.134 1446.89C712.134 1446.89 693.517 1396.67 712.134 1386.22C730.75 1375.77 784.531 1446.89 784.531 1446.89Z" fill="#F0F6AB"></path>
</g>
</g>
<g id="wella-fill">
<path id="wella-fill-1" d="M474 2235L483.812 2959.8L789.957 2965.69C781.453 2860.15 762.744 2631.42 755.941 2560.77C747.437 2472.46 715.383 2431.9 653.893 2358.64C604.7 2300.02 513.467 2251.79 474 2235Z" fill="#3EA2D7"></path>
<path id="wella-fill-2" d="M523.584 2339.03C516.781 2335.89 525.547 2744.17 530.78 2948.7L781.976 2961.78V2940.2C715.688 2937.58 579.057 2932.09 562.834 2931.04C542.555 2929.73 558.909 2831.61 562.834 2823.1C566.759 2814.6 712.636 2811.33 744.689 2800.21C770.332 2791.31 622.362 2789.09 545.172 2789.09L551.713 2649.75C609.715 2650.19 729.513 2650.8 744.689 2649.75C763.66 2648.44 710.019 2505.18 704.786 2482.29C699.552 2459.39 562.18 2465.93 551.713 2457.43C543.34 2450.63 615.821 2441.08 653.107 2437.15L540.593 2430.61C537.758 2401.39 530.388 2342.17 523.584 2339.03Z" fill="#FFFAED"></path>
<path id="wella-fill-3" d="M531.567 2344.24C524.764 2341.1 533.529 2749.38 538.763 2953.92L789.958 2967V2945.41C723.671 2942.8 587.039 2937.3 570.816 2936.26C550.538 2934.95 566.891 2836.82 570.816 2828.32C574.741 2819.82 720.618 2816.54 752.672 2805.42C778.315 2796.53 630.345 2794.3 553.154 2794.3L559.696 2654.97C617.698 2655.4 737.495 2656.02 752.672 2654.97C771.642 2653.66 718.001 2510.4 712.768 2487.5C707.535 2464.61 570.162 2471.15 559.696 2462.65C551.323 2455.84 623.803 2446.29 661.09 2442.37L548.575 2435.83C545.74 2406.61 538.37 2347.38 531.567 2344.24Z" fill="#49BEDE"></path>
</g>
<g id="arc-fill">
<path id="arc-fill-1" d="M353.389 3750.53C353.389 3750.53 342.351 4051.17 345.598 4201.48C365.726 4203.1 394.265 4208.1 425.463 4206.35C455.119 4204.69 481.954 4197.91 500.459 4193.69C497.213 4130.38 492.667 3997.53 500.459 3972.6C510.199 3941.43 528.704 3915.13 613.44 3922.93C681.228 3929.16 689.734 4111.23 685.514 4201.48C720.901 4203.1 793.819 4205.38 802.39 4201.48C810.961 4197.59 815.701 3896.63 817 3746.64H777.067C776.742 3730.08 775.704 3694.82 774.145 3686.25C772.197 3675.54 727.395 3680.41 707.915 3680.41C692.332 3680.41 694.929 3712.22 698.175 3728.13H460.526C451.761 3728.13 454.683 3688.2 454.683 3680.41C454.683 3672.61 415.724 3675.54 405.984 3675.54C398.192 3675.54 402.737 3725.53 405.984 3750.53H353.389Z" fill="#C39F36"></path>
<path id="arc-fill-2" d="M464.839 4200.51H421.984V3946.3C421.984 3808 558.34 3824.56 645.998 3826.5C733.655 3828.45 781.38 3930.72 781.38 3940.46V4184.93C781.38 4190.77 792.094 4186.87 812.547 4188.82C828.91 4190.38 819.365 4199.21 812.547 4203.43C782.354 4204.08 718.851 4204.99 706.384 4203.43C690.801 4201.48 699.566 4200.51 697.618 4084.61C695.67 3968.7 658.66 3925.85 604.117 3917.08C560.483 3910.07 522.953 3958.31 509.642 3983.31V4188.82C503.149 4192.72 485.098 4200.51 464.839 4200.51Z" fill="#D9BB46"></path>
<path id="arc-fill-3" d="M392.724 4199.79H345V3917.04C345 3763.2 496.849 3781.62 594.466 3783.78C692.083 3785.95 745.23 3899.7 745.23 3910.54V4182.46C745.23 4188.96 757.161 4184.63 779.939 4186.79C798.161 4188.53 787.531 4198.35 779.939 4203.04C746.315 4203.77 675.597 4204.78 661.714 4203.04C644.359 4200.88 654.121 4199.79 651.952 4070.87C649.783 3941.95 608.566 3894.29 547.827 3884.54C499.235 3876.74 457.441 3930.4 442.617 3958.2V4186.79C435.386 4191.13 415.284 4199.79 392.724 4199.79Z" fill="#F0F6AB"></path>
</g>
<g id="pirulo-fill">
<path id="pirulo-fill-1" d="M603 5410.5C562.2 5410.1 502.667 5396.67 478 5390L483.5 4912.5C494.167 4864.17 533 4768.6 603 4773C673 4777.4 701.167 4901.5 706.5 4963V5393.5C689 5399.33 643.8 5410.9 603 5410.5Z" fill="#BD401E"></path>
<path id="pirulo-fill-2" d="M609 5384C586.6 5383.2 526.334 5379.33 499 5377.5C496.667 5352.83 493.4 5255.2 499 5062C500.971 4994.01 496.072 4791.09 615 4801C627 4802 644 5013 649 5092.5C653 5156.1 658.334 5311.33 660.5 5381C652.667 5382.33 631.4 5384.8 609 5384Z" fill="#49BEDE" fill-opacity="0.8"></path>
<g id="pirulo-fill-3">
<path d="M551 4831C543.4 4831 533.5 4849.33 529.5 4858.5C543.333 4857 576.9 4853.8 600.5 4853C630 4852 652 4858.5 661 4858.5C668.2 4858.5 652.333 4840.17 643.5 4831H551Z" fill="#ED706E" fill-opacity="0.6"></path>
<path d="M525.5 4881.5C514.7 4881.5 510.333 4900.5 509.5 4910C527.833 4908.17 570.4 4904.8 594 4906C623.5 4907.5 654.5 4910 672.5 4912C686.9 4913.6 676.833 4892.33 670 4881.5H525.5Z" fill="#ED706E" fill-opacity="0.6"></path>
<path d="M503 4954.5C503 4946.9 507.333 4941.33 509.5 4939.5L677.5 4942C680 4950.67 684 4968.8 680 4972C676 4975.2 560.333 4970.67 503 4968V4954.5Z" fill="#ED706E" fill-opacity="0.6"></path>
<path d="M492.5 5041C491.3 5029.4 495.333 5020.83 497.5 5018H680C682.167 5018 687.3 5020.8 690.5 5032C693.7 5043.2 689.167 5053 686.5 5056.5L497.5 5061.5C496.333 5059.5 493.7 5052.6 492.5 5041Z" fill="#ED706E" fill-opacity="0.6"></path>
<path d="M497.5 5122.5C497.5 5112.9 501.166 5106.83 503 5105C524 5103.5 571.6 5100.4 594 5100C622 5099.5 680 5101 690.5 5105C698.9 5108.2 691.333 5127.67 686.5 5137L497.5 5142V5122.5Z" fill="#ED706E" fill-opacity="0.6"></path>
<path d="M492.5 5193.5C492.5 5185.5 495.833 5176.83 497.5 5173.5C554.667 5172.33 672.5 5170.7 686.5 5173.5C700.5 5176.3 692.333 5202 686.5 5214.5H497.5C495.833 5210.83 492.5 5201.5 492.5 5193.5Z" fill="#ED706E" fill-opacity="0.6"></path>
<path d="M492.5 5271C492.5 5264.2 495.833 5256.5 497.5 5253.5C548.833 5254.67 656.1 5256.7 674.5 5255.5C692.9 5254.3 684.167 5279.33 677.5 5292H497.5C495.833 5287.83 492.5 5277.8 492.5 5271Z" fill="#ED706E" fill-opacity="0.6"></path>
<path d="M492.5 5344.5C492.5 5336.1 495.833 5331 497.5 5329.5C558.333 5327.67 682.1 5324.3 690.5 5325.5C698.9 5326.7 694 5349.33 690.5 5360.5H497.5C495.833 5358.67 492.5 5352.9 492.5 5344.5Z" fill="#ED706E" fill-opacity="0.6"></path>
</g>
</g>
<g id="catedral-fill">
<path id="catedral-fill-1" d="M744 6567L750 6714L657 6720.42L646.5 6721.14L438.5 6735.5L453.5 6567L538.5 6572.5C543.333 6623 554.5 6724.1 560.5 6724.5C566.5 6724.9 563 6664 560.5 6633.5L599.5 6526.5L631.5 6609L646.5 6721.14L657 6720.42C660.2 6720.2 661.667 6621.71 662 6572.5L744 6567Z" fill="#C39F36"></path>
<path id="catedral-fill-2" d="M744.433 6596.33L750 6717.31L663.717 6722.59L653.976 6723.19L461 6735L474.917 6596.33L553.777 6600.86C558.261 6642.42 568.621 6725.62 574.188 6725.95C579.754 6726.28 576.507 6676.16 574.188 6651.06L610.371 6563L640.059 6630.89L653.976 6723.19L663.717 6722.59C666.686 6722.41 668.047 6641.36 668.356 6600.86L744.433 6596.33Z" fill="#F0F6AB"></path>
<path id="catedral-fill-3" d="M415.5 6524.5C403.9 6642.5 425 6720.33 437 6744.5L451.5 6735.5V6567L539 6573C543.167 6625.33 553.3 6730 560.5 6730C567.7 6730 563.5 6665 560.5 6632.5L598 6529L632.5 6615.5C636 6653.67 644.9 6730 652.5 6730C660.1 6730 663.333 6625.33 664 6573L744 6567V6730H773V6483L744 6253.5L720 6536H697.5V6483H668.5L652.5 6524.5V6401L638 6434.5L598 6184L551.5 6439L539 6408.5L532.5 6483H504.5L494.5 6536L477.5 6529L443.5 6253.5C439 6294.67 427.1 6406.5 415.5 6524.5Z" fill="#886E2C"></path>
</g>
</g>
<g id="base">
<path id="line-8" d="M727.849 5434.5C649.849 5515 486.349 5679.5 501.349 5753C516.349 5826.5 672.349 5897 764.349 5857C1130.95 5697.61 547.131 5545.28 649.849 5789.5C698.849 5906 903.09 5976.77 837.849 6031.5C685.849 6159 135.884 6105.86 203.849 6491C230.848 6644 360.548 6728.4 390.848 6733C420.5 6737.5 438.849 6722.5 435.349 6733C425.515 6762.5 396.848 6640.5 405.848 6535C413.048 6450.6 428.515 6303.83 435.349 6241C449.515 6336.33 475.149 6527 464.349 6527C450.849 6527 413.849 6520 435.349 6518C452.549 6516.4 478.182 6523.33 488.849 6527L493.849 6472L522.349 6476C523.682 6493.83 525.549 6529 522.349 6527C519.149 6525 527.015 6437.17 531.349 6393.5C534.182 6405 540.549 6428.5 543.349 6430.5C546.149 6432.5 576.515 6260.33 591.349 6174L630.349 6430.5L643.849 6393.5V6518L660.349 6476H692.349L685.849 6527H709.849L735.849 6241L765.349 6472C765.349 6555 765.349 6722.2 765.349 6727C765.349 6733 813.849 6736.5 796.349 6727C782.349 6719.4 747.182 6720.83 731.349 6722.5L735.849 6559.5L653.849 6565C655.015 6616 654.649 6718.9 643.849 6722.5C630.349 6727 629.849 6624 622.349 6599C616.349 6579 599.182 6536.67 591.349 6518L551.849 6625.5C554.682 6656.33 558.649 6718.9 551.849 6722.5C545.049 6726.1 535.349 6619 531.349 6565L441.349 6559.5V6727C452.682 6725.5 481.549 6722.5 506.349 6722.5C537.349 6722.5 799.849 6699.5 825.349 6711" fill="none" stroke="#ececec" stroke-miterlimit="10" stroke-width="2"></path>
<path id="line-7" d="M377.346 4791.5C341.846 4791.5 245.846 4863.5 230.846 4945.5C215.846 5027.5 250.846 5206 230.846 5268.5C172.919 5449.52 125.688 5276.63 179.846 5280.5C249.846 5285.5 273.847 5314.5 273.847 5350.5C273.847 5386.5 271.347 5453.5 324.347 5434.5C377.346 5415.5 436.847 5377 465.847 5384C489.047 5389.6 465.791 5424 465.847 5400C466.18 5256.67 468.747 4957.5 476.347 4907.5C485.847 4845 546.847 4763 587.847 4767C628.847 4771 698.847 4836 698.847 4995C698.847 5154 688.347 5384 698.847 5392C709.347 5400 738.347 5384 727.847 5384C717.347 5384 587.847 5392 604.847 5400C621.847 5408 644.347 5410.93 649.847 5400C655.347 5389.07 631.347 4806.5 604.847 4799C583.647 4793 554.68 4816.83 542.847 4829.5H635.347C643.847 4838.33 657.647 4855.2 644.847 4852C628.847 4848 517.847 4848 516.347 4856.5C515.147 4863.3 515.847 4874 516.347 4878.5H661.847C665.847 4888.17 671.447 4907.5 661.847 4907.5C649.847 4907.5 507.847 4895.5 501.347 4907.5C494.847 4919.5 501.347 4935 501.347 4936.5C501.347 4937.7 612.68 4939.67 668.347 4940.5C674.514 4949.5 683.147 4967.7 668.347 4968.5C649.847 4969.5 490.847 4956.5 490.847 4968.5C490.847 4980.5 480.347 5014.5 490.847 5014.5C501.347 5014.5 671.847 5009.5 674.847 5016C677.847 5022.5 687.847 5049 674.847 5053C661.847 5057 505.347 5052.5 490.847 5060C479.247 5066 486.014 5088.83 490.847 5099.5C554.18 5096.5 680.947 5093.5 681.347 5105.5C681.747 5117.5 677.18 5129.83 674.847 5134.5C612.347 5135 486.947 5137 485.347 5141C483.747 5145 484.68 5161 485.347 5168.5H681.347C683.514 5182 685.247 5209.7 674.847 5212.5C664.447 5215.3 544.18 5213.67 485.347 5212.5C483.514 5224.83 480.947 5249.9 485.347 5251.5C489.747 5253.1 613.514 5252.17 674.847 5251.5C677.014 5263.33 678.747 5287 668.347 5287C657.947 5287 542.014 5287 485.347 5287C483.68 5300 482.447 5326 490.847 5326C501.347 5326 681.347 5313.5 681.347 5326C681.347 5338.5 687.847 5355 674.847 5355.5C664.447 5355.9 544.18 5355.67 485.347 5355.5C483.68 5360.5 482.447 5371.3 490.847 5374.5C501.347 5378.5 654.895 5386.5 674.847 5374.5C752.48 5327.81 890.455 5435.46 943.847 5392C965.347 5374.5 959.347 5337.5 916.847 5326C874.347 5314.5 805.847 5354 727.847 5434.5" fill="none" stroke="#ececec" stroke-miterlimit="10" stroke-width="2"></path>
<path id="line-6" d="M871.348 4097C768.5 4109.5 1009.6 4218.16 1013.35 4322C1020.29 4514.48 830.348 4485.5 560.348 4517C290.348 4548.5 114.883 4670.66 230.848 4791.5C358.392 4924.4 458.711 4791.5 377.348 4791.5C341.848 4791.5 245.848 4863.5 230.848 4945.5" fill="none" stroke="#ececec" stroke-miterlimit="10" stroke-width="2"></path>
<path id="line-5" d="M230.847 3598.5C101.296 3760.54 230.847 4102 187.847 4128C144.847 4154 159.704 4003.43 230.847 4047.5C349.498 4121 203.498 4128 230.847 4097C252.465 4072.49 279.795 4083.09 305.347 4097C339.773 4115.74 381.703 4225.49 341.847 4190.5C318.498 4170 337.013 3903.17 341.847 3759.5H799.847C804.68 3903.17 808.147 4190.5 783.347 4190.5C758.547 4190.5 701.014 4190.5 675.347 4190.5C674.18 4100 655.347 3919 589.347 3919C506.847 3919 491.847 3958 488.347 3987C485.547 4010.2 487.18 4123.67 488.347 4177.5C466.347 4186.17 419.447 4200.9 407.847 4190.5C396.247 4180.1 394.347 3851.5 394.847 3688.5C412.68 3683.67 448.347 3676.9 448.347 3688.5C448.347 3703 437.347 3729 448.347 3732.5C457.147 3735.3 603.347 3733.67 675.347 3732.5C674.513 3717.83 676.947 3688.5 693.347 3688.5C713.847 3688.5 765.347 3677.5 765.347 3705C765.347 3732.5 733.938 4151.93 748.847 4159C761.498 4165 779.498 4168.5 827.347 4168.5C867.498 4168.5 887.498 4095.04 871.347 4097" fill="none" stroke="#ececec" stroke-miterlimit="10" stroke-width="2"></path>
<path id="line-4" d="M401.848 3005.5C403.848 3041 466.848 3147 466.848 3172C466.848 3197 442.848 3238.5 418.848 3227C394.848 3215.5 343.348 3145.5 401.848 3129.5C460.348 3113.5 721.848 3106.5 765.348 3156.5C808.848 3206.5 862.848 3397 693.348 3429C523.848 3461 350.97 3448.25 230.848 3598.5" fill="none" stroke="#ececec" stroke-miterlimit="10" stroke-width="2"></path>
<path id="line-3" d="M841.347 2245C887.347 2432 985.347 2688.5 996.347 2766.5C1007.35 2844.5 1054.85 2975.5 976.847 2975.5C898.847 2975.5 827.847 2919.5 693.347 2914C585.747 2909.6 553.18 2908.17 550.347 2908C545.347 2876.5 539.247 2811.9 554.847 2805.5C574.347 2797.5 748.847 2796.5 736.847 2786C727.247 2777.6 602.18 2775.5 540.847 2775.5C541.013 2728.83 543.147 2635.5 550.347 2635.5C559.347 2635.5 722.847 2650.5 728.347 2641C733.847 2631.5 709.847 2477 693.347 2473.5C676.847 2470 531.347 2462.5 540.847 2453C550.347 2443.5 649.347 2435.5 645.847 2431C642.347 2426.5 547.347 2436.5 540.847 2424.5C534.347 2412.5 529.847 2335 523.847 2337.5C517.847 2340 514.347 2929 523.847 2930C533.347 2931 781.847 2944.5 792.847 2947C803.847 2949.5 789.847 2957 776.347 2955C762.847 2953 742.646 2513.12 717.847 2461C675.498 2372 551.847 2269.5 492.347 2245C432.847 2220.5 446.347 2187 453.347 2187C460.347 2187 469.847 2913 466.847 2930C463.847 2947 399.847 2970 401.847 3005.5" fill="none" stroke="#ececec" stroke-miterlimit="10" stroke-width="2"></path>
<path id="line-2" d="M908.35 1544C885.001 1466 806.781 1740.54 693.35 1812.5C595.666 1874.47 452.85 1900 408.85 1895C364.85 1890 338.35 1826 350.85 1824.5C363.35 1823 414.127 1950.67 472.35 2018.5C523.85 2078.5 567.001 2094.5 650.85 2078.5C757.241 2058.2 931.35 1929 931.35 1863.5C931.35 1832.18 865.85 1810.5 825.35 1914.5C784.85 2018.5 795.35 2058 841.35 2245" fill="none" stroke="#ececec" stroke-miterlimit="10" stroke-width="2"></path>
<path id="line-1" d="M518.848 30C524.348 65.3333 608.148 148 679.348 196C768.348 256 916.348 375 907.848 463C880.898 742.012 566.01 663.675 464.348 481C432.348 423.5 438.516 409.322 464.348 379C504.016 332.437 565.348 431 573.848 491C620.02 816.917 77.3617 766.562 162.348 1149C173.716 1200.16 274.753 1515.77 373.847 1496.5C397.347 1427.83 446.448 1298.9 454.848 1332.5C465.348 1374.5 433.848 1508.5 424.848 1508.5C415.848 1508.5 481.348 1282.5 507.848 1291.5C534.348 1300.5 504.348 1496.5 488.348 1496.5C472.348 1496.5 557.348 1223 590.848 1237C624.348 1251 717.848 1484.5 710.848 1496.5C703.848 1508.5 636.848 1295 673.848 1304C710.848 1313 804.348 1510.5 784.848 1496.5C765.348 1482.5 710.348 1345 727.348 1332.5C744.348 1320 842.848 1505.5 825.348 1496.5C807.848 1487.5 744.348 1321.5 740.848 1274C737.348 1226.5 606.848 1145 590.848 1115C574.848 1085 613.348 1064.5 611.848 1076.5C610.348 1088.5 467.348 1205 454.848 1221C442.348 1237 444.348 1304 454.848 1304C463.248 1304 465.348 1097 465.348 993.5C486.014 946.833 523.448 852.5 507.848 848.5C492.248 844.5 508.681 983.5 518.848 1053.5C536.348 966.5 568.548 792.5 557.348 792.5C546.148 792.5 565.681 957.167 576.848 1039.5L590.848 993.5L611.848 1039.5C617.848 964.167 631.248 811.4 636.848 803C642.448 794.6 655.514 908.833 661.348 967C669.514 922.667 688.348 836.9 698.348 848.5C708.348 860.1 710.848 1137 710.848 1274C684.848 1241.67 628.648 1177 611.848 1177C590.848 1177 488.348 1239 488.348 1256.5C488.348 1274 409.347 1537.5 396.847 1523C384.347 1508.5 811.348 1494 841.348 1508.5C871.348 1523 916.664 1571.78 908.348 1544" fill="none" stroke="#ececec" stroke-miterlimit="10" stroke-width="2"></path>
</g>
<g id="running">
<path id="line-8-2" d="M727.849 5434.5C649.849 5515 486.349 5679.5 501.349 5753C516.349 5826.5 672.349 5897 764.349 5857C1130.95 5697.61 547.131 5545.28 649.849 5789.5C698.849 5906 903.09 5976.77 837.849 6031.5C685.849 6159 135.884 6105.86 203.849 6491C230.848 6644 360.548 6728.4 390.848 6733C420.5 6737.5 438.849 6722.5 435.349 6733C425.515 6762.5 396.848 6640.5 405.848 6535C413.048 6450.6 428.515 6303.83 435.349 6241C449.515 6336.33 475.149 6527 464.349 6527C450.849 6527 413.849 6520 435.349 6518C452.549 6516.4 478.182 6523.33 488.849 6527L493.849 6472L522.349 6476C523.682 6493.83 525.549 6529 522.349 6527C519.149 6525 527.015 6437.17 531.349 6393.5C534.182 6405 540.549 6428.5 543.349 6430.5C546.149 6432.5 576.515 6260.33 591.349 6174L630.349 6430.5L643.849 6393.5V6518L660.349 6476H692.349L685.849 6527H709.849L735.849 6241L765.349 6472C765.349 6555 765.349 6722.2 765.349 6727C765.349 6733 813.849 6736.5 796.349 6727C782.349 6719.4 747.182 6720.83 731.349 6722.5L735.849 6559.5L653.849 6565C655.015 6616 654.649 6718.9 643.849 6722.5C630.349 6727 629.849 6624 622.349 6599C616.349 6579 599.182 6536.67 591.349 6518L551.849 6625.5C554.682 6656.33 558.649 6718.9 551.849 6722.5C545.049 6726.1 535.349 6619 531.349 6565L441.349 6559.5V6727C452.682 6725.5 481.549 6722.5 506.349 6722.5C537.349 6722.5 799.849 6699.5 825.349 6711" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
<path id="line-7-2" d="M377.346 4791.5C341.846 4791.5 245.846 4863.5 230.846 4945.5C215.846 5027.5 250.846 5206 230.846 5268.5C172.919 5449.52 125.688 5276.63 179.846 5280.5C249.846 5285.5 273.847 5314.5 273.847 5350.5C273.847 5386.5 271.347 5453.5 324.347 5434.5C377.346 5415.5 436.847 5377 465.847 5384C489.047 5389.6 465.791 5424 465.847 5400C466.18 5256.67 468.747 4957.5 476.347 4907.5C485.847 4845 546.847 4763 587.847 4767C628.847 4771 698.847 4836 698.847 4995C698.847 5154 688.347 5384 698.847 5392C709.347 5400 738.347 5384 727.847 5384C717.347 5384 587.847 5392 604.847 5400C621.847 5408 644.347 5410.93 649.847 5400C655.347 5389.07 631.347 4806.5 604.847 4799C583.647 4793 554.68 4816.83 542.847 4829.5H635.347C643.847 4838.33 657.647 4855.2 644.847 4852C628.847 4848 517.847 4848 516.347 4856.5C515.147 4863.3 515.847 4874 516.347 4878.5H661.847C665.847 4888.17 671.447 4907.5 661.847 4907.5C649.847 4907.5 507.847 4895.5 501.347 4907.5C494.847 4919.5 501.347 4935 501.347 4936.5C501.347 4937.7 612.68 4939.67 668.347 4940.5C674.514 4949.5 683.147 4967.7 668.347 4968.5C649.847 4969.5 490.847 4956.5 490.847 4968.5C490.847 4980.5 480.347 5014.5 490.847 5014.5C501.347 5014.5 671.847 5009.5 674.847 5016C677.847 5022.5 687.847 5049 674.847 5053C661.847 5057 505.347 5052.5 490.847 5060C479.247 5066 486.014 5088.83 490.847 5099.5C554.18 5096.5 680.947 5093.5 681.347 5105.5C681.747 5117.5 677.18 5129.83 674.847 5134.5C612.347 5135 486.947 5137 485.347 5141C483.747 5145 484.68 5161 485.347 5168.5H681.347C683.514 5182 685.247 5209.7 674.847 5212.5C664.447 5215.3 544.18 5213.67 485.347 5212.5C483.514 5224.83 480.947 5249.9 485.347 5251.5C489.747 5253.1 613.514 5252.17 674.847 5251.5C677.014 5263.33 678.747 5287 668.347 5287C657.947 5287 542.014 5287 485.347 5287C483.68 5300 482.447 5326 490.847 5326C501.347 5326 681.347 5313.5 681.347 5326C681.347 5338.5 687.847 5355 674.847 5355.5C664.447 5355.9 544.18 5355.67 485.347 5355.5C483.68 5360.5 482.447 5371.3 490.847 5374.5C501.347 5378.5 654.895 5386.5 674.847 5374.5C752.48 5327.81 890.455 5435.46 943.847 5392C965.347 5374.5 959.347 5337.5 916.847 5326C874.347 5314.5 805.847 5354 727.847 5434.5" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
<path id="line-6-2" d="M871.348 4097C768.5 4109.5 1009.6 4218.16 1013.35 4322C1020.29 4514.48 830.348 4485.5 560.348 4517C290.348 4548.5 114.883 4670.66 230.848 4791.5C358.392 4924.4 458.711 4791.5 377.348 4791.5C341.848 4791.5 245.848 4863.5 230.848 4945.5" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
<path id="line-5-2" d="M773.5 3527C932.5 3758.5 394.017 3793.51 184.217 4080.03C21.1173 4298.08 351.277 4327.71 326.967 4235.76C302.197 4134.36 203.147 4242.17 166.557 4285.76C80.7573 4384.87 139.767 4511.84 144.327 4627.93C147.927 4718.78 93.38 4835.58 36.5 4741" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
<path id="line-4-2" d="M401.848 3005.5C403.848 3041 466.848 3147 466.848 3172C466.848 3197 442.848 3238.5 418.848 3227C394.848 3215.5 343.348 3145.5 401.848 3129.5C460.348 3113.5 721.848 3106.5 765.348 3156.5C808.848 3206.5 862.848 3397 693.348 3429C523.848 3461 350.97 3448.25 230.848 3598.5" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
<path id="line-3-2" d="M841.347 2245C887.347 2432 985.347 2688.5 996.347 2766.5C1007.35 2844.5 1054.85 2975.5 976.847 2975.5C898.847 2975.5 827.847 2919.5 693.347 2914C585.747 2909.6 553.18 2908.17 550.347 2908C545.347 2876.5 539.247 2811.9 554.847 2805.5C574.347 2797.5 748.847 2796.5 736.847 2786C727.247 2777.6 602.18 2775.5 540.847 2775.5C541.013 2728.83 543.147 2635.5 550.347 2635.5C559.347 2635.5 722.847 2650.5 728.347 2641C733.847 2631.5 709.847 2477 693.347 2473.5C676.847 2470 531.347 2462.5 540.847 2453C550.347 2443.5 649.347 2435.5 645.847 2431C642.347 2426.5 547.347 2436.5 540.847 2424.5C534.347 2412.5 529.847 2335 523.847 2337.5C517.847 2340 514.347 2929 523.847 2930C533.347 2931 781.847 2944.5 792.847 2947C803.847 2949.5 789.847 2957 776.347 2955C762.847 2953 742.646 2513.12 717.847 2461C675.498 2372 551.847 2269.5 492.347 2245C432.847 2220.5 446.347 2187 453.347 2187C460.347 2187 469.847 2913 466.847 2930C463.847 2947 399.847 2970 401.847 3005.5" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
<path id="line-2-2" d="M908.35 1544C885.001 1466 806.781 1740.54 693.35 1812.5C595.666 1874.47 452.85 1900 408.85 1895C364.85 1890 338.35 1826 350.85 1824.5C363.35 1823 414.127 1950.67 472.35 2018.5C523.85 2078.5 567.001 2094.5 650.85 2078.5C757.241 2058.2 931.35 1929 931.35 1863.5C931.35 1832.18 865.85 1810.5 825.35 1914.5C784.85 2018.5 795.35 2058 841.35 2245" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
<path id="line-1-2" d="M518.848 30C524.348 65.3333 608.148 148 679.348 196C768.348 256 916.348 375 907.848 463C880.898 742.012 566.01 663.675 464.348 481C432.348 423.5 438.516 409.322 464.348 379C504.016 332.437 565.348 431 573.848 491C620.02 816.917 77.3617 766.562 162.348 1149C173.716 1200.16 274.753 1515.77 373.847 1496.5C397.347 1427.83 446.448 1298.9 454.848 1332.5C465.348 1374.5 433.848 1508.5 424.848 1508.5C415.848 1508.5 481.348 1282.5 507.848 1291.5C534.348 1300.5 504.348 1496.5 488.348 1496.5C472.348 1496.5 557.348 1223 590.848 1237C624.348 1251 717.848 1484.5 710.848 1496.5C703.848 1508.5 636.848 1295 673.848 1304C710.848 1313 804.348 1510.5 784.848 1496.5C765.348 1482.5 710.348 1345 727.348 1332.5C744.348 1320 842.848 1505.5 825.348 1496.5C807.848 1487.5 744.348 1321.5 740.848 1274C737.348 1226.5 606.848 1145 590.848 1115C574.848 1085 613.348 1064.5 611.848 1076.5C610.348 1088.5 467.348 1205 454.848 1221C442.348 1237 444.348 1304 454.848 1304C463.248 1304 465.348 1097 465.348 993.5C486.014 946.833 523.448 852.5 507.848 848.5C492.248 844.5 508.681 983.5 518.848 1053.5C536.348 966.5 568.548 792.5 557.348 792.5C546.148 792.5 565.681 957.167 576.848 1039.5L590.848 993.5L611.848 1039.5C617.848 964.167 631.248 811.4 636.848 803C642.448 794.6 655.514 908.833 661.348 967C669.514 922.667 688.348 836.9 698.348 848.5C708.348 860.1 710.848 1137 710.848 1274C684.848 1241.67 628.648 1177 611.848 1177C590.848 1177 488.348 1239 488.348 1256.5C488.348 1274 409.347 1537.5 396.847 1523C384.347 1508.5 811.348 1494 841.348 1508.5C871.348 1523 916.664 1571.78 908.348 1544" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
</g>
<circle class="line-circle" cx="530" cy="15" r="15" fill="#FA4C4B"></circle>
</svg>
<p class="text max-content font-xs text-1">
Desde el 1915, Gaudí se dedicó de una manera casi exclusiva a la Sagrada Familia.
</p>
<p class="text max-content font-xs text-2">
Hotel W, conocido como Hotel Wella fue construit por Ricardo Bofill, "el bueno".
</p>
<p class="text max-content font-xs text-4">
El Arco Triunfo fue diseñado por José Vilaseca como entrada principal a la Exposición Universal de Barcelona al 1888.
</p>
<p class="text max-content font-xs text-5">
Jean Nouvel diseñó la Torre *Glories, anteriormente Torre Agbar por la *acronim de *aigues de Barcelona.
</p>
<p class="text max-content font-xs text-6">
La Catedral de la Santa Cruz y Santa Eulàlia es la catedral gótica de Barcelona, sede del arzobispado de Barcelona.
</p>
</div>
<section class="social-net">
<a href="https://codepen.io/carmenansio">Codepen</a>
<a href="https://twitter.com/carmenansio">Twitter</a>
<a href="https://github.com/carmenansio">Github</a>
</section>
</main>
</div>
<script src="/src.a2b27638.js"></script>
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@100;400;700&display=swap");
:root {
color-scheme: light dark;
--garaje: #f1afd0;
/* 12.75-13.33px */
--step--1: clamp(0.83rem, calc(0.78rem + 0.07vw), 0.8rem);
/* 17-20px */
--step-0: clamp(1.06rem, calc(0.99rem + 0.37vw), 1.25rem);
/* 22.66-30px */
--step-1: clamp(1.42rem, calc(1.24rem + 0.9vw), 1.88rem);
/* 30.21-45px */
--step-2: clamp(1.89rem, calc(1.53rem + 1.8vw), 2.81rem);
/* 40.27-67.5px */
--step-3: clamp(2.52rem, calc(1.85rem + 3.32vw), 4.22rem);
/* 53.67-101.25px */
--step-4: clamp(3.35rem, calc(2.19rem + 5.8vw), 6.33rem);
/* 71.55-151.88px */
--step-5: clamp(4.47rem, calc(2.51rem + 9.8vw), 9.49rem);
--aspect-ratio-svg: 1160 / 6740.2;
}
.font-xxl {
font-size: var(--step-5);
line-height: 1;
}
.font-xl {
font-size: var(--step-4);
}
.font-l {
font-size: var(--step-3);
}
.font-m {
font-size: var(--step-2);
}
.font-s {
font-size: var(--step-1);
}
.font-xs {
font-size: var(--step-0);
}
body {
font-family: "IBM Plex Mono", monospace;
font-size: 1rem;
margin: 0;
background-color: #000000;
color: #ffffff;
}
.border {
background-color: var(--garaje);
height: 60px;
}
#line-svg {
position: absolute;
top: 1%;
left: 0;
visibility: hidden;
opacity: 0;
}
section {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
#content-wrapper {
position: relative;
aspect-ratio: var(--aspect-ratio-svg);
}
header {
padding: 1rem 0;
}
.container {
padding: 2rem 0rem 5rem;
text-align: center;
max-width: 1160px;
margin: auto;
visibility: hidden;
opacity: 0;
}
.max-content {
width: 16ch;
margin: auto;
}
.logo,
h1,
.start {
visibility: hidden;
opacity: 0;
}
.logo {
width: 100px;
}
h1 {
padding: 0;
margin: 0;
}
h1 bold {
color: var(--garaje);
}
.text.start {
font-family: "IBM Plex Mono", monospace;
margin: 0;
}
.text-1 {
position: absolute;
top: 8%;
right: 10%;
text-align: right;
margin: 0;
padding-left: 1rem;
}
.text-2 {
position: absolute;
top: calc((0.2 * 33%) + 26%);
right: 10%;
text-align: right;
}
.text-3 {
position: absolute;
top: calc((0.2 * 35%) + 45%);
right: 10%;
text-align: center;
}
.text-4 {
position: absolute;
top: calc((0.2 * 40%) + 56%);
right: 15%;
text-align: right;
}
.text-5 {
position: absolute;
top: calc((0.2 * 50%) + 71%);
text-align: left;
margin: 0;
padding-left: 1rem;
}
.text-6 {
position: absolute;
top: calc((0.2 * 50%) + 92%);
left: 26%;
text-align: center;
margin: 0;
padding-left: 1rem;
}
@media (min-width: 767px) {
.container {
padding: 2rem 0rem 5rem;
}
.max-content {
width: 24ch;
}
.text-1 {
top: 6%;
left: 38%;
text-align: right;
margin: 0;
padding-left: 1rem;
}
.text-2 {
top: calc((0.2 * 33%) + 22%);
left: -50%;
}
.text-3 {
top: calc((0.2 * 35%) + 38%);
right: 30%;
text-align: center;
}
.text-4 {
top: calc((0.2 * 40%) + 56%);
left: 60%;
text-align: right;
}
.text-5 {
top: calc((0.2 * 50%) + 65%);
left: 60%;
text-align: left;
margin: 0;
padding-left: 1rem;
}
.text-6 {
top: calc((0.2 * 50%) + 82%);
left: 60%;
text-align: center;
margin: 0;
padding-left: 1rem;
}
}
.social-net {
display: flex;
font-size: 1rem;
align-items: stretch;
align-content: center;
flex-wrap: wrap;
min-height: 620px;
}
.social-net a {
margin-right: 1rem;
}
.social-net a:hover {
color: #ffffff;
}
gsap.registerPlugin(ScrollTrigger, DrawSVGPlugin, MotionPathPlugin);
gsap.set([".container", "#line-svg"], { autoAlpha: 1 });
gsap.set(
[
"#catedral-fill",
"#pirulo-fill",
"#arc-fill",
"#wella-fill",
"#sagrada-fill",
".logo",
"h1",
".start",
".border"
],
{ autoAlpha: 0 }
);
const linesBase = gsap.utils.toArray("#base path");
const linesrunning = gsap.utils.toArray("#running path");
gsap.set([linesBase, linesrunning], { drawSVG: "0% 0%" });
gsap.set([".logo", "h1", ".start"], { y: 40 });
gsap.to([".logo", "h1", ".start", ".border"], {
autoAlpha: 1,
y: 0,
stagger: 0.1,
ease: "power2.inOut"
// repeat: -1,
// duration: 1
});
const texts = [
".text-1",
".text-2",
".text-3",
".text-4",
".text-5",
".text-6"
];
texts.forEach((text) => {
ScrollTrigger.create({
trigger: text,
start: "top 50%",
toggleActions: "play reverse play reverse",
animation: gsap.from(text, {
autoAlpha: 0,
y: 70,
duration: 1,
ease: "sine.out"
})
});
});
function draw(el) {
let tl = gsap.timeline({ paused: true });
tl
.to(el, {
drawSVG: true,
duration: 0.5
})
.to(
`${el}-2`,
{
drawSVG: "100% 100%",
duration: 0.5
},
"<"
)
.to(
".line-circle",
{
duration: 0.5,
motionPath: {
path: el,
align: el,
alignOrigin: [0.5, 0.5],
autoRotate: true
}
},
"<"
)
.set(`${el}-2`, {
autoAlpha: 0
});
return tl;
}
ScrollTrigger.create({
trigger: "#base #line-1",
scrub: true,
start: "top 50%",
end: "bottom center",
//markers: {startColor: "yellow", endColor: "yellow"},
fastScrollEnd: true,
onEnter: () =>
gsap.to(["#sagrada-fill"], {
autoAlpha: 1,
stagger: 0.01,
duration: 2
}),
onEnterBack: () =>
gsap.to(["#sagrada-fill"], {
autoAlpha: 0,
stagger: 0.01,
duration: 2
}),
animation: draw("#line-1")
});
ScrollTrigger.create({
trigger: "#base #line-2",
scrub: true,
start: "top+=42.5% 50%",
end: "bottom center",
// markers: {startColor: "red", endColor: "red"},
fastScrollEnd: true,
onEnter: () =>
gsap.to(["#wella-fill"], {
autoAlpha: 1,
stagger: 0.01,
duration: 1
}),
onEnterBack: () =>
gsap.to(["#wella-fill"], {
autoAlpha: 0,
stagger: 0.01,
duration: 1
}),
animation: draw("#line-2")
});
ScrollTrigger.create({
trigger: "#base #line-3",
scrub: true,
start: "top+=19.3% 50%",
end: "bottom center",
// markers: {startColor: "blue", endColor: "blue"},
fastScrollEnd: true,
animation: draw("#line-3")
});
ScrollTrigger.create({
trigger: "#base #line-4",
scrub: true,
start: "top+=42.5% 50%",
end: "bottom center",
// markers: {startColor: "green", endColor: "green"},
fastScrollEnd: true,
onEnter: () =>
gsap.to(["#arc-fill"], {
autoAlpha: 1,
stagger: 0.01,
duration: 1
}),
onEnterBack: () =>
gsap.to(["#arc-fill"], {
autoAlpha: 0,
stagger: 0.01,
duration: 1
}),
animation: draw("#line-4")
});
ScrollTrigger.create({
trigger: "#base #line-5",
scrub: true,
start: "top 50%",
end: "bottom-=10% center",
// markers: {startColor: "red", endColor: "red"},
fastScrollEnd: true,
animation: draw("#line-5")
});
ScrollTrigger.create({
trigger: "#base #line-6",
scrub: true,
start: "top+=42% 50%",
end: "bottom center",
// markers: {startColor: "blue", endColor: "blue"},
onEnter: () =>
gsap.to(["#pirulo-fill"], {
autoAlpha: 1,
stagger: 0.01,
duration: 1
}),
onEnterBack: () =>
gsap.to(["#pirulo-fill"], {
autoAlpha: 0,
stagger: 0.01,
duration: 1
}),
fastScrollEnd: true,
animation: draw("#line-6")
});
ScrollTrigger.create({
trigger: "#base #line-7",
scrub: true,
start: "top+=10% 50%",
end: "bottom center",
// markers: {startColor: "green", endColor: "green"},
fastScrollEnd: true,
animation: draw("#line-7")
});
ScrollTrigger.create({
trigger: "#base #line-8",
scrub: true,
start: "top+=10% 50%",
end: "bottom center",
// markers: {startColor: "green", endColor: "green"},
onEnter: () =>
gsap.to("#pirulo-fill", {
autoAlpha: 1,
duration: 1
}),
fastScrollEnd: true,
onEnterBack: () =>
gsap.to("#pirulo-fill", {
autoAlpha: 0,
duration: 2
}),
animation: draw("#line-8")
});
ScrollTrigger.create({
trigger: "#base #line-8",
scrub: true,
start: "top+=10% 50%",
end: "bottom center",
// markers: {startColor: "green", endColor: "green"},
onEnter: () =>
gsap.to("#catedral-fill", {
autoAlpha: 1,
duration: 1
}),
fastScrollEnd: true,
onEnterBack: () =>
gsap.to("#catedral-fill", {
autoAlpha: 0,
duration: 2
}),
animation: draw("#line-8")
});
Also see: Tab Triggers