<!DOCTYPE html>
<html>

<head>
  <style>
    
    body {
      background-color: lightblue;
    }
    
    .speech-bubble {
      position: relative;
      background: #f0f0f0;
      color: #333;
      padding: 15px;
      width: 200px;
      border-radius: 10px;
      text-align: center;
      font-family: Arial, sans-serif;
      font-size: 16px;
      box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
      transform: translate(80px);
    }

    .speech-bubble::after {
      content: "";
      position: absolute;
      bottom: -20px;
      left: 20px;
      border-width: 10px;
      border-style: solid;
      border-color: #f0f0f0 transparent transparent transparent;
      display: block;
    }

    body {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    img {
      width: 20vw;
      image-rendering: pixelated;
      z-index: 10;
    }
  </style>
  <title>Shellfish Say</title>
</head>

<body>
  <main>
    <div class="speech-bubble"></div>
    <br/>
    <img src="https://i.giphy.com/uOx4m7GF9mEpkh9MgE.webp" style="width: 350px; height: auto;" alt="shellfish">
  </main>
  <script>
    async function load_quote() {
      const params = new URLSearchParams(window.location.search);
      const quote_file = params.get("quote") ?? "shellfish.txt";
      let quote;
      let resp = await fetch(`/get_quote?quote=${quote_file}`);
      quote = await resp.text();
      
      document.body.getElementsByClassName("speech-bubble")[0].innerHTML = quote;
    }

    document.addEventListener("DOMContentLoaded", function(event){
      load_quote();
    });
  </script>
</body>

</html>