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.

            
              <!DOCTYPE html>
<html lang="en">
  <head>
    <link rel="stylesheet" href="css/style.css" />
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <script
      src="https://kit.fontawesome.com/afaa4378ae.js"
      crossorigin="anonymous"
    ></script>
    <title>Document</title>
  </head>
  <body>
    <header class="header">
      <div class="logo">
        <img src="#" alt="Logo" />
      </div>
      <ul class="nav">
        <li><a href="#home">Home</a></li>
        <li><a href="#about">About</a></li>
        <li><a href="#login">Login</a></li>
      </ul>
    </header>

    <section class="landing" id="home">
      <div class="content">
        <h1>It´s all coming together</h1>
        <p>Finally get on top of your money</p>
      </div>
    </section>

    <section class="about" id="about">
      <h1>Our offers</h1>
      <div class="cardwrapper">
        <div class="card">
          <div class="card__icon">
            <i class="fas fa-chart-line fa-3x"></i>
          </div>
          <div class="card__header">
            <h2>All-in-one finances</h2>
          </div>
          <div class="card__description">
            <p>
              We bring all of your money to one place, from balances and bills
              to credit score and more.
            </p>
          </div>
        </div>
        <div class="card">
          <div class="card__icon">
            <i class="fas fa-home fa-3x"></i>
          </div>
          <div class="card__header">
            <h2>Budgets made simple</h2>
          </div>
          <div class="card__description">
            <p>
              The only App you need.
            </p>
          </div>
        </div>
        <div class="card">
          <div class="card__icon">
            <i class="fas fa-tachometer-alt fa-3x"></i>
          </div>
          <div class="card__header">
            <h2>Speed up your financial freedom</h2>
          </div>
          <div class="card__description">
            <p>
              Track your expenses and your depot development in one app.
            </p>
          </div>
        </div>
      </div>
    </section>

    <section class="login" id="login">
      <!-- <h1>Register & Login</h1> -->
      <div class="login__formwrap">
        <div class="info_form">
          <div class="welcome">
            <h2>Welcome</h2>
            <p>Register or sign in here</p>
            <button id="toggleswitch">Register</button>
          </div>

          <div class="info">
            <div class="info__content">
              <i class="fas fa-check"></i>
              <p>Secure and reliable</p>
            </div>
            <div class="info__content">
              <i class="fas fa-check"></i>
              <p>Easy to use</p>
            </div>
            <div class="info__content">
              <i class="fas fa-check"></i>
              <p>Faster than others products</p>
            </div>
          </div>
        </div>

        <div class="login_form">
          <div class="login_form__register active">
            <div class="container">
              <h1>Register</h1>
              <p>Please fill in this form to create an account.</p>
              <hr />

              <label for="email"><b>Email</b></label>
              <input
                type="text"
                placeholder="Enter Email"
                name="email"
                required
              />

              <label for="psw"><b>Password</b></label>
              <input
                type="password"
                placeholder="Enter Password"
                name="psw"
                required
              />

              <label for="psw-repeat"><b>Repeat Password</b></label>
              <input
                type="password"
                placeholder="Repeat Password"
                name="psw-repeat"
                required
              />
              <button type="submit" class="registerbtn">Register</button>
            </div>
          </div>
          <div class="login_form__login">
            <h1>Login</h1>
            <hr />

            <label for="email"><b>Email</b></label>
            <input
              type="text"
              placeholder="Enter Email"
              name="email"
              required
            />

            <label for="psw"><b>Password</b></label>
            <input
              type="password"
              placeholder="Enter Password"
              name="psw"
              required
            />

            <button type="submit" class="registerbtn">Login</button>
          </div>
        </div>
      </div>
    </section>

    <section class="dashboard" id="dashboard">
      <div class="container">
        <div class="container__sidebar">
          <p>Pick your stock here</p>
          <input
            type="text"
            id="searchstock"
            placeholder="Use a stock Symbol"
          />
        </div>
        <div class="container__items">
          <div class="contaimer__items--item_1" id="item_1">
            Item1
          </div>
          <div class="contaimer__items--item_2" id="item_2">
            Item2
          </div>
          <div class="contaimer__items--item_3" id="item_3">
            Item3
          </div>
          <div class="contaimer__items--item_4" id="item_4">
            Item4
          </div>
        </div>
      </div>
    </section>
  </body>

  <script
    src="https://code.jquery.com/jquery-3.4.1.min.js"
    integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
    crossorigin="anonymous"
  ></script>
  <script src="https://code.highcharts.com/highcharts.js"></script>
  <script src="js/script.js"></script>
</html>

            
          
!
            
              // https://www.color-hex.com/color-palette/30415

@import url("https://fonts.googleapis.com/css?family=Roboto&display=swap");

