css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!-- Defs -->
<svg style="height: 0">
  <defs>
    <symbol id="icon-chart-of-columns" viewBox="0 0 443.857 443.857"><title>chart-of-columns</title><path d="M104.106,377.349H58.712V186.694h45.395V377.349z M176.738,112.55h-45.395v266.312h45.395V112.55z M318.821,112.55h-45.395 v266.312h45.395V112.55z M246.698,176.102h-45.395v202.76h45.395V176.102z M24.21,405.52V14.121H0v415.616h443.857v-24.211H24.21 V405.52z" fill="#FFFFFF"/></symbol>
    <symbol id="icon-settings" viewBox="0 0 478.703 478.703"><title>settings</title><path d="M454.2,189.101l-33.6-5.7c-3.5-11.3-8-22.2-13.5-32.6l19.8-27.7c8.4-11.8,7.1-27.9-3.2-38.1l-29.8-29.8 c-5.6-5.6-13-8.7-20.9-8.7c-6.2,0-12.1,1.9-17.1,5.5l-27.8,19.8c-10.8-5.7-22.1-10.4-33.8-13.9l-5.6-33.2 c-2.4-14.3-14.7-24.7-29.2-24.7h-42.1c-14.5,0-26.8,10.4-29.2,24.7l-5.8,34c-11.2,3.5-22.1,8.1-32.5,13.7l-27.5-19.8 c-5-3.6-11-5.5-17.2-5.5c-7.9,0-15.4,3.1-20.9,8.7l-29.9,29.8c-10.2,10.2-11.6,26.3-3.2,38.1l20,28.1 c-5.5,10.5-9.9,21.4-13.3,32.7l-33.2,5.6c-14.3,2.4-24.7,14.7-24.7,29.2v42.1c0,14.5,10.4,26.8,24.7,29.2l34,5.8 c3.5,11.2,8.1,22.1,13.7,32.5l-19.7,27.4c-8.4,11.8-7.1,27.9,3.2,38.1l29.8,29.8c5.6,5.6,13,8.7,20.9,8.7c6.2,0,12.1-1.9,17.1-5.5 l28.1-20c10.1,5.3,20.7,9.6,31.6,13l5.6,33.6c2.4,14.3,14.7,24.7,29.2,24.7h42.2c14.5,0,26.8-10.4,29.2-24.7l5.7-33.6 c11.3-3.5,22.2-8,32.6-13.5l27.7,19.8c5,3.6,11,5.5,17.2,5.5l0,0c7.9,0,15.3-3.1,20.9-8.7l29.8-29.8c10.2-10.2,11.6-26.3,3.2-38.1 l-19.8-27.8c5.5-10.5,10.1-21.4,13.5-32.6l33.6-5.6c14.3-2.4,24.7-14.7,24.7-29.2v-42.1 C478.9,203.801,468.5,191.501,454.2,189.101z M451.9,260.401c0,1.3-0.9,2.4-2.2,2.6l-42,7c-5.3,0.9-9.5,4.8-10.8,9.9 c-3.8,14.7-9.6,28.8-17.4,41.9c-2.7,4.6-2.5,10.3,0.6,14.7l24.7,34.8c0.7,1,0.6,2.5-0.3,3.4l-29.8,29.8c-0.7,0.7-1.4,0.8-1.9,0.8 c-0.6,0-1.1-0.2-1.5-0.5l-34.7-24.7c-4.3-3.1-10.1-3.3-14.7-0.6c-13.1,7.8-27.2,13.6-41.9,17.4c-5.2,1.3-9.1,5.6-9.9,10.8l-7.1,42 c-0.2,1.3-1.3,2.2-2.6,2.2h-42.1c-1.3,0-2.4-0.9-2.6-2.2l-7-42c-0.9-5.3-4.8-9.5-9.9-10.8c-14.3-3.7-28.1-9.4-41-16.8 c-2.1-1.2-4.5-1.8-6.8-1.8c-2.7,0-5.5,0.8-7.8,2.5l-35,24.9c-0.5,0.3-1,0.5-1.5,0.5c-0.4,0-1.2-0.1-1.9-0.8l-29.8-29.8 c-0.9-0.9-1-2.3-0.3-3.4l24.6-34.5c3.1-4.4,3.3-10.2,0.6-14.8c-7.8-13-13.8-27.1-17.6-41.8c-1.4-5.1-5.6-9-10.8-9.9l-42.3-7.2 c-1.3-0.2-2.2-1.3-2.2-2.6v-42.1c0-1.3,0.9-2.4,2.2-2.6l41.7-7c5.3-0.9,9.6-4.8,10.9-10c3.7-14.7,9.4-28.9,17.1-42 c2.7-4.6,2.4-10.3-0.7-14.6l-24.9-35c-0.7-1-0.6-2.5,0.3-3.4l29.8-29.8c0.7-0.7,1.4-0.8,1.9-0.8c0.6,0,1.1,0.2,1.5,0.5l34.5,24.6 c4.4,3.1,10.2,3.3,14.8,0.6c13-7.8,27.1-13.8,41.8-17.6c5.1-1.4,9-5.6,9.9-10.8l7.2-42.3c0.2-1.3,1.3-2.2,2.6-2.2h42.1 c1.3,0,2.4,0.9,2.6,2.2l7,41.7c0.9,5.3,4.8,9.6,10,10.9c15.1,3.8,29.5,9.7,42.9,17.6c4.6,2.7,10.3,2.5,14.7-0.6l34.5-24.8 c0.5-0.3,1-0.5,1.5-0.5c0.4,0,1.2,0.1,1.9,0.8l29.8,29.8c0.9,0.9,1,2.3,0.3,3.4l-24.7,34.7c-3.1,4.3-3.3,10.1-0.6,14.7 c7.8,13.1,13.6,27.2,17.4,41.9c1.3,5.2,5.6,9.1,10.8,9.9l42,7.1c1.3,0.2,2.2,1.3,2.2,2.6v42.1H451.9z" fill="#FFFFFF"/><path d="M239.4,136.001c-57,0-103.3,46.3-103.3,103.3s46.3,103.3,103.3,103.3s103.3-46.3,103.3-103.3S296.4,136.001,239.4,136.001 z M239.4,315.601c-42.1,0-76.3-34.2-76.3-76.3s34.2-76.3,76.3-76.3s76.3,34.2,76.3,76.3S281.5,315.601,239.4,315.601z" fill="#FFFFFF"/></symbol>
    <symbol id="icon-heartbeat" viewBox="0 0 484 484"><title>heartbeat</title><g> <g> <path d="M414.74,95.558c-21.512-21.516-50.12-33.364-80.544-33.364c-30.428,0-59.032,11.848-80.544,33.364l-9.044,9.044 l-9.044-9.044c-21.516-21.516-50.124-33.364-80.548-33.364c-30.428,0-59.032,11.848-80.544,33.364 c-44.416,44.408-44.416,116.672,0,161.084L236.12,418.29c2.344,2.344,5.412,3.516,8.484,3.516c3.072,0,6.14-1.172,8.492-3.512 L414.74,256.646c21.516-21.512,33.364-50.12,33.364-80.544C448.104,145.674,436.256,117.07,414.74,95.558z M397.768,239.674 l-153.16,153.164L91.444,239.674c-35.056-35.056-35.056-92.092,0-127.148c16.98-16.98,39.556-26.332,63.572-26.332 c24.012,0,46.592,9.352,63.576,26.332l17.528,17.528c4.688,4.688,12.28,4.688,16.968,0l17.528-17.528 c16.984-16.98,39.56-26.332,63.576-26.332s46.596,9.352,63.576,26.332C432.824,147.582,432.824,204.618,397.768,239.674z" fill="#FFFFFF"/> </g> </g><g> <g> <path d="M56,213.806H12c-6.628,0-12,5.372-12,12s5.372,12,12,12h44c6.628,0,12-5.372,12-12S62.628,213.806,56,213.806z" fill="#FFFFFF"/> </g> </g><g> <g> <path d="M431.992,214.194H317.144l-17.872-39.308c-1.348-2.972-4.284-4.78-7.624-4.684c-3.26,0.14-6.108,2.24-7.196,5.316 l-36.528,102.936l-44.408-122.98c-1.096-3.036-3.916-5.12-7.148-5.272c-3.456-0.16-6.236,1.66-7.612,4.584l-29.84,63.408h-98.92 c-4.42,0-8,3.584-8,8s5.264,7.612,9.684,7.612h104c3.1,0,4.236-1.4,5.556-4.204l23.788-50.548l45.452,125.86 c1.144,3.168,4.152,5.28,7.524,5.28c0.008,0,0.016,0,0.016,0c3.38-0.008,6.388-2.14,7.516-5.324l37.376-105.332l11.804,25.964 c1.296,2.86,5.832,4.304,8.968,4.304h120c4.416,0,6.312-3.196,6.312-7.612S436.408,214.194,431.992,214.194z" fill="#FFFFFF"/> </g> </g><g> <g> <path d="M472,209.806h-36c-6.628,0-12,5.372-12,12s5.372,12,12,12h36c6.628,0,12-5.372,12-12S478.628,209.806,472,209.806z" fill="#FFFFFF"/> </g> </g></symbol>
    <symbol id="icon-piggybank" viewBox="0 0 512 512"><title>piggybank</title><g> <g> <path d="M260.348,352.204c-4.503,0-8.153,3.65-8.153,8.153v17.39c0,4.503,3.65,8.153,8.153,8.153s8.153-3.65,8.153-8.153v-17.39 C268.501,355.854,264.851,352.204,260.348,352.204z" fill="#FFFFFF"/> </g> </g><g> <g> <path d="M507.064,235.387c-3.182-3.182-7.411-4.934-11.912-4.934c-0.001,0-0.002,0-0.003,0l-20.929,0.003 c-0.265,0-0.447-0.298-0.503-0.574c-5.753-28.218-18.654-54.82-37.31-76.932c-18.032-21.372-41.127-38.18-66.88-48.737 c-4.154-17.536-12.925-35.616-30.222-49.207c-16.746-13.158-33.612-15.69-34.321-15.792c-2.336-0.333-4.709,0.363-6.495,1.912 c-1.786,1.549-2.811,3.795-2.811,6.159v44.026h-29.588c-7.312-25.09-30.5-43.482-57.919-43.482 c-28.001,0-51.603,19.177-58.376,45.085c-40.312,5.491-77.4,25.021-104.92,55.386C15.937,180.233,0,221.569,0,264.696 c0,96.801,50.255,175.564,65.659,197.397c4.758,6.745,12.551,10.773,20.846,10.773h34.701c14.086,0,25.546-11.46,25.546-25.546 v-11.285c8.781,1.352,17.702,2.045,26.633,2.045h78.811v9.24c0,14.086,11.46,25.546,25.546,25.546h38.117 c11.966,0,22.471-8.493,24.978-20.193l4.184-19.524c53.584-13.049,96.667-50.641,117.872-99.424h32.258 c9.291,0,16.849-7.558,16.849-16.849v-69.572C512,242.801,510.248,238.57,507.064,235.387z M208.17,64.136 c24.276,0,44.025,19.75,44.025,44.026c0,6.208-1.329,12.323-3.833,17.936h-80.385c-2.503-5.615-3.833-11.728-3.833-17.936 C164.144,83.885,183.894,64.136,208.17,64.136z M495.694,316.874c0,0.3-0.243,0.544-0.544,0.544h-26.128 c4.441-13.904,7.174-28.526,7.956-43.604c0.234-4.496-3.223-8.331-7.72-8.564c-4.497-0.228-8.331,3.223-8.564,7.72 c-3.454,66.592-48.778,123.449-111.832,142.252l11.391-53.155c0.944-4.403-1.861-8.737-6.264-9.68 c-4.4-0.946-8.737,1.861-9.68,6.264l-19.416,90.604c-0.907,4.232-4.707,7.304-9.034,7.304h-38.119c-5.095,0-9.24-4.145-9.24-9.24 v-34.786c0-4.503-3.65-8.153-8.153-8.153s-8.153,3.65-8.153,8.153v9.24h-78.811c-8.945,0-17.874-0.769-26.633-2.262v-59.155 c0-4.503-3.65-8.153-8.153-8.153s-8.153,3.65-8.153,8.153v86.964c0,5.095-4.145,9.24-9.24,9.24H86.505 c-3.048,0-5.79-1.409-7.522-3.866c-14.703-20.843-62.677-95.997-62.677-187.999c0-39.072,14.437-76.52,40.651-105.445 c23.99-26.473,55.999-43.853,90.907-49.561c0.141,5.587,1.057,11.111,2.701,16.407h-3.27c-4.503,0-8.153,3.65-8.153,8.153 s3.65,8.153,8.153,8.153h121.75c4.503,0,8.153-3.65,8.153-8.153s-3.65-8.153-8.153-8.153h-3.271 c1.795-5.779,2.727-11.828,2.727-17.936c0-0.183-0.012-0.362-0.014-0.544h27.19v17.936c0,4.503,3.65,8.153,8.153,8.153 c4.503,0,8.153-3.65,8.153-8.153V57.99c15.469,5.854,44.569,23.835,44.569,76.26c0,4.503,3.65,8.153,8.153,8.153 s8.153-3.65,8.153-8.153c0-3.454-0.125-7.101-0.411-10.87c19.667,9.58,37.311,23.272,51.498,40.087 c16.9,20.031,28.586,44.123,33.795,69.673c1.609,7.895,8.541,13.624,16.483,13.623l20.929-0.002c0.055,0,0.225,0,0.384,0.159 c0.159,0.159,0.159,0.327,0.159,0.384V316.874z" fill="#FFFFFF"/> </g> </g><g> <g> <path d="M424.521,235.759c-5.06-13.576-18.455-22.698-33.327-22.698c-14.873,0-28.266,9.121-33.329,22.698 c-1.573,4.219,0.572,8.914,4.791,10.487c4.22,1.575,8.915-0.572,10.487-4.791c2.696-7.23,9.95-12.088,18.05-12.088 s15.355,4.858,18.05,12.088c1.223,3.281,4.333,5.307,7.64,5.307c0.947,0,1.909-0.166,2.847-0.516 C423.949,244.673,426.094,239.977,424.521,235.759z" fill="#FFFFFF"/> </g> </g><g> <g> <path d="M216.323,258.479v-41.664c15.994,1.944,27.176,9.354,27.176,16.085c0,4.503,3.65,8.153,8.153,8.153 c4.503,0,8.153-3.65,8.153-8.153c0-16.668-18.534-30.069-43.482-32.49v-0.937c0-4.503-3.65-8.153-8.153-8.153 s-8.153,3.65-8.153,8.153v0.937c-24.948,2.421-43.482,15.822-43.482,32.49c0,23.807,23.52,32.399,43.482,38.013v41.664 c-15.994-1.944-27.176-9.354-27.176-16.085c0-4.503-3.65-8.153-8.153-8.153s-8.153,3.65-8.153,8.153 c0,16.668,18.534,30.069,43.482,32.49v0.937c0,4.503,3.65,8.153,8.153,8.153s8.153-3.65,8.153-8.153v-0.937 c24.948-2.421,43.482-15.822,43.482-32.49C259.805,272.684,236.284,264.093,216.323,258.479z M200.017,253.843 c-20.08-6.299-27.176-12.023-27.176-20.943c0-6.731,11.182-14.141,27.176-16.085V253.843z M216.323,312.578v-37.028 c20.08,6.298,27.176,12.023,27.176,20.943C243.499,303.224,232.316,310.634,216.323,312.578z" fill="#FFFFFF"/> </g> </g></symbol>
    <symbol id="icon-history" viewBox="0 0 64 64"><title>history</title><path d="m34.688,3.315c-15.887,0-28.812,12.924-28.81,28.729-0.012,0.251-0.157,4.435 1.034,8.941l-3.881-2.262c-0.964-0.56-2.192-0.235-2.758,0.727-0.558,0.96-0.234,2.195 0.727,2.755l9.095,5.302c0.019,0.01 0.038,0.013 0.056,0.022 0.097,0.052 0.196,0.09 0.301,0.126 0.071,0.025 0.14,0.051 0.211,0.068 0.087,0.019 0.173,0.025 0.262,0.033 0.062,0.006 0.124,0.025 0.186,0.025 0.035,0 0.068-0.012 0.104-0.014 0.034-0.001 0.063,0.007 0.097,0.004 0.05-0.005 0.095-0.026 0.144-0.034 0.097-0.017 0.189-0.038 0.282-0.068 0.078-0.026 0.155-0.057 0.23-0.093 0.084-0.04 0.163-0.084 0.241-0.136 0.071-0.046 0.139-0.096 0.203-0.15 0.071-0.06 0.134-0.125 0.197-0.195 0.059-0.065 0.11-0.133 0.159-0.205 0.027-0.04 0.063-0.069 0.087-0.11 0.018-0.031 0.018-0.067 0.033-0.098 0.027-0.055 0.069-0.103 0.093-0.162l3.618-8.958c0.417-1.032-0.081-2.207-1.112-2.624-1.033-0.414-2.207,0.082-2.624,1.114l-1.858,4.6c-1.24-4.147-1.099-8.408-1.095-8.525 0-13.664 11.117-24.78 24.779-24.78 13.663,0 24.779,11.116 24.779,24.78 0,13.662-11.116,24.778-24.779,24.778-1.114,0-2.016,0.903-2.016,2.016s0.901,2.016 2.016,2.016c15.888,0 28.812-12.924 28.812-28.81-0.002-15.888-12.926-28.812-28.813-28.812z" fill="#FFFFFF"/><path d="m33.916,36.002c0.203,0.084 0.417,0.114 0.634,0.129 0.045,0.003 0.089,0.027 0.134,0.027 0.236,0 0.465-0.054 0.684-0.134 0.061-0.022 0.118-0.054 0.177-0.083 0.167-0.08 0.321-0.182 0.463-0.307 0.031-0.027 0.072-0.037 0.103-0.068l12.587-12.587c0.788-0.788 0.788-2.063 0-2.851-0.787-0.788-2.062-0.788-2.851,0l-11.632,11.631-10.439-4.372c-1.033-0.431-2.209,0.053-2.64,1.081-0.43,1.027 0.055,2.208 1.08,2.638l11.688,4.894c0.004,0.001 0.008,0.001 0.012,0.002z" fill="#FFFFFF"/></symbol>
    <symbol id="icon-percentage" viewBox="0 0 486.025 486.025"><title>percentage</title><path d="M420.725,85.413c-42.1-42.1-98.1-65.3-157.6-65.3c-60.6,0-117.3,23.9-159.6,67.3c-4.6,4.7-4.5,12.3,0.2,17 c4.7,4.6,12.3,4.5,17-0.2c37.8-38.7,88.3-60,142.4-60c109.7-0.1,198.9,89.1,198.9,198.8s-89.2,198.9-198.9,198.9 s-198.9-89.2-198.9-198.9v-2.5l19.8,19.8c2.3,2.3,5.4,3.5,8.5,3.5s6.1-1.2,8.5-3.5c4.7-4.7,4.7-12.3,0-17l-40.2-40.3 c-4.7-4.7-12.3-4.7-17,0l-40.3,40.3c-4.7,4.7-4.7,12.3,0,17s12.3,4.7,17,0l19.8-19.8v2.5c0,59.5,23.2,115.5,65.3,157.6 s98.1,65.3,157.6,65.3s115.5-23.2,157.6-65.3s65.2-98.1,65.2-157.6S462.825,127.513,420.725,85.413z" fill="#FFFFFF"/><path d="M326.925,161.913l-147.4,147.3c-4.7,4.7-4.7,12.3,0,17c2.3,2.3,5.4,3.5,8.5,3.5s6.1-1.2,8.5-3.5l147.4-147.4 c4.7-4.7,4.7-12.3,0-17C339.225,157.213,331.625,157.213,326.925,161.913z" fill="#FFFFFF"/><path d="M288.325,261.113c-16.7,16.7-16.7,44,0,60.7c8.1,8.1,18.9,12.6,30.4,12.6s22.3-4.5,30.4-12.6c16.7-16.7,16.7-44,0-60.7 c-8.1-8.1-18.9-12.6-30.4-12.6C307.225,248.513,296.525,253.013,288.325,261.113z M332.125,304.913c-3.6,3.6-8.3,5.5-13.4,5.5 s-9.8-2-13.4-5.5c-7.4-7.4-7.4-19.4,0-26.8c3.6-3.6,8.3-5.5,13.4-5.5s9.8,2,13.4,5.5 C339.525,285.513,339.525,297.513,332.125,304.913z" fill="#FFFFFF"/><path d="M207.925,151.213c-11.5,0-22.3,4.5-30.4,12.6s-12.6,18.9-12.6,30.4s4.5,22.3,12.6,30.4s18.9,12.6,30.4,12.6 s22.3-4.5,30.4-12.6c8.1-8.1,12.6-18.9,12.6-30.4s-4.5-22.3-12.6-30.4C230.125,155.713,219.425,151.213,207.925,151.213z M221.325,207.613c-3.6,3.6-8.3,5.5-13.4,5.5s-9.8-2-13.4-5.5c-3.6-3.6-5.5-8.3-5.5-13.4c0-5.1,2-9.8,5.5-13.4 c3.6-3.6,8.3-5.5,13.4-5.5s9.8,2,13.4,5.5c3.6,3.6,5.5,8.3,5.5,13.4C226.825,199.213,224.925,204.013,221.325,207.613z" fill="#FFFFFF"/></symbol>
    <symbol id="icon-reload" viewBox="0 0 489.711 489.711"><title>reload</title><path d="M112.156,97.111c72.3-65.4,180.5-66.4,253.8-6.7l-58.1,2.2c-7.5,0.3-13.3,6.5-13,14c0.3,7.3,6.3,13,13.5,13 c0.2,0,0.3,0,0.5,0l89.2-3.3c7.3-0.3,13-6.2,13-13.5v-1c0-0.2,0-0.3,0-0.5v-0.1l0,0l-3.3-88.2c-0.3-7.5-6.6-13.3-14-13 c-7.5,0.3-13.3,6.5-13,14l2.1,55.3c-36.3-29.7-81-46.9-128.8-49.3c-59.2-3-116.1,17.3-160,57.1c-60.4,54.7-86,137.9-66.8,217.1 c1.5,6.2,7,10.3,13.1,10.3c1.1,0,2.1-0.1,3.2-0.4c7.2-1.8,11.7-9.1,9.9-16.3C36.656,218.211,59.056,145.111,112.156,97.111z" fill="#FFFFFF"/><path d="M462.456,195.511c-1.8-7.2-9.1-11.7-16.3-9.9c-7.2,1.8-11.7,9.1-9.9,16.3c16.9,69.6-5.6,142.7-58.7,190.7 c-37.3,33.7-84.1,50.3-130.7,50.3c-44.5,0-88.9-15.1-124.7-44.9l58.8-5.3c7.4-0.7,12.9-7.2,12.2-14.7s-7.2-12.9-14.7-12.2l-88.9,8 c-7.4,0.7-12.9,7.2-12.2,14.7l8,88.9c0.6,7,6.5,12.3,13.4,12.3c0.4,0,0.8,0,1.2-0.1c7.4-0.7,12.9-7.2,12.2-14.7l-4.8-54.1 c36.3,29.4,80.8,46.5,128.3,48.9c3.8,0.2,7.6,0.3,11.3,0.3c55.1,0,107.5-20.2,148.7-57.4 C456.056,357.911,481.656,274.811,462.456,195.511z" fill="#FFFFFF"/></symbol>
    <symbol id="icon-wallet" viewBox="0 0 334.877 334.877"><title>wallet</title><path d="M333.196,155.999h-16.067V82.09c0-17.719-14.415-32.134-32.134-32.134h-21.761L240.965,9.917 C237.571,3.798,231.112,0,224.107,0c-3.265,0-6.504,0.842-9.364,2.429l-85.464,47.526H33.815 c-17.719,0-32.134,14.415-32.134,32.134v220.653c0,17.719,14.415,32.134,32.134,32.134h251.18 c17.719,0,32.134-14.415,32.134-32.134v-64.802h16.067V155.999z M284.995,62.809c9.897,0,17.982,7.519,19.068,17.14h-24.152 l-9.525-17.14H284.995z M220.996,13.663c3.014-1.69,7.07-0.508,8.734,2.494l35.476,63.786H101.798L220.996,13.663z M304.275,302.742c0,10.63-8.651,19.281-19.281,19.281H33.815c-10.63,0-19.281-8.651-19.281-19.281V82.09 c0-10.63,8.651-19.281,19.281-19.281h72.353L75.345,79.95H37.832c-3.554,0-6.427,2.879-6.427,6.427s2.873,6.427,6.427,6.427h14.396 h234.83h17.217v63.201h-46.999c-21.826,0-39.589,17.764-39.589,39.589v2.764c0,21.826,17.764,39.589,39.589,39.589h46.999V302.742z M320.342,225.087h-3.213h-59.853c-14.743,0-26.736-11.992-26.736-26.736v-2.764c0-14.743,11.992-26.736,26.736-26.736h59.853 h3.213V225.087z M276.961,197.497c0,7.841-6.35,14.19-14.19,14.19c-7.841,0-14.19-6.35-14.19-14.19s6.35-14.19,14.19-14.19 C270.612,183.306,276.961,189.662,276.961,197.497z" fill="#FFFFFF"/></symbol>
    
    <linearGradient id="graph--success" x1="100%" x2="0%" y1="37.3%" y2="37.3%">
      <stop stop-color="#79F3CB" stop-opacity="0" offset="0%"/>
      <stop stop-color="#79F3CB" offset="10%"/>
      <stop stop-color="#79F3CB" offset="90%"/>
      <stop stop-color="#79F3CB" stop-opacity="0" offset="100%"/>
    </linearGradient>
    
    <linearGradient id="graph--danger" x1="100%" x2="0%" y1="37.3%" y2="37.3%">
      <stop stop-color="#F27373" stop-opacity="0" offset="0%"/>
      <stop stop-color="#F27373" offset="10%"/>
      <stop stop-color="#F27373" offset="90%"/>
      <stop stop-color="#F27373" stop-opacity="0" offset="100%"/>
    </linearGradient>
  </defs>
