<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/ray.svg" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
    />
    <title>Vite + Vue + TS</title>
  </head>
  <style>
    :root {
      --preloading-tag-color: <%= preloadingConfig.tagColor %>;
      --preloading-title-color: <%= preloadingConfig.titleColor %>;
      --ray-theme-primary-fade-color: <%= appPrimaryColor.primaryFadeColor %>;
      --ray-theme-primary-color: <%= appPrimaryColor.primaryColor %>;
    }

    #pre-loading-animation {
      position: fixed;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      background-color: #ffffff;
      color: var(--preloading-title-color);
      text-align: center;
    }

    .ray-template--dark #pre-loading-animation {
      background-color: #2a3146;
    }

    #pre-loading-animation .pre-loading-animation__wrapper {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    #pre-loading-animation
      .pre-loading-animation__wrapper
      .pre-loading-animation__wrapper-title {
      font-size: 32px;
      padding-bottom: 48px;
      font-weight: 500;
    }

    .pre-loading-animation__wrapper-loading {
      display: block;
      position: relative;
      width: 6px;
      height: 10px;

      animation: rectangle infinite 1s ease-in-out -0.2s;

      background-color: var(--preloading-tag-color);
    }

    .pre-loading-animation__wrapper-loading:before,
    .pre-loading-animation__wrapper-loading:after {
      position: absolute;
      width: 6px;
      height: 10px;
      content: '';
      background-color: var(--preloading-tag-color);
    }

    .pre-loading-animation__wrapper-loading:before {
      left: -14px;

      animation: rectangle infinite 1s ease-in-out -0.4s;
    }

    .pre-loading-animation__wrapper-loading:after {
      right: -14px;

      animation: rectangle infinite 1s ease-in-out;
    }

    @keyframes rectangle {
      0%,
      80%,
      100% {
        height: 20px;
        box-shadow: 0 0 var(--preloading-tag-color);
      }

      40% {
        height: 30px;
        box-shadow: 0 -20px var(--preloading-tag-color);
      }
    }
  </style>
  <body>
    <div id="app"></div>
    <div id="pre-loading-animation">
      <div class="pre-loading-animation__wrapper">
        <div class="pre-loading-animation__wrapper-title">
          <%= preloadingConfig.title %>
        </div>
        <div class="pre-loading-animation__wrapper-loading"></div>
      </div>
    </div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>