$primary-color: #71c7ec;
$secondary-color: #1ebbd7;

$bg-dark: #005073;

$text-primary: #fff;
$text-secondary: #005073;
$text-tertiary: darken(#fff, 15%);

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

// General stylings

li {
  list-style: none;
}

a {
  text-decoration: none;
  color: $text-primary;
}

// Website
html {
  scroll-behavior: smooth;
}

html,
body {
  font-family: "Roboto", sans-serif;
  font-size: 62.5%; //1 rem = 10px; 10px/16px = 62.5%
  box-sizing: border-box;
}

.header {
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  background: $bg-dark;
  color: $text-primary;
  justify-content: space-between;
  align-items: center;
  font-size: 1.6rem;
  background: #005073;
  text-transform: uppercase;

  & ul {
    display: flex;

    & li a {
      display: block;
      padding: 2rem 1.5rem;
      color: #fff;

      &:hover {
        color: $text-secondary;
        background: #fff;
      }
    }
  }
}

.landing {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-size: 4rem;
  background-image: linear-gradient(
      rgba($primary-color, 0.6),
      rgba($primary-color, 0.6)
    ),
    url("https://images.pexels.com/photos/210990/pexels-photo-210990.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260");
  background-size: cover;
  background-position: center;

  & .content {
    text-align: center;
    text-transform: uppercase;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    color: #fff;
  }
}

.about {
  font-size: 1.6rem;
  padding: 10rem;
  background: darken(#fff, 3%);
  text-align: center;
  text-transform: uppercase;

  & h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
  }

  & .cardwrapper {
    padding: 1rem 1rem;
    display: flex;
    justify-content: space-between;

    & .card {
      border-top: 4px solid $bg-dark;
      width: 30%;
      min-width: 200px;
      max-width: 600px;
      height: 30rem;
      background: #fff;
      padding: 2rem 1.5rem;
      margin-left: 1rem;
      margin-right: 1rem;
      box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
      transition: all 0.3s ease-in;

      & .fas {
        transition: 0.3s all ease-in;
      }

      &__icon {
        padding: 2rem 0;
      }

      &__header {
        padding: 2rem 0;
      }

      &:hover {
        transform: translateY(-5px);
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
      }

      &:hover .fas {
        color: $bg-dark;
        transform: scale(1.05);
      }
    }
  }
}

.login {
  font-size: 1.6rem;
  padding: 10rem;
  background: $bg-dark;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  height: 75rem;

  //   & > h1 {
  //     margin-bottom: 5rem;
  //     font-size: 4rem;
  //     color: #fff;
  //   }

  &__formwrap {
    width: 120rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease-in;
    border: 1px solid #fff;

    &:hover {
      box-shadow: 0px 15px 20px rgba(0, 0, 0, 0.4);
    }

    & .info_form {
      text-align: center;
      padding: 2rem 5rem;
      background: darken($primary-color, 5%);
      color: #fff;

      & .welcome {
        margin-top: 6rem;
        margin-bottom: 7rem;
        font-size: 2.5rem;

        & h2 {
          margin-bottom: 2rem;
        }

        & button {
          cursor: pointer;
          background: $primary-color !important;
          color: white;
          display: block;
          width: 100%;
          border-radius: 100px;
          padding: 1rem 2rem;
          border: 1px solid #fff;
          margin-top: 2rem;
          font-size: 1.6rem;
          transition: all 0.2s ease-in;

          &:hover {
            color: darken($primary-color, 5%) !important;
            background: #fff !important;
          }
        }
      }

      & .info {
        text-align: left;

        &__content {
          display: flex;
        }
      }

      & .info p {
        margin-bottom: 1.6rem;
        margin-left: 0.5rem;

        // &:before {
        //   content: "\f09a";
        //   font-family: "Font Awesome 5 Brands"; /* change like this */
        //   font-weight: 900; /* insert this definition */
        // }
      }
    }

    & .login_form {
      font-size: 2.5rem;
      position: relative;

      &__register {
        position: absolute;
        opacity: 0;
        padding: 4rem 3rem;
      }

      &__login {
        position: absolute;
        opacity: 0;
        padding: 4rem 3rem;
      }
    }
  }
}

.active {
  opacity: 1 !important;
  width: 100%;
  height: 100%;
  background: #fff;
  color: $bg-dark;
  font-size: 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

// Register and Login

/* Add padding to containers */
.container {
  background-color: white;
}

/* Full-width input fields */
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 15px;
  margin: 5px 0 22px 0;
  display: inline-block;
  border: none;
  background: #f1f1f1;
}

input[type="text"]:focus,
input[type="password"]:focus {
  background-color: #ddd;
  outline: none;
}

/* Overwrite default styles of hr */
hr {
  border: 1px solid #f1f1f1;
  margin-bottom: 25px;
}

/* Set a style for the submit button */
.registerbtn {
  background-color: $bg-dark;
  color: white;
  padding: 16px 20px;
  margin: 8px 0;
  border-radius: 100px;
  cursor: pointer;
  width: 100%;
  border: 1px solid white;

  &:hover {
    color: $bg-dark;
    background: #fff;
    border: 1px solid $bg-dark;
  }
}

/* Add a blue text color to links */
a {
  color: dodgerblue;
}

/* Set a grey background color and center the text of the "sign in" section */
.signin {
  background-color: #f1f1f1;
  text-align: center;
}

#dashboard {
  font-size: 1.6rem;
  display: flex;
  justify-content: center;

  .container {
    width: 150rem;
    height: 70rem;
    padding: 3rem 3rem;
    margin-top: 5rem;
    background: $bg-dark;
    display: grid;
    color: #fff;
    grid-template-columns: 1fr 4fr;

    &__items {
      display: grid;
      padding: 2rem 2rem;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr;
      column-gap: 1.5rem;
      row-gap: 1.5rem;
    }
  }
}

            
          