</svg>

<div class="wrapper" id="app">
  <h1 class="title">Coin Manager for iOS</h1>
  <div class="iphone-x">
    <div class="iphone-x__screen">
      <svg class="iphone-x__lip" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 214 30">
        <defs>
          <path id="lip-a" d="M214 .1l-1.44.02c-4.53 0-5.98 3.94-5.98 13.1 0 8.43-8.98 15.65-16.48 16.78H24.07c-4.97-.86-15.9-5.48-16.88-16.77C6.1.9 5.92.15 0 .13V0h214v.1z"/>
          <circle id="lip-c" cx="8" cy="8" r="8"/>
          <filter id="lip-d" width="131.2%" height="131.2%" x="-15.6%" y="-15.6%" filterUnits="objectBoundingBox">
            <feGaussianBlur stdDeviation="2.5" in="SourceAlpha" result="shadowBlurInner1"/>
            <feOffset in="shadowBlurInner1" result="shadowOffsetInner1"/>
            <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"/>
            <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.048997962 0" in="shadowInnerInner1" result="shadowMatrixInner1"/>
            <feGaussianBlur stdDeviation=".5" in="SourceAlpha" result="shadowBlurInner2"/>
            <feOffset dy="1" in="shadowBlurInner2" result="shadowOffsetInner2"/>
            <feComposite in="shadowOffsetInner2" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner2"/>
            <feColorMatrix values="0 0 0 0 0.992214073 0 0 0 0 0.992214073 0 0 0 0 0.992214073 0 0 0 0.160127944 0" in="shadowInnerInner2" result="shadowMatrixInner2"/>
            <feGaussianBlur stdDeviation=".5" in="SourceAlpha" result="shadowBlurInner3"/>
            <feOffset dy="-1" in="shadowBlurInner3" result="shadowOffsetInner3"/>
            <feComposite in="shadowOffsetInner3" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner3"/>
            <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.438207654 0" in="shadowInnerInner3" result="shadowMatrixInner3"/>
            <feMerge>
              <feMergeNode in="shadowMatrixInner1"/>
              <feMergeNode in="shadowMatrixInner2"/>
              <feMergeNode in="shadowMatrixInner3"/>
            </feMerge>
          </filter>
          <circle id="lip-e" cx="6" cy="6" r="6"/>
          <circle id="lip-f" cx="8" cy="8" r="8"/>
          <filter id="lip-g" width="131.2%" height="131.2%" x="-15.6%" y="-15.6%" filterUnits="objectBoundingBox">
            <feGaussianBlur stdDeviation="2.5" in="SourceAlpha" result="shadowBlurInner1"/>
            <feOffset in="shadowBlurInner1" result="shadowOffsetInner1"/>
            <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"/>
            <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.048997962 0" in="shadowInnerInner1" result="shadowMatrixInner1"/>
            <feGaussianBlur stdDeviation=".5" in="SourceAlpha" result="shadowBlurInner2"/>
            <feOffset dy="1" in="shadowBlurInner2" result="shadowOffsetInner2"/>
            <feComposite in="shadowOffsetInner2" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner2"/>
            <feColorMatrix values="0 0 0 0 0.992214073 0 0 0 0 0.992214073 0 0 0 0 0.992214073 0 0 0 0.160127944 0" in="shadowInnerInner2" result="shadowMatrixInner2"/>
            <feGaussianBlur stdDeviation=".5" in="SourceAlpha" result="shadowBlurInner3"/>
            <feOffset dy="-1" in="shadowBlurInner3" result="shadowOffsetInner3"/>
            <feComposite in="shadowOffsetInner3" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner3"/>
            <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.438207654 0" in="shadowInnerInner3" result="shadowMatrixInner3"/>
            <feMerge>
              <feMergeNode in="shadowMatrixInner1"/>
              <feMergeNode in="shadowMatrixInner2"/>
              <feMergeNode in="shadowMatrixInner3"/>
            </feMerge>
          </filter>
          <circle id="lip-h" cx="6" cy="6" r="6"/>
          <circle id="lip-i" cx="5" cy="5" r="5"/>
          <filter id="lip-j" width="150%" height="150%" x="-25%" y="-25%" filterUnits="objectBoundingBox">
            <feGaussianBlur stdDeviation="2.5" in="SourceAlpha" result="shadowBlurInner1"/>
            <feOffset in="shadowBlurInner1" result="shadowOffsetInner1"/>
            <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"/>
            <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.048997962 0" in="shadowInnerInner1" result="shadowMatrixInner1"/>
            <feGaussianBlur stdDeviation=".5" in="SourceAlpha" result="shadowBlurInner2"/>
            <feOffset dy="1" in="shadowBlurInner2" result="shadowOffsetInner2"/>
            <feComposite in="shadowOffsetInner2" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner2"/>
            <feColorMatrix values="0 0 0 0 0.992214073 0 0 0 0 0.992214073 0 0 0 0 0.992214073 0 0 0 0.160127944 0" in="shadowInnerInner2" result="shadowMatrixInner2"/>
            <feGaussianBlur stdDeviation=".5" in="SourceAlpha" result="shadowBlurInner3"/>
            <feOffset dy="-1" in="shadowBlurInner3" result="shadowOffsetInner3"/>
            <feComposite in="shadowOffsetInner3" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner3"/>
            <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.438207654 0" in="shadowInnerInner3" result="shadowMatrixInner3"/>
            <feMerge>
              <feMergeNode in="shadowMatrixInner1"/>
              <feMergeNode in="shadowMatrixInner2"/>
              <feMergeNode in="shadowMatrixInner3"/>
            </feMerge>
          </filter>
          <circle id="lip-k" cx="8" cy="8" r="8"/>
          <filter id="lip-l" width="131.2%" height="131.2%" x="-15.6%" y="-15.6%" filterUnits="objectBoundingBox">
            <feGaussianBlur stdDeviation="2.5" in="SourceAlpha" result="shadowBlurInner1"/>
            <feOffset in="shadowBlurInner1" result="shadowOffsetInner1"/>
            <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"/>
            <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.048997962 0" in="shadowInnerInner1" result="shadowMatrixInner1"/>
            <feGaussianBlur stdDeviation=".5" in="SourceAlpha" result="shadowBlurInner2"/>
            <feOffset dy="1" in="shadowBlurInner2" result="shadowOffsetInner2"/>
            <feComposite in="shadowOffsetInner2" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner2"/>
            <feColorMatrix values="0 0 0 0 0.992214073 0 0 0 0 0.992214073 0 0 0 0 0.992214073 0 0 0 0.160127944 0" in="shadowInnerInner2" result="shadowMatrixInner2"/>
            <feGaussianBlur stdDeviation=".5" in="SourceAlpha" result="shadowBlurInner3"/>
            <feOffset dy="-1" in="shadowBlurInner3" result="shadowOffsetInner3"/>
            <feComposite in="shadowOffsetInner3" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner3"/>
            <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.438207654 0" in="shadowInnerInner3" result="shadowMatrixInner3"/>
            <feMerge>
              <feMergeNode in="shadowMatrixInner1"/>
              <feMergeNode in="shadowMatrixInner2"/>
              <feMergeNode in="shadowMatrixInner3"/>
            </feMerge>
          </filter>
        </defs>
        <g fill="none" fill-rule="evenodd">
          <g>
            <g>
              <g>
                <g>
                  <mask id="lip-b" fill="#fff">
                    <use xlink:href="#lip-a"/>
                  </mask>
                  <use fill="#000105" xlink:href="#lip-a"/>
                  <g mask="url(#lip-b)">
                    <g transform="translate(26 4)">
                      <g fill="#000" opacity=".5">
                        <use xlink:href="#lip-c"/>
                        <use filter="url(#lip-d)" xlink:href="#lip-c"/>
                      </g>
                      <circle cx="8" cy="8" r="5.71" fill="#141414"/>
                      <g opacity=".5" transform="translate(2 2)">
                        <g>
                          <use fill="#334B80" xlink:href="#lip-e"/>
                          <circle cx="6" cy="6" r="5" stroke="#192E65" stroke-width="2"/>
                          <use stroke="#272149" xlink:href="#lip-e"/>
                        </g>
                        <circle cx="6" cy="6" r="1.64" fill="#14285E"/>
                        <circle cx="4.36" cy="4.36" r="1.09" fill="#92B6D7"/>
                        <circle cx="7.64" cy="7.64" r="1.09" fill="#516C9D"/>
                      </g>
                    </g>
                  </g>
                  <g mask="url(#lip-b)">
                    <g transform="translate(57 4)">
                      <g fill="#000" opacity=".5">
                        <use xlink:href="#lip-f"/>
                        <use filter="url(#lip-g)" xlink:href="#lip-f"/>
                      </g>
                      <circle cx="8" cy="8" r="5.71" fill="#141414"/>
                      <g opacity=".5" transform="translate(2 2)">
                        <g>
                          <use fill="#334B80" xlink:href="#lip-h"/>
                          <circle cx="6" cy="6" r="5" stroke="#192E65" stroke-width="2"/>
                          <use stroke="#272149" xlink:href="#lip-h"/>
                        </g>
                        <circle cx="6" cy="6" r="1.64" fill="#14285E"/>
                        <circle cx="4.36" cy="4.36" r="1.09" fill="#92B6D7"/>
                        <circle cx="7.64" cy="7.64" r="1.09" fill="#516C9D"/>
                      </g>
                    </g>
                  </g>
                  <g mask="url(#lip-b)">
                    <g transform="translate(142 7)">
                      <g fill="#000" opacity=".5">
                        <use xlink:href="#lip-i"/>
                        <use filter="url(#lip-j)" xlink:href="#lip-i"/>
                      </g>
                      <circle cx="5" cy="5" r="3.57" fill="#141414"/>
                      <circle cx="6.07" cy="5.36" r="1.07" fill="#141414"/>
                    </g>
                  </g>
                  <g mask="url(#lip-b)">
                    <g transform="translate(171 4)">
                      <circle cx="8" cy="8" r="8" fill="#181819"/>
                      <g fill="#000" opacity=".5">
                        <use xlink:href="#lip-k"/>
                        <use filter="url(#lip-l)" xlink:href="#lip-k"/>
                      </g>
                      <g opacity=".7" transform="translate(2 2)">
                        <circle cx="6" cy="6" r="6" fill="#1E1939"/>
                        <circle cx="6" cy="6" r="3.82" fill="#342B64"/>
                        <circle cx="6" cy="6" r="1.64" fill="#51439F"/>
                        <circle cx="4.36" cy="4.36" r="1.09" fill="#FFF" opacity=".34"/>
                      </g>
                    </g>
                  </g>
                  <g fill="#181819" mask="url(#lip-b)">
                    <g transform="matrix(-1 0 0 1 130 9)">
                      <rect width="45" height="7" rx="3.5"/>
                    </g>
                  </g>
                </g>
              </g>
            </g>
          </g>
        </g>
      </svg><!-- end lip -->
      <div class="iphone-x__icons iphone-x__icons--right">
        <svg class="iphone-x__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 10">
          <g fill="none" fill-rule="evenodd">
            <g fill="#FFF">
              <g>
                <rect width="3" height="10" x="13.5" rx="1"/>
                <rect width="3" height="8" x="9" y="2" rx="1"/>
                <rect width="3" height="6" x="4.5" y="4" rx="1"/>
                <rect width="3" height="5" y="5" rx="1"/>
              </g>
            </g>
          </g>
        </svg>
        <svg class="iphone-x__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 10">
          <g fill="none" fill-rule="evenodd">
            <g fill="#FFF">
              <path d="M.78 3.28C2.5 1.56 4.88.5 7.5.5s5 1.06 6.72 2.78l-1.06 1.06C11.7 2.9 9.7 2 7.5 2c-2.2 0-4.2.9-5.66 2.34L.78 3.28zM2.9 5.4c1.18-1.17 2.8-1.9 4.6-1.9 1.8 0 3.42.73 4.6 1.9l-1.06 1.06C10.14 5.56 8.88 5 7.5 5s-2.63.56-3.54 1.46L2.9 5.4zm2.13 2.13C5.66 6.9 6.53 6.5 7.5 6.5c.97 0 1.84.4 2.47 1.03L7.5 10 5.03 7.53z"/>
            </g>
          </g>
        </svg>

        <svg class="iphone-x__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 12">
          <g fill="none" fill-rule="evenodd">
            <g fill="#FFF">
              <g>
                <rect width="20" height="7.5" x="2" y="2.5" rx="1"/>
                <path d="M25 4.56c.86.23 1.5 1 1.5 1.94 0 .93-.64 1.7-1.5 1.94V4.56z"/>
                <path d="M2 .5h20c1.1 0 2 .9 2 2V10c0 1.1-.9 2-2 2H2c-1.1 0-2-.9-2-2V2.5c0-1.1.9-2 2-2zm0 1c-.55 0-1 .45-1 1V10c0 .55.45 1 1 1h20c.55 0 1-.45 1-1V2.5c0-.55-.45-1-1-1H2z"/>
              </g>
            </g>
          </g>
        </svg>
      </div><!-- icons -->
      
      <div class="iphone-x__content">
        <div class="sidebar" :class="{ 'sidebar--show': showSidebarMenu }">
          <ul class="menu">
            <li :style="{'--anim-delay': '0s'}" class="menu__item menu__item--selected">
              <button class="btn sidebar__account-switcher">
                <div class="avatar avatar--small" :style="{background: `linear-gradient(45deg, ${currAccount.colors[0]}, ${currAccount.colors[1]})`}"></div>
                <span class="text--md">{{ currAccount.name }}</span>
              </button>
            </li>
            <li :style="{'--anim-delay': '.05s'}" class="menu__item">
              <svg class="menu__icon">
                <use xlink:href="#icon-chart-of-columns" />
              </svg>
              Markets
            </li>
            <li :style="{'--anim-delay': '.1s'}" class="menu__item">
              <svg class="menu__icon">
                <use xlink:href="#icon-reload" />
              </svg>
              Arbitrage
              <span class="menu__badge">2</span>
            </li>
            <li :style="{'--anim-delay': '.15s'}" class="menu__item">
              <svg class="menu__icon">
                <use xlink:href="#icon-percentage" />
              </svg>
              Margin Trading
              <span class="menu__badge">1</span>
            </li>
            <li :style="{'--anim-delay': '.2s'}" class="menu__item">
              <svg class="menu__icon">
                <use xlink:href="#icon-history" />
              </svg>
              History
            </li>
            <li :style="{'--anim-delay': '.25s'}" class="menu__item">
              <svg class="menu__icon">
                <use xlink:href="#icon-wallet" />
              </svg>
              Wallets
            </li>
            <li :style="{'--anim-delay': '.3s'}" class="menu__item menu__item--selected">
              <svg class="menu__icon">
                <use xlink:href="#icon-piggybank" />
              </svg>
              Accounts
            </li>
            <li :style="{'--anim-delay': '.35s'}" class="menu__item">
              <svg class="menu__icon">
                <use xlink:href="#icon-settings" />
              </svg>
              Settings
            </li>
            <li :style="{'--anim-delay': '.4s'}" class="menu__item">
              <svg class="menu__icon">
                <use xlink:href="#icon-heartbeat" />
              </svg>
              Status
              <div class="menu__indicator"></div>
            </li>
          </ul>
        </div>
        <div class="app-wrapper" :class="{ 'app-wrapper--push': showSidebarMenu }">
          <div class="header">
            <div class="header__icon" @click="toggleSidebarMenu">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 8">
                <g fill="#FFF" fill-rule="evenodd">
                  <rect width="18" height="2" rx="1"/>
                  <rect width="12" height="2" y="6" rx="1"/>
                </g>
              </svg>
            </div>
            
            <h4 class="header__title">Accounts</h4>
          </div>
          
          <ul class="accounts-list">
            <li
              v-for="(account, i) of accounts"
              class="accounts-list__item"
              :style="{
                '--anim-delay': `${i / 10}s`
              }"
            >
              <div class="account">
                <div
                  class="avatar"
                  :style="{background: `linear-gradient(45deg, ${account.colors[0]}, ${account.colors[1]})`}"
                ></div>
                <div class="account-info">
                  <h4 class="account-name">{{ account.name }}</h4>

                  <div class="tags">
                    <span v-for="tag of account.tags" class="tags__tag">{{ tag }}</span>
                  </div>

                  <span class="creation-date">
                    Created: {{ randomDate() | date }}
                  </span>
                </div>
                <div class="account-info">
                  <h4
                    class="text--small"
                  >
                    Holdings:
                    <span
                      class="text--danger"
                      :class="{ 'text--success': account.change > 0 }"
                    >${{ account.holdings }}</span> 
                  </h4>
                  <h4
                    class="text--small"
                  >
                    Change:
                    <span
                      class="text--danger"
                      :class="{ 'text--success': account.change > 0 }"
                    >{{ account.change }}%</span>
                  </h4>

                  <svg class="graph" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 25">
                    <path
                      class="graph__line"
                      fill="none"
                      fill-rule="evenodd"
                      :stroke="account.change > 0 ? 'url(#graph--success)' : 'url(#graph--danger)' "
                      :d="account.graphStr"
                      transform="translate(-2 -36)"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                    />
                  </svg>
                </div>
              </div><!-- /account -->
            </li>
          </ul>
          
          <button class="btn btn--large create-account-btn">
            Create account
          </button>
        </div><!-- app-wrapper -->
      </div><!-- iphone-x__content -->
    </div><!-- iphone-x__screen -->
  </div>
