atagen

matrix-rust-sdk

public
Star0
Watch0
ssh://brewery@pls.lobotomise.me:33/atagen/matrix-rust-sdk.git
xtask/src/log/overview.template.htmlHtml269 lines6.4 KB
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
5
  <meta http-equiv="content-security-policy" content="default-src 'self'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:">
6
  <meta name="viewport" content="width=device-width, minimum-scale=1">
7
8
  <style>
9
  /* Reset */
10
11
  *, *::before, *::after {
12
    box-sizing: border-box;
13
  }
14
15
  * { margin: 0 }
16
17
  :root {
18
    --space-very-small: .25rem;
19
    --space-small: .5rem;
20
    --space: 1rem;
21
    --space-large: 2rem;
22
    --space-very-large: 4rem;
23
24
    --border-radius: 3px;
25
26
    --line-height: 1.5rem;
27
28
    --color-accent: oklch(59.1% .236 10.25);
29
    --color-text: oklch(.84 0 0);
30
    --color-canvas: oklch(0.258 0.007 285.867);
31
    --color-canvas-lighter: oklch(0.303 0.007 285.966);
32
    --color-canvas-lighter-2: oklch(0.343 0.009 285.935);
33
    --color-canvas-lighter-3: oklch(.6 0 0);
34
35
    --color-white: oklch(1 0 0);
36
    --color-red: oklch(.503 .172 25);
37
    --color-orange: oklch(.793 .171 70.67);
38
    --color-blue: oklch(0.579 0.191 252.0);
39
    --color-green: oklch(0.571 0.181 145.0);
40
    --color-black: oklch(0 0 0);
41
42
    --color-yellow: oklch(.968 .211 109.769);
43
    --color-yellow-light: oklch(.568 .211 109.769);
44
  }
45
46
  .content-grid {
47
    --padding-inline: 1rem;
48
    --content-max-width: 70ch;
49
    --breakout-max-width: 85ch;
50
51
    --breakout-size: calc((var(--breakout-max-width) - var(--content-max-width)) / 2);
52
53
    display: grid;
54
    grid-template-columns:
55
      [full-width-start]
56
        minmax(var(--padding-inline), 1fr)
57
        [breakout-start]
58
          minmax(0, var(--breakout-size))
59
          [content-start]
60
            min(
61
              100% - (var(--padding-inline) * 2),
62
              var(--content-max-width)
63
            )
64
          [content-end]
65
          minmax(0, var(--breakout-size))
66
        [breakout-end]
67
        minmax(var(--padding-inline), 1fr)
68
      [full-width-end];
69
70
    > * {
71
      grid-column: content;
72
    }
73
74
    > .breakout {
75
      grid-column: breakout;
76
    }
77
78
    > .full-width {
79
      grid-column: full-width;
80
    }
81
  }
82
83
  html {
84
    color-scheme: dark;
85
    scroll-padding-top: var(--space-very-large);
86
  }
87
88
  body {
89
    font-size: .95rem;
90
    /* Thanks modernfontstacks.com */
91
    font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
92
    font-weight: normal;
93
    font-variant-numeric: proportional-nums slashed-zero;
94
    color: var(--color-text);
95
    background: var(--color-canvas);
96
    scroll-behaviour: smooth;
97
  }
98
99
  header {
100
    text-align: center;
101
    text-wrap: balanced;
102
    margin-block: var(--space) var(--space-large);
103
  }
104
105
  code {
106
    /* Thanks modernfontstacks.com */
107
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
108
    font-weight: normal;
109
    font-size: .9em;
110
    line-height: var(--line-height);
111
  }