!
            
              // Data

let data = {
  "Meta Data": {
    "1. Information": "Weekly Adjusted Prices and Volumes",
    "2. Symbol": "SAP",
    "3. Last Refreshed": "2019-10-04",
    "4. Time Zone": "US/Eastern"
  },
  "Weekly Adjusted Time Series": {
    "2019-10-04": {
      "1. open": "117.2600",
      "2. high": "118.3400",
      "3. low": "112.8900",
      "4. close": "115.3700",
      "5. adjusted close": "115.3700",
      "6. volume": "4080017",
      "7. dividend amount": "0.0000"
    },
    "2019-09-27": {
      "1. open": "118.8600",
      "2. high": "119.9400",
      "3. low": "116.2500",
      "4. close": "117.4400",
      "5. adjusted close": "117.4400",
      "6. volume": "5829900",
      "7. dividend amount": "0.0000"
    },
    "2019-09-20": {
      "1. open": "117.1100",
      "2. high": "120.8300",
      "3. low": "116.8500",
      "4. close": "119.4000",
      "5. adjusted close": "119.4000",
      "6. volume": "2628500",
      "7. dividend amount": "0.0000"
    },
    "2019-09-13": {
      "1. open": "122.5600",
      "2. high": "122.6600",
      "3. low": "118.8500",
      "4. close": "118.9600",
      "5. adjusted close": "118.9600",
      "6. volume": "3190000",
      "7. dividend amount": "0.0000"
    },
    "2019-09-06": {
      "1. open": "118.8100",
      "2. high": "123.5900",
      "3. low": "118.0900",
      "4. close": "121.9400",
      "5. adjusted close": "121.9400",
      "6. volume": "1944900",
      "7. dividend amount": "0.0000"
    },
    "2019-08-30": {
      "1. open": "118.7000",
      "2. high": "121.1300",
      "3. low": "117.4100",
      "4. close": "119.1500",
      "5. adjusted close": "119.1500",
      "6. volume": "2159500",
      "7. dividend amount": "0.0000"
    },
    "2019-08-23": {
      "1. open": "120.2500",
      "2. high": "121.9000",
      "3. low": "117.3200",
      "4. close": "117.5200",
      "5. adjusted close": "117.5200",
      "6. volume": "2002200",
      "7. dividend amount": "0.0000"
    },
    "2019-08-16": {
      "1. open": "119.4900",
      "2. high": "121.4600",
      "3. low": "116.5600",
      "4. close": "118.9800",
      "5. adjusted close": "118.9800",
      "6. volume": "2584900",
      "7. dividend amount": "0.0000"
    },
    "2019-08-09": {
      "1. open": "120.0200",
      "2. high": "121.8240",
      "3. low": "116.4900",
      "4. close": "119.7500",
      "5. adjusted close": "119.7500",
      "6. volume": "3584900",
      "7. dividend amount": "0.0000"
    },
    "2019-08-02": {
      "1. open": "127.6200",
      "2. high": "127.6200",
      "3. low": "121.2000",
      "4. close": "121.6800",
      "5. adjusted close": "121.6800",
      "6. volume": "2889100",
      "7. dividend amount": "0.0000"
    },
    "2019-07-26": {
      "1. open": "125.8400",
      "2. high": "127.6400",
      "3. low": "124.5300",
      "4. close": "126.9900",
      "5. adjusted close": "126.9900",
      "6. volume": "4148500",
      "7. dividend amount": "0.0000"
    },
    "2019-07-19": {
      "1. open": "136.8261",
      "2. high": "137.3500",
      "3. low": "124.4700",
      "4. close": "124.6300",
      "5. adjusted close": "124.6300",
      "6. volume": "6343700",
      "7. dividend amount": "0.0000"
    },
    "2019-07-12": {
      "1. open": "138.3200",
      "2. high": "138.7100",
      "3. low": "136.0400",
      "4. close": "136.7700",
      "5. adjusted close": "136.7700",
      "6. volume": "2636700",
      "7. dividend amount": "0.0000"
    },
    "2019-07-05": {
      "1. open": "138.7000",
      "2. high": "140.6200",
      "3. low": "137.0900",
      "4. close": "138.1600",
      "5. adjusted close": "138.1600",
      "6. volume": "4932600",
      "7. dividend amount": "0.0000"
    },
    "2019-06-28": {
      "1. open": "135.3300",
      "2. high": "137.4651",
      "3. low": "132.9200",
      "4. close": "136.8000",
      "5. adjusted close": "136.8000",
      "6. volume": "9927200",
      "7. dividend amount": "0.0000"
    },
    "2019-06-21": {
      "1. open": "128.6100",
      "2. high": "134.8000",
      "3. low": "128.3100",
      "4. close": "134.3500",
      "5. adjusted close": "134.3500",
      "6. volume": "4233000",
      "7. dividend amount": "0.0000"
    }
  }
};