</div>

            
          
!
            
              // Defaults
html {
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  word-spacing: 1px;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
}

body {
  display: grid;
}

.wrapper {
  margin: 2rem auto 4rem auto;
}

.title {
  font-weight: 200;
  text-align: center;
  margin-bottom: 32px;
}

//--------------------------
// iPhone X
//--------------------------

$scale: .8;

$screen-width: 375px * $scale;
$screen-height: 812px * $scale;
$screen-radius: 30px * $scale;
// $screenHeight: $screenWidth * 2.16533;
$body-width: 415px * $scale;
$body-height: 852px * $scale;
$body-radius: 54px * $scale;
// $bodyHeight: $bodyWidth * 2.05301;

$body-color: #070707;
$screen-color: #1D1D1D;

.iphone-x {
  width: $body-width;
  height: $body-height;
  border-radius: $body-radius;
  display: flex;
  
  background: $body-color;
  
  &__screen {
    width: $screen-width;
    height: $screen-height;
    border-radius: $screen-radius;
    margin: auto;
    overflow: hidden;
    position: relative;
    
    background: $screen-color;
  }
  
  &__lip {
    width: 58.13%;
    height: 3.57%;
    position: absolute;
    top: 0;
    left: 0; right: 0;
    margin: auto;
    z-index: 9;
  }
  
  &__icons {
    width: 18%;
    height: 2%;
    position: absolute;
    top: 1.2%;
    z-index: 9;
    display: flex;

    &--right {
      right: 3%;
    }
  }
  
  &__icon {
    flex: 1;
    margin: 3%;
  }

  &__content {
    height: 100%;
  }
}

