aboutsummaryrefslogtreecommitdiff
path: root/htmx/static/pico-1.5.11/docs/src/themes.html
blob: 1f6cb99194689f88e7d38e8e9a87034a76aa615a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!doctype html>
<html lang="en">
  <head>
    ${require('./_head.html') 
      title=`Themes` 
      description=`Pico is shipped with 2 consistent themes: Light & Dark. The Light theme is used by default. The Dark theme is automatically enabled if the user has dark mode enabled ('prefers-color-scheme: dark').`
      canonical=`themes.html`
    }
  </head>

  <body>
    ${require('./_nav.html')}
    
    <main class="container" id="docs">
      ${require('./_sidebar.html') active=`themes-link`}
      
      <div role="document">
        <section id="themes">
          <hgroup>
            <h1>Themes</h1>
            <h2>Pico is shipped with 2 consistent themes: Light & Dark.</h2>
          </hgroup>
          <p>The Light theme is used by default. The Dark theme is automatically enabled if the user has dark mode enabled <code><i>prefers-color-scheme</i>: <u>dark</u></code></p>
          <article aria-label="Theme switcher">
            <button class="contrast theme-switcher">…</button>
          </article>
          <p>Themes can be forced on document level <code>&lt;<b>html</b> <i>data-theme</i>=<u>"light"</u>&gt;</code> or on any HTML element <code>&lt;<b>article</b> <i>data-theme</i>=<u>"dark"</u>&gt;</code></p>
          <article data-theme="light" aria-label="Forced light theme example">
            <h3>Light theme</h3>
            <form class="grid">
              <input type="text" name="login" placeholder="Login" aria-label="Login" autocomplete="nickname" required>
              <input type="password" name="password" placeholder="Password" aria-label="Password" autocomplete="current-password" required>
              <button type="submit" aria-label="Example button" onclick="event.preventDefault()">Login</button>
            </form>
            <footer class="code">

<pre><code>&lt;<b>article</b> <i>data-theme</i>=<u>"light"</u>&gt;
  …
&lt;/<b>article</b>&gt;</code></pre>

            </footer>
          </article>
          <article data-theme="dark" aria-label="Forced dark theme example">
            <h3>Dark theme</h3>
            <form class="grid">
              <input type="text" name="login" placeholder="Login" aria-label="Login" autocomplete="nickname" required>
              <input type="password" name="password" placeholder="Password" aria-label="Password" autocomplete="current-password" required>
              <button type="submit" aria-label="Example button" onclick="event.preventDefault()">Login</button>
            </form>
            <footer class="code">

<pre><code>&lt;<b>article</b> <i>data-theme</i>=<u>"dark"</u>&gt;
  …
&lt;/<b>article</b>&gt;</code></pre>

            </footer>
          </article>
        </section>

        ${require('./_footer.html')}

      </div>
    </main>
    <script src="js/commons.min.js"></script>
  </body>
</html>