// UI

const btn = document.getElementById("toggleswitch");

btn.addEventListener("click", function() {
  document
    .querySelectorAll(".login_form__register")[0]
    .classList.toggle("active");
  document.querySelectorAll(".login_form__login")[0].classList.toggle("active");

  if (btn.innerHTML === "Register") {
    btn.innerHTML = "Login";
  } else {
    btn.innerHTML = "Register";
  }
});

document.getElementById("searchstock").addEventListener("input", function(e) {
  // change maybe?
  console.log(e.target.value);
});

// Charts

$(function() {
  $("#item_1").highcharts({
    chart: {
      animation: {
        duration: 1000
      }
    },

    xAxis: {
      categories: [
        "Jan",
        "Feb",
        "Mar",
        "Apr",
        "May",
        "Jun",
        "Jul",
        "Aug",
        "Sep",
        "Oct",
        "Nov",
        "Dec"
      ]
    },

    series: [
      {
        data: [
          29.9,
          71.5,
          106.4,
          129.2,
          144.0,
          176.0,
          135.6,
          148.5,
          216.4,
          194.1,
          95.6,
          54.4,
          216.4,
          194.1,
          95.6,
          54.4
        ],
        name: "title"
      }
    ]
  });
});

$(function() {
  $("#item_2").highcharts({
    chart: {
      animation: {
        duration: 1000
      }
    },

    xAxis: {
      categories: [
        "Jan",
        "Feb",
        "Mar",
        "Apr",
        "May",
        "Jun",
        "Jul",
        "Aug",
        "Sep",
        "Oct",
        "Nov",
        "Dec"
      ]
    },

    series: [
      {
        data: [
          29.9,
          71.5,
          106.4,
          129.2,
          144.0,
          176.0,
          135.6,
          148.5,
          216.4,
          194.1,
          95.6,
          54.4,
          216.4,
          194.1,
          95.6,
          54.4
        ],
        name: "title"
      }
    ]
  });
});

$(function() {
  $("#item_3").highcharts({
    chart: {
      animation: {
        duration: 1000
      }
    },

    xAxis: {
      categories: [
        "Jan",
        "Feb",
        "Mar",
        "Apr",
        "May",
        "Jun",
        "Jul",
        "Aug",
        "Sep",
        "Oct",
        "Nov",
        "Dec"
      ]
    },

    series: [
      {
        data: [
          29.9,
          71.5,
          106.4,
          129.2,
          144.0,
          176.0,
          135.6,
          148.5,
          216.4,
          194.1,
          95.6,
          54.4,
          216.4,
          194.1,
          95.6,
          54.4
        ],
        name: "title"
      }
    ]
  });
});

$(function() {
  $("#item_4").highcharts({
    chart: {
      animation: {
        duration: 1000
      }
    },

    xAxis: {
      categories: [
        "Jan",
        "Feb",
        "Mar",
        "Apr",
        "May",
        "Jun",
        "Jul",
        "Aug",
        "Sep",
        "Oct",
        "Nov",
        "Dec"
      ]
    },

    series: [
      {
        data: [
          29.9,
          71.5,
          106.4,
          129.2,
          144.0,
          176.0,
          135.6,
          148.5,
          216.4,
          194.1,
          95.6,
          54.4,
          216.4,
          194.1,
          95.6,
          54.4
        ],
        name: "title"
      }
    ]
  });
});

            
          
!
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.

Console