//------------------------
// App
//------------------------

$colors: #7A4EBF, #272C40, #363D59;
$colorDanger: #F27373;
$colorSuccess: #73F2C8;

.app-wrapper {
  width: 100%; height: 100%;
  background: nth($colors, 3);
  display: flex;
  position: relative;
  z-index: 2;
  flex-direction: column;
  
  transition: all .3s ease;
  will-change: transform;

  &--push {
    transform: translateX(228px);
  }
}

.header {
  display: flex;
  height: 80px;
  position: relative;
  background: nth($colors, 1);

  &__title {
    width: 100%;
    position: absolute;
    bottom: 8px;
    margin: auto;
    text-align: center;
    color: white;
    z-index: 0;
  }
  
  &__icon {
    width: 20px;
    margin: 12px;
    margin-top: auto;
    z-index: 1;
    cursor: pointer;
  }
}

.accounts-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;

  &__item {
    padding: 12px;
    height: 96px;
    background: nth($colors, 2);

    will-change: transform, opacity;
    animation: slideIn .8s ease both;
    animation-delay: var(--anim-delay);

    &:nth-of-type(even) {
      background: nth($colors, 3);
    }
    
    &:last-of-type {
      box-shadow: 0 .4rem .8rem -.2rem rgba(0,0,0,.2);
    }
  }
}

