<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  <title>esp-rs Documentation and Resources</title>

  <link rel="icon" href="/projects/rust/esp-rs.svg" />
  <link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500&display=swap" rel="stylesheet" />
  <link href="https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;1,400;1,600&display=swap"
    rel="stylesheet" />

  <style>
    body {
      background-color: rgb(53, 53, 53);
      font-family: "Fira Sans", sans-serif;
      color: white;
      margin: 0;
      padding: 40px 20px;
      display: flex;
      justify-content: center;
      box-sizing: border-box;
    }

    .logo {
      text-align: center;
      margin-bottom: 42px;
      font-size: 0.8em;
      font-weight: 100;
    }

    .logo img {
      width: 100px;
      height: auto;
      margin-bottom: 12px;
    }

    .logo h2 {
      margin-top: 0.5rem;
    }

    .content {
      width: 900px;
    }

    h2 {
      margin-top: 3rem;
    }

    .crate {
      display: flex;
      align-items: center;
      padding: 10px;
      border-bottom: 2px solid #454444;
    }

    .crate-description {
      flex: 1;
      font-family: "Source Serif 4", serif;
      color: #c0c0c0;
      text-align: center;
    }

    .crate-name {
      color: #d6991d;
      width: 220px;
    }

    /* Ensure the link color does not change after being clicked */
    .crate-name a:link,
    .crate-name a:visited,
    .crate-name a:hover,
    .crate-name a:active,
    .crate-name a:focus {
      color: #d6991d;
    }

    .crate-version {
      color: #c0c0c0;
      text-align: center;
      width: 120px;
    }

    .resource {
      display: flex;
      align-items: center;
      padding: 10px;
      border-bottom: 2px solid #454444;
    }

    .resource-name {
      color: #d6991d;
      width: 400px;
    }

    /* Ensure the link color does not change after being clicked */
    .resource-name a:link,
    .resource-name a:visited,
    .resource-name a:hover,
    .resource-name a:active,
    .resource-name a:focus {
      color: #d6991d;
    }

    @media screen and (min-height: 650px) {
      body {
        align-items: center;
      }
    }
  </style>
</head>

<body>
  <div class="content">
    <div class="logo">
      <img src="esp-rs.svg" alt="esp-rs logo" />
      <h2>esp-rs Documentation and Resources</h2>
      Bare-metal (no_std) hardware abstraction layer for Espressif devices.
    </div>

    <h2>Resources</h2>

    <div class="resource"><span class="resource-name"><a href="https://docs.espressif.com/projects/rust/book/">The Rust on ESP Book</a></span></div>
    <div class="resource"><span class="resource-name"><a href="https://docs.espressif.com/projects/rust/no_std-training/">Embedded Rust (no_std) on Espressif Training</a></span></div>


    <h2>Package Documentation</h2>

    {%- for meta in metadata %}
    <div class="crate">
      <span class="crate-name">
        <a href="{{ meta.url }}">{{ meta.name }}</a>
      </span>
      <span class="crate-description">Documentation for <code>{{ meta.name }}</code> crate</span>
      <span class="crate-version">{{ meta.version }}</span>
    </div>
    {%- endfor %}

  </div>
</body>

</html>