112
113
  main {
114
    --_aside-column-width: 10rem;
115
116
    position: relative;
117
118
    line-height: var(--line-height);
119
120
    & > ul {
121
      padding-inline-start: calc(var(--_aside-column-width) + var(--space));
122
      background-image: linear-gradient(var(--color-canvas-lighter) 50%, var(--color-canvas) 50%);
123
      background-size: 100% calc(var(--line-height) * 2);
124
    }
125
126
    ul {
127
      list-style: none;
128
129
      ul {
130
        padding-inline-start: var(--space);
131
      }
132
    }
133
134
    ul.fields {
135
      display: grid;
136
      grid-template-columns: max-content 1fr;
137
      gap: 0 var(--space-large);
138
139
      > li {
140
        display: grid;
141
        grid-column: 1 / -1;
142
        grid-template-columns: subgrid;
143
      }
144
    }
145
146
    ol.spans {
147
      --_line-width: 2px;
148
      --_color: var(--color-canvas-lighter-3);
149
150
      list-style-type: "●";
151
      list-style-position: outside;
152
      margin-inline-start: .2rem;
153
      padding-inline-start: var(--space);
154
155
      border: var(--_color) solid;
156
      border-width: 0 0 0 var(--_line-width);
157
158
      > li {
159
        margin-inline-start: calc(-1ch - var(--_line-width) / 2);
160
        padding-inline-start: var(--space);
161
162
        &::marker { color: var(--_color) }
163
164
        > time {
165
          position: absolute;
166
          transform: translateX(calc(-100% - var(--space) * 2 - .8rem));
167
          font-variant-numeric: slashed-zero tabular-nums;
168
       }
169
      }
170
    }
171
172
    summary {
173
      cursor: pointer;
174
      height: var(--line-height);
175
    }
176
177
    code {
178
      line-height: var(--line-height);
179
    }
180
181
    .aside {
182
      position: absolute;
183
      left: 0;
184
      width: var(--_aside-column-width);
185
      font-variant-numeric: slashed-zero tabular-nums;
186
187
      > * {
188
        display: inline-block;
189
190
        &.highlight {
191
          min-width: 1.5rem;
192
          text-align: center;
193
194
          /* hide the highlight box by default */
195
          input { visibility: hidden }
196
197
          /* highlight the line when the input is checked */
198
          &:has(input:checked)::before {
199
            position: absolute;
200
            content: "";
201
            left: 0;
202
            height: var(--line-height);
203
            width: 100vw;
204
            border: var(--color-yellow) solid;
205
            border-width: 1px 0;
206
            pointer-events: none;
207
          }
208
        }
209
210
        &.error, &.warn {
211
          min-width: 3.5rem;
212
          margin-inline: .2rem;
213
          text-align: end;
214
        }
215
      }
216
217
      /* shows the highlight checkbox on `:hover` */
218
      :is(summary:hover, li:hover) > & > .highlight > input { visibility: visible }
219
    }
220
221
    /* highlight the parent node if a child line is checked */
222
    details:not([open]):has(.highlight > input:checked)::before {
223
      position: absolute;
224
      content: "";
225
      left: 0;
226
      height: var(--line-height);
227
      width: 100vw;
228
      border: oklch(.568 .211 109.769) solid;
229
      border-width: 0 0 2px 0;
230
      pointer-events: none;
231
    }
232
233
    .error, .warn, .info, .debug, .trace {
234
      display: inline-block;
235
      font-size: .9em;
236
      vertical-align: center;
237
      line-height: 1.4em;
238
      padding-inline: var(--space-very-small);
239
      border-radius: var(--border-radius);
240
      color: var(--color-white);
241
    }
242
243
    .error { background: var(--color-red) }
244
    .warn { background: var(--color-orange) }
245
    .info { background: var(--color-blue) }
246
    .debug { background: var(--color-green) }
247
    .trace { background: var(--color-black) }
248
  }
249
</style>
250
251
  <title>Overview</title>
252
</head>
253
254
<body class="content-grid">
255
256
<header>
257
  <h1>Overview of <code>{log_file}</code></h1>
258
</header>
259
260
<main class="full-width">
261
262
<!--
263
the tree and the end of file is written by Rust for performance reason:
264
265
</main>
266
267
</body>
268
</html>
269
-->