.account {
  display: flex;
}

.avatar {
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  margin: auto 8px auto 0;
  
  &--small {
    height: 32px;
    flex: 0 0 32px;
  }
}

.account-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  color: white;
  margin-top: 12px;
  margin-left: 8px;
}

.account-name {
  font-size: .7rem;
}

.tags {
  font-size: .4rem;
  display: flex;
  max-width: 100px;
  &__tag {
    padding: .2rem .4rem;
    margin: 4px 4px auto 0;
    overflow: hidden;
    border-radius: 2rem;
    background: rgba(0,0,0,.25);
    color: rgba(255,255,255,.5);
    white-space: nowrap;
    text-overflow: ellipsis;
    text-transform: uppercase;
  }
}

.creation-date {
  font-size: .5rem;
  opacity: .5;
  margin-top: auto;
}

.text {
  &--small {
    font-size: .6rem;
    margin-bottom: .2rem;
  }

  &--md {
    font-size: .8rem;
  }

  &--danger {
    color: $colorDanger;
  }

  &--success {
    color: $colorSuccess; 
  }
}


.graph {
  flex: 0 0 2rem;
  &__line {
    stroke-dasharray: 150;
    animation: line 2s ease both;
    animation-delay: calc(var(--anim-delay) + .8s);
  }
}

