aboutsummaryrefslogtreecommitdiff
path: root/web/pw-server/src/routes/docs/__layout.svelte
blob: 40c4317f270839b3be7073f695370c03d41d6e1c (plain)
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
<script>
  import TocEntry from "$lib/components/docs/TocEntry.svelte";
</script>

<div class="container">
  <div class="sidebar">
    <div class="sidebar-content">
      <h2>Docs</h2>
      <div class="sidebar-nav-group">
        <TocEntry href="/docs/rules" text="Rules" />
      </div>
    </div>
  </div>
  <div class="content-container">
    <div class="content">
      <slot />
    </div>
  </div>
</div>

<style lang="scss">
  @use "src/styles/variables";

  .container {
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
      "Open Sans", "Helvetica Neue", sans-serif;
  }

  .sidebar {
    width: 300px;
    line-height: 20px;
    border-right: 1px solid variables.$light-grey;
  }

  .sidebar-content {
    padding: 32px 16px;
    position: sticky;
    align-self: flex-start;
    top: 0px;
  }

  .sidebar-content h2 {
    margin: 16px 0;
  }

  .sidebar-nav-group {
    padding: 0 8px;
  }

  .content-container {
    padding: 16px 0;
    flex-grow: 1;
  }

  .content {
    max-width: 75%;
    margin: 0 auto;
  }
</style>