.btn {
  border: none;
  padding: .8rem 1rem;
  border-radius: 2px;
  color: white;
  text-transform: uppercase;
  font-weight: bold;
  box-shadow: 0 .2rem .4rem rgba(0,0,0,.2);
  &--large {
    font-size: .8rem;
  }
}

.create-account-btn {
  margin: auto;
  background: nth($colors, 1);
}

.sidebar {
  width: 240px;
  height: 100%;
  position: absolute;
  z-index: 1;
  
  background: darken(nth($colors, 2), 5);
  
  &--show {
    .menu__item {
      animation: slideRight .4s var(--anim-delay) ease both;
    }
  }
  
  &__account-switcher {
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    margin-right: 12px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(0,0,0,.4);
    text-transform: initial;
    
    &:after {
      content: '';
      border: 7px solid transparent;
      border-top-color: rgba(255,255,255,.4);
      transform: scaleX(.8);
      margin-left: auto;
      margin-top: 4px;
    }
    
    .text--md {
      margin-left: 8px;
    }
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-20%);
  }
  to {
    opacity: 1;
    transform: translateX(0%);
  }
}

.menu {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  
  &__item {
    padding: 16px;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    transform: translateZ(0);
    will-change: transform, opacity;

    &--selected {
      font-weight: bold;
      background: rgba(0,0,0,.1);
      color: white;
    }
  }

  &__icon {
    $s: 16px;
    height: $s;
    width: $s;
    margin-right: 16px;
  }
  
  &__indicator {
    width: 8px;
    height: 8px;
    background: $colorSuccess;
    margin: auto;
    margin-left: 16px;
    border-radius: 50%;
  }

  &__badge {
    font-weight: bold;
    font-size: .7rem;
    width: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    background: nth($colors, 1);
    margin-left: auto;
    margin-right: 8px;
  }
}
  
@keyframes line {
  from {
    stroke-dashoffset: 150;
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
            
          
!
            
              new Vue({
  el: '#app',
  data () {
    return {
      showSidebarMenu: false,
      accountsData: [
        {
          colors: ['#40B5FF', '#66FF8B'],
          name: 'Teo\'s Savings',
          tags: ['hodl', 'ledger'],
          holdings: [2700, 3825],
          graph: [10, 10, 5, 0, 8, 15, 11, 0, -4, -10]
        },
        {
          colors: ['#E940FF', '#66D5FF'],
          name: 'Shitcoins',
          tags: ['short', 'ico'],
          holdings: [1200, 1180],
          graph: [10, -1, 8, -5, 2, 7, -4, 12, 10, 9]
        },
        {
          colors: ['#FFDE40', '#FF6666'],
          name: 'Sean\'s portfolio short-term',
          tags: ['hodl', 'trezor'],
          holdings: [1200, 1378],
          graph: [4, 2, -2, 4, 3, -4, 7, 5, 2, -4]
        },
        {
          colors: ['#FF5A5A', '#FF40EA'],
          name: 'Margin trading Bitfinex',
          tags: ['margin', 'bitfinex', 'risky'],
          holdings: [900, 729],
          graph: [1, 3, -5, -3, -1, 0, 3, 0, 4, 2]
        },
        {
          colors: ['#4540FF', '#C966FF'],
          name: 'Arbitrage PL-BTX',
          tags: ['risky', 'own'],
          holdings: [1200, 3412],
          graph: [1, -2, 3, -4, 0, -2, -4, -2, -7, -9]
        }
      ]
    }
  },
  computed: {
    accounts () {
      return this.accountsData.map(account => {
        const pctg = account.holdings[0] / account.holdings[1]
        const y = 48
        const graph = account.graph && account.graph.reduce((prev, curr, i, arr) => {
          return `${prev} L${9 * (i + 1)} ${y + curr}`
        }, `M0 ${y}`)
        return {
          ...account,
          holdings: account.holdings[1],
          change: Math.round((1 - pctg) * 10000) / 100,
          graphStr: graph
        }
      })
    },
    currAccount () {
      return this.accounts[0]
    }
  },
  filters: {
    date (d) {
      const month = d.getMonth() + 1
      const day = d.getDate()
      return [
        month < 10 ? `0${month}` : month,
        day < 10 ? `0${day}` : day,
        d.getFullYear()
      ].join('/')
    }
  },
  methods: {
    randomDate(start = new Date(2017, 0, 1), end = new Date()) {
      return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()))
    },
    toggleSidebarMenu () {
      this.showSidebarMenu = !this.showSidebarMenu
    }
  }
})
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console