An OIDC-protected index page for your homeserver.

chore: ignore generated files

Now that we can actually regenerate them easily!

Changed files
+3 -801
static
views
+3
.gitignore
··· 1 .env 2 *.kdl
··· 1 .env 2 *.kdl 3 + 4 + *_templ.go 5 + static/styles.css
-461
static/styles.css
··· 1 - /*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */ 2 - @layer properties; 3 - @layer theme, base, components, utilities; 4 - @layer theme { 5 - :root, :host { 6 - --font-sans: "Recursive", sans-serif; 7 - --font-serif: "Recursive", serif; 8 - --font-mono: "Recursive", monospace; 9 - --spacing: 0.25rem; 10 - --breakpoint-sm: 40rem; 11 - --breakpoint-md: 48rem; 12 - --breakpoint-lg: 64rem; 13 - --container-xs: 20rem; 14 - --text-xs: 0.75rem; 15 - --text-xs--line-height: calc(1 / 0.75); 16 - --text-sm: 0.875rem; 17 - --text-sm--line-height: calc(1.25 / 0.875); 18 - --text-lg: 1.125rem; 19 - --text-lg--line-height: calc(1.75 / 1.125); 20 - --font-weight-bold: 700; 21 - --radius-lg: 0.5rem; 22 - --default-font-family: var(--font-sans); 23 - --default-mono-font-family: var(--font-mono); 24 - --default-mono-font-variation-settings: var(--font-mono--font-variation-settings); 25 - --color-base: rgb(25, 23, 36); 26 - --color-surface: rgb(31, 29, 46); 27 - --color-muted: rgb(110, 106, 134); 28 - --color-subtle: rgb(144, 140, 170); 29 - --color-text: rgb(224, 222, 244); 30 - --color-gold: rgb(246, 193, 119); 31 - --color-foam: rgb(156, 207, 216); 32 - --color-iris: rgb(196, 167, 231); 33 - --color-highlight-med: rgb(64, 61, 82); 34 - --font-serif--font-variation-settings: "slnt" -12, "CASL" 1, "CRSV" 1; 35 - --font-mono--font-variation-settings: "MONO" 1; 36 - } 37 - } 38 - @layer base { 39 - *, ::after, ::before, ::backdrop, ::file-selector-button { 40 - box-sizing: border-box; 41 - margin: 0; 42 - padding: 0; 43 - border: 0 solid; 44 - } 45 - html, :host { 46 - line-height: 1.5; 47 - -webkit-text-size-adjust: 100%; 48 - tab-size: 4; 49 - font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'); 50 - font-feature-settings: var(--default-font-feature-settings, normal); 51 - font-variation-settings: var(--default-font-variation-settings, normal); 52 - -webkit-tap-highlight-color: transparent; 53 - } 54 - hr { 55 - height: 0; 56 - color: inherit; 57 - border-top-width: 1px; 58 - } 59 - abbr:where([title]) { 60 - -webkit-text-decoration: underline dotted; 61 - text-decoration: underline dotted; 62 - } 63 - h1, h2, h3, h4, h5, h6 { 64 - font-size: inherit; 65 - font-weight: inherit; 66 - } 67 - a { 68 - color: inherit; 69 - -webkit-text-decoration: inherit; 70 - text-decoration: inherit; 71 - } 72 - b, strong { 73 - font-weight: bolder; 74 - } 75 - code, kbd, samp, pre { 76 - font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace); 77 - font-feature-settings: var(--default-mono-font-feature-settings, normal); 78 - font-variation-settings: var(--default-mono-font-variation-settings, normal); 79 - font-size: 1em; 80 - } 81 - small { 82 - font-size: 80%; 83 - } 84 - sub, sup { 85 - font-size: 75%; 86 - line-height: 0; 87 - position: relative; 88 - vertical-align: baseline; 89 - } 90 - sub { 91 - bottom: -0.25em; 92 - } 93 - sup { 94 - top: -0.5em; 95 - } 96 - table { 97 - text-indent: 0; 98 - border-color: inherit; 99 - border-collapse: collapse; 100 - } 101 - :-moz-focusring { 102 - outline: auto; 103 - } 104 - progress { 105 - vertical-align: baseline; 106 - } 107 - summary { 108 - display: list-item; 109 - } 110 - ol, ul, menu { 111 - list-style: none; 112 - } 113 - img, svg, video, canvas, audio, iframe, embed, object { 114 - display: block; 115 - vertical-align: middle; 116 - } 117 - img, video { 118 - max-width: 100%; 119 - height: auto; 120 - } 121 - button, input, select, optgroup, textarea, ::file-selector-button { 122 - font: inherit; 123 - font-feature-settings: inherit; 124 - font-variation-settings: inherit; 125 - letter-spacing: inherit; 126 - color: inherit; 127 - border-radius: 0; 128 - background-color: transparent; 129 - opacity: 1; 130 - } 131 - :where(select:is([multiple], [size])) optgroup { 132 - font-weight: bolder; 133 - } 134 - :where(select:is([multiple], [size])) optgroup option { 135 - padding-inline-start: 20px; 136 - } 137 - ::file-selector-button { 138 - margin-inline-end: 4px; 139 - } 140 - ::placeholder { 141 - opacity: 1; 142 - } 143 - @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) { 144 - ::placeholder { 145 - color: currentcolor; 146 - @supports (color: color-mix(in lab, red, red)) { 147 - color: color-mix(in oklab, currentcolor 50%, transparent); 148 - } 149 - } 150 - } 151 - textarea { 152 - resize: vertical; 153 - } 154 - ::-webkit-search-decoration { 155 - -webkit-appearance: none; 156 - } 157 - ::-webkit-date-and-time-value { 158 - min-height: 1lh; 159 - text-align: inherit; 160 - } 161 - ::-webkit-datetime-edit { 162 - display: inline-flex; 163 - } 164 - ::-webkit-datetime-edit-fields-wrapper { 165 - padding: 0; 166 - } 167 - ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { 168 - padding-block: 0; 169 - } 170 - ::-webkit-calendar-picker-indicator { 171 - line-height: 1; 172 - } 173 - :-moz-ui-invalid { 174 - box-shadow: none; 175 - } 176 - button, input:where([type='button'], [type='reset'], [type='submit']), ::file-selector-button { 177 - appearance: button; 178 - } 179 - ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { 180 - height: auto; 181 - } 182 - [hidden]:where(:not([hidden='until-found'])) { 183 - display: none !important; 184 - } 185 - } 186 - @layer utilities { 187 - .static { 188 - position: static; 189 - } 190 - .col-span-1 { 191 - grid-column: span 1 / span 1; 192 - } 193 - .col-span-full { 194 - grid-column: 1 / -1; 195 - } 196 - .container { 197 - width: 100%; 198 - @media (width >= 40rem) { 199 - max-width: 40rem; 200 - } 201 - @media (width >= 48rem) { 202 - max-width: 48rem; 203 - } 204 - @media (width >= 64rem) { 205 - max-width: 64rem; 206 - } 207 - @media (width >= 80rem) { 208 - max-width: 80rem; 209 - } 210 - @media (width >= 96rem) { 211 - max-width: 96rem; 212 - } 213 - } 214 - .mx-auto { 215 - margin-inline: auto; 216 - } 217 - .mb-3 { 218 - margin-bottom: calc(var(--spacing) * 3); 219 - } 220 - .mb-4 { 221 - margin-bottom: calc(var(--spacing) * 4); 222 - } 223 - .block { 224 - display: block; 225 - } 226 - .contents { 227 - display: contents; 228 - } 229 - .flex { 230 - display: flex; 231 - } 232 - .grid { 233 - display: grid; 234 - } 235 - .aspect-square { 236 - aspect-ratio: 1 / 1; 237 - } 238 - .h-4 { 239 - height: calc(var(--spacing) * 4); 240 - } 241 - .h-screen { 242 - height: 100vh; 243 - } 244 - .w-4 { 245 - width: calc(var(--spacing) * 4); 246 - } 247 - .w-full { 248 - width: 100%; 249 - } 250 - .w-screen { 251 - width: 100vw; 252 - } 253 - .max-w-xs { 254 - max-width: var(--container-xs); 255 - } 256 - .transform { 257 - transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,); 258 - } 259 - .grid-cols-3 { 260 - grid-template-columns: repeat(3, minmax(0, 1fr)); 261 - } 262 - .grid-cols-subgrid { 263 - grid-template-columns: subgrid; 264 - } 265 - .flex-col { 266 - flex-direction: column; 267 - } 268 - .items-center { 269 - align-items: center; 270 - } 271 - .justify-between { 272 - justify-content: space-between; 273 - } 274 - .justify-center { 275 - justify-content: center; 276 - } 277 - .gap-4 { 278 - gap: calc(var(--spacing) * 4); 279 - } 280 - .gap-x-4 { 281 - column-gap: calc(var(--spacing) * 4); 282 - } 283 - .gap-y-8 { 284 - row-gap: calc(var(--spacing) * 8); 285 - } 286 - .rounded { 287 - border-radius: 0.25rem; 288 - } 289 - .rounded-full { 290 - border-radius: calc(infinity * 1px); 291 - } 292 - .rounded-lg { 293 - border-radius: var(--radius-lg); 294 - } 295 - .border { 296 - border-style: var(--tw-border-style); 297 - border-width: 1px; 298 - } 299 - .border-muted\/20 { 300 - border-color: color-mix(in srgb, rgb(110, 106, 134) 20%, transparent); 301 - @supports (color: color-mix(in lab, red, red)) { 302 - border-color: color-mix(in oklab, var(--color-muted) 20%, transparent); 303 - } 304 - } 305 - .bg-base { 306 - background-color: var(--color-base); 307 - } 308 - .bg-foam\/20 { 309 - background-color: color-mix(in srgb, rgb(156, 207, 216) 20%, transparent); 310 - @supports (color: color-mix(in lab, red, red)) { 311 - background-color: color-mix(in oklab, var(--color-foam) 20%, transparent); 312 - } 313 - } 314 - .bg-surface { 315 - background-color: var(--color-surface); 316 - } 317 - .p-4 { 318 - padding: calc(var(--spacing) * 4); 319 - } 320 - .px-2 { 321 - padding-inline: calc(var(--spacing) * 2); 322 - } 323 - .px-3 { 324 - padding-inline: calc(var(--spacing) * 3); 325 - } 326 - .py-2 { 327 - padding-block: calc(var(--spacing) * 2); 328 - } 329 - .pt-4 { 330 - padding-top: calc(var(--spacing) * 4); 331 - } 332 - .text-center { 333 - text-align: center; 334 - } 335 - .font-mono { 336 - font-family: var(--font-mono); 337 - font-variation-settings: var(--font-mono--font-variation-settings); 338 - } 339 - .font-serif { 340 - font-family: var(--font-serif); 341 - font-variation-settings: var(--font-serif--font-variation-settings); 342 - } 343 - .text-lg { 344 - font-size: var(--text-lg); 345 - line-height: var(--tw-leading, var(--text-lg--line-height)); 346 - } 347 - .text-sm { 348 - font-size: var(--text-sm); 349 - line-height: var(--tw-leading, var(--text-sm--line-height)); 350 - } 351 - .text-xs { 352 - font-size: var(--text-xs); 353 - line-height: var(--tw-leading, var(--text-xs--line-height)); 354 - } 355 - .leading-none { 356 - --tw-leading: 1; 357 - line-height: 1; 358 - } 359 - .font-bold { 360 - --tw-font-weight: var(--font-weight-bold); 361 - font-weight: var(--font-weight-bold); 362 - } 363 - .text-foam { 364 - color: var(--color-foam); 365 - } 366 - .text-gold { 367 - color: var(--color-gold); 368 - } 369 - .text-highlight-med { 370 - color: var(--color-highlight-med); 371 - } 372 - .text-iris { 373 - color: var(--color-iris); 374 - } 375 - .text-subtle { 376 - color: var(--color-subtle); 377 - } 378 - .text-text { 379 - color: var(--color-text); 380 - } 381 - .underline { 382 - text-decoration-line: underline; 383 - } 384 - .sm\:max-w-screen-sm { 385 - @media (width >= 40rem) { 386 - max-width: var(--breakpoint-sm); 387 - } 388 - } 389 - .sm\:grid-cols-4 { 390 - @media (width >= 40rem) { 391 - grid-template-columns: repeat(4, minmax(0, 1fr)); 392 - } 393 - } 394 - .md\:max-w-screen-md { 395 - @media (width >= 48rem) { 396 - max-width: var(--breakpoint-md); 397 - } 398 - } 399 - .md\:grid-cols-6 { 400 - @media (width >= 48rem) { 401 - grid-template-columns: repeat(6, minmax(0, 1fr)); 402 - } 403 - } 404 - .lg\:max-w-screen-lg { 405 - @media (width >= 64rem) { 406 - max-width: var(--breakpoint-lg); 407 - } 408 - } 409 - .lg\:grid-cols-8 { 410 - @media (width >= 64rem) { 411 - grid-template-columns: repeat(8, minmax(0, 1fr)); 412 - } 413 - } 414 - } 415 - @property --tw-rotate-x { 416 - syntax: "*"; 417 - inherits: false; 418 - } 419 - @property --tw-rotate-y { 420 - syntax: "*"; 421 - inherits: false; 422 - } 423 - @property --tw-rotate-z { 424 - syntax: "*"; 425 - inherits: false; 426 - } 427 - @property --tw-skew-x { 428 - syntax: "*"; 429 - inherits: false; 430 - } 431 - @property --tw-skew-y { 432 - syntax: "*"; 433 - inherits: false; 434 - } 435 - @property --tw-border-style { 436 - syntax: "*"; 437 - inherits: false; 438 - initial-value: solid; 439 - } 440 - @property --tw-leading { 441 - syntax: "*"; 442 - inherits: false; 443 - } 444 - @property --tw-font-weight { 445 - syntax: "*"; 446 - inherits: false; 447 - } 448 - @layer properties { 449 - @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) { 450 - *, ::before, ::after, ::backdrop { 451 - --tw-rotate-x: initial; 452 - --tw-rotate-y: initial; 453 - --tw-rotate-z: initial; 454 - --tw-skew-x: initial; 455 - --tw-skew-y: initial; 456 - --tw-border-style: solid; 457 - --tw-leading: initial; 458 - --tw-font-weight: initial; 459 - } 460 - } 461 - }
···
-61
views/document_templ.go
··· 1 - // Code generated by templ - DO NOT EDIT. 2 - 3 - // templ: version: v0.3.943 4 - package views 5 - 6 - //lint:file-ignore SA4006 This context is only used if a nested component is present. 7 - 8 - import "github.com/a-h/templ" 9 - import templruntime "github.com/a-h/templ/runtime" 10 - 11 - func Document(title string) templ.Component { 12 - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 13 - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context 14 - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { 15 - return templ_7745c5c3_CtxErr 16 - } 17 - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) 18 - if !templ_7745c5c3_IsBuffer { 19 - defer func() { 20 - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) 21 - if templ_7745c5c3_Err == nil { 22 - templ_7745c5c3_Err = templ_7745c5c3_BufErr 23 - } 24 - }() 25 - } 26 - ctx = templ.InitializeContext(ctx) 27 - templ_7745c5c3_Var1 := templ.GetChildren(ctx) 28 - if templ_7745c5c3_Var1 == nil { 29 - templ_7745c5c3_Var1 = templ.NopComponent 30 - } 31 - ctx = templ.ClearChildren(ctx) 32 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<html><head><title>") 33 - if templ_7745c5c3_Err != nil { 34 - return templ_7745c5c3_Err 35 - } 36 - var templ_7745c5c3_Var2 string 37 - templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) 38 - if templ_7745c5c3_Err != nil { 39 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/document.templ`, Line: 6, Col: 19} 40 - } 41 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) 42 - if templ_7745c5c3_Err != nil { 43 - return templ_7745c5c3_Err 44 - } 45 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " | Ladon</title><link rel=\"icon\" type=\"image/svg\" href=\"/static/favicon.svg\"><link rel=\"stylesheet\" href=\"/static/styles.css\"><link rel=\"preconnect\" href=\"https://fonts.googleapis.com\"><link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin><link href=\"https://fonts.googleapis.com/css2?family=Recursive:slnt,wght,CASL,CRSV,MONO@-15..0,300..1000,0..1,0..1,0..1&display=swap\" rel=\"stylesheet\"></head><body class=\"bg-base text-text\">") 46 - if templ_7745c5c3_Err != nil { 47 - return templ_7745c5c3_Err 48 - } 49 - templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) 50 - if templ_7745c5c3_Err != nil { 51 - return templ_7745c5c3_Err 52 - } 53 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "</body></html>") 54 - if templ_7745c5c3_Err != nil { 55 - return templ_7745c5c3_Err 56 - } 57 - return nil 58 - }) 59 - } 60 - 61 - var _ = templruntime.GeneratedTemplate
···
-279
views/index_templ.go
··· 1 - // Code generated by templ - DO NOT EDIT. 2 - 3 - // templ: version: v0.3.943 4 - package views 5 - 6 - //lint:file-ignore SA4006 This context is only used if a nested component is present. 7 - 8 - import "github.com/a-h/templ" 9 - import templruntime "github.com/a-h/templ/runtime" 10 - 11 - import ( 12 - "fmt" 13 - 14 - "github.com/sblinch/kdl-go/document" 15 - ) 16 - 17 - func StringToVibrantHSL(s string) string { 18 - var sum int 19 - for _, char := range s { 20 - sum += int(char) 21 - } 22 - hue := sum % 360 23 - return fmt.Sprintf("hsl(%d, 80%%, 50%%)", hue) 24 - } 25 - 26 - func renderLink(name string, url string) templ.Component { 27 - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 28 - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context 29 - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { 30 - return templ_7745c5c3_CtxErr 31 - } 32 - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) 33 - if !templ_7745c5c3_IsBuffer { 34 - defer func() { 35 - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) 36 - if templ_7745c5c3_Err == nil { 37 - templ_7745c5c3_Err = templ_7745c5c3_BufErr 38 - } 39 - }() 40 - } 41 - ctx = templ.InitializeContext(ctx) 42 - templ_7745c5c3_Var1 := templ.GetChildren(ctx) 43 - if templ_7745c5c3_Var1 == nil { 44 - templ_7745c5c3_Var1 = templ.NopComponent 45 - } 46 - ctx = templ.ClearChildren(ctx) 47 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<li class=\"col-span-1 grid grid-cols-subgrid\"><a class=\"aspect-square bg-surface p-4 rounded-lg text-sm flex flex-col justify-between leading-none border border-muted/20\" href=\"") 48 - if templ_7745c5c3_Err != nil { 49 - return templ_7745c5c3_Err 50 - } 51 - var templ_7745c5c3_Var2 templ.SafeURL 52 - templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(templ.URL(url)) 53 - if templ_7745c5c3_Err != nil { 54 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/index.templ`, Line: 22, Col: 24} 55 - } 56 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) 57 - if templ_7745c5c3_Err != nil { 58 - return templ_7745c5c3_Err 59 - } 60 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" target=\"_blank\" rele=\"noopener noreferrer\"><div class=\"flex items-center justify-between\"><div class=\"w-4 h-4 rounded-full\" style=\"") 61 - if templ_7745c5c3_Err != nil { 62 - return templ_7745c5c3_Err 63 - } 64 - var templ_7745c5c3_Var3 string 65 - templ_7745c5c3_Var3, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(fmt.Sprintf("background: %s", StringToVibrantHSL(name))) 66 - if templ_7745c5c3_Err != nil { 67 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/index.templ`, Line: 27, Col: 100} 68 - } 69 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) 70 - if templ_7745c5c3_Err != nil { 71 - return templ_7745c5c3_Err 72 - } 73 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\"></div><svg class=\"text-highlight-med\" width=\"16\" height=\"16\" viewBox=\"0 0 15 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z\" fill=\"currentColor\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"></path></svg></div><span class=\"block\">") 74 - if templ_7745c5c3_Err != nil { 75 - return templ_7745c5c3_Err 76 - } 77 - var templ_7745c5c3_Var4 string 78 - templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(name) 79 - if templ_7745c5c3_Err != nil { 80 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/index.templ`, Line: 30, Col: 29} 81 - } 82 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) 83 - if templ_7745c5c3_Err != nil { 84 - return templ_7745c5c3_Err 85 - } 86 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</span></a></li>") 87 - if templ_7745c5c3_Err != nil { 88 - return templ_7745c5c3_Err 89 - } 90 - return nil 91 - }) 92 - } 93 - 94 - func renderGroup(name string, nodes []*document.Node) templ.Component { 95 - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 96 - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context 97 - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { 98 - return templ_7745c5c3_CtxErr 99 - } 100 - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) 101 - if !templ_7745c5c3_IsBuffer { 102 - defer func() { 103 - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) 104 - if templ_7745c5c3_Err == nil { 105 - templ_7745c5c3_Err = templ_7745c5c3_BufErr 106 - } 107 - }() 108 - } 109 - ctx = templ.InitializeContext(ctx) 110 - templ_7745c5c3_Var5 := templ.GetChildren(ctx) 111 - if templ_7745c5c3_Var5 == nil { 112 - templ_7745c5c3_Var5 = templ.NopComponent 113 - } 114 - ctx = templ.ClearChildren(ctx) 115 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<li class=\"col-span-full grid grid-cols-subgrid gap-4\"><h2 class=\"text-lg font-bold col-span-full pt-4\">") 116 - if templ_7745c5c3_Err != nil { 117 - return templ_7745c5c3_Err 118 - } 119 - var templ_7745c5c3_Var6 string 120 - templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(name) 121 - if templ_7745c5c3_Err != nil { 122 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/index.templ`, Line: 37, Col: 57} 123 - } 124 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) 125 - if templ_7745c5c3_Err != nil { 126 - return templ_7745c5c3_Err 127 - } 128 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</h2><ul class=\"col-span-full grid grid-cols-subgrid gap-4\">") 129 - if templ_7745c5c3_Err != nil { 130 - return templ_7745c5c3_Err 131 - } 132 - for _, node := range nodes { 133 - if node.Name.ValueString() == "group" { 134 - templ_7745c5c3_Err = renderGroup(node.Arguments[0].ValueString(), node.Children).Render(ctx, templ_7745c5c3_Buffer) 135 - if templ_7745c5c3_Err != nil { 136 - return templ_7745c5c3_Err 137 - } 138 - } else if node.Name.String() == "link" { 139 - url, _ := node.Properties.Get("url") 140 - templ_7745c5c3_Err = renderLink(node.Arguments[0].ValueString(), url.ValueString()).Render(ctx, templ_7745c5c3_Buffer) 141 - if templ_7745c5c3_Err != nil { 142 - return templ_7745c5c3_Err 143 - } 144 - } 145 - } 146 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</ul></li>") 147 - if templ_7745c5c3_Err != nil { 148 - return templ_7745c5c3_Err 149 - } 150 - return nil 151 - }) 152 - } 153 - 154 - func Authenticate() templ.Component { 155 - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 156 - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context 157 - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { 158 - return templ_7745c5c3_CtxErr 159 - } 160 - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) 161 - if !templ_7745c5c3_IsBuffer { 162 - defer func() { 163 - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) 164 - if templ_7745c5c3_Err == nil { 165 - templ_7745c5c3_Err = templ_7745c5c3_BufErr 166 - } 167 - }() 168 - } 169 - ctx = templ.InitializeContext(ctx) 170 - templ_7745c5c3_Var7 := templ.GetChildren(ctx) 171 - if templ_7745c5c3_Var7 == nil { 172 - templ_7745c5c3_Var7 = templ.NopComponent 173 - } 174 - ctx = templ.ClearChildren(ctx) 175 - templ_7745c5c3_Var8 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 176 - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context 177 - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) 178 - if !templ_7745c5c3_IsBuffer { 179 - defer func() { 180 - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) 181 - if templ_7745c5c3_Err == nil { 182 - templ_7745c5c3_Err = templ_7745c5c3_BufErr 183 - } 184 - }() 185 - } 186 - ctx = templ.InitializeContext(ctx) 187 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<div class=\"w-screen h-screen flex items-center justify-center\"><main class=\"w-full max-w-xs bg-surface rounded-lg p-4 border border-muted/20\"><p class=\"mb-3 font-serif\">Can I see some ID, please?</p><a href=\"/login\" class=\"block text-center text-sm rounded py-2 px-2 bg-foam/20 text-foam\">Log In with OIDC</a></main></div>") 188 - if templ_7745c5c3_Err != nil { 189 - return templ_7745c5c3_Err 190 - } 191 - return nil 192 - }) 193 - templ_7745c5c3_Err = Document("Log In").Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer) 194 - if templ_7745c5c3_Err != nil { 195 - return templ_7745c5c3_Err 196 - } 197 - return nil 198 - }) 199 - } 200 - 201 - func Links(username string, doc *document.Document) templ.Component { 202 - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 203 - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context 204 - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { 205 - return templ_7745c5c3_CtxErr 206 - } 207 - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) 208 - if !templ_7745c5c3_IsBuffer { 209 - defer func() { 210 - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) 211 - if templ_7745c5c3_Err == nil { 212 - templ_7745c5c3_Err = templ_7745c5c3_BufErr 213 - } 214 - }() 215 - } 216 - ctx = templ.InitializeContext(ctx) 217 - templ_7745c5c3_Var9 := templ.GetChildren(ctx) 218 - if templ_7745c5c3_Var9 == nil { 219 - templ_7745c5c3_Var9 = templ.NopComponent 220 - } 221 - ctx = templ.ClearChildren(ctx) 222 - templ_7745c5c3_Var10 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 223 - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context 224 - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) 225 - if !templ_7745c5c3_IsBuffer { 226 - defer func() { 227 - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) 228 - if templ_7745c5c3_Err == nil { 229 - templ_7745c5c3_Err = templ_7745c5c3_BufErr 230 - } 231 - }() 232 - } 233 - ctx = templ.InitializeContext(ctx) 234 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<div class=\"flex items-center justify-between px-3 py-2 text-subtle text-xs mb-4\"><div>Howdy, <span class=\"font-mono text-gold\">") 235 - if templ_7745c5c3_Err != nil { 236 - return templ_7745c5c3_Err 237 - } 238 - var templ_7745c5c3_Var11 string 239 - templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(username) 240 - if templ_7745c5c3_Err != nil { 241 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/index.templ`, Line: 65, Col: 59} 242 - } 243 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) 244 - if templ_7745c5c3_Err != nil { 245 - return templ_7745c5c3_Err 246 - } 247 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</span></div><a href=\"/logout\" class=\"underline text-iris\">Log Out</a></div><ul class=\"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 px-3 gap-x-4 gap-y-8 max-w-screen-xs sm:max-w-screen-sm md:max-w-screen-md lg:max-w-screen-lg mx-auto\">") 248 - if templ_7745c5c3_Err != nil { 249 - return templ_7745c5c3_Err 250 - } 251 - for _, node := range doc.Nodes { 252 - if node.Name.ValueString() == "group" { 253 - templ_7745c5c3_Err = renderGroup(node.Arguments[0].ValueString(), node.Children).Render(ctx, templ_7745c5c3_Buffer) 254 - if templ_7745c5c3_Err != nil { 255 - return templ_7745c5c3_Err 256 - } 257 - } else if node.Name.ValueString() == "link" { 258 - url, _ := node.Properties.Get("url") 259 - templ_7745c5c3_Err = renderLink(node.Arguments[0].ValueString(), url.ValueString()).Render(ctx, templ_7745c5c3_Buffer) 260 - if templ_7745c5c3_Err != nil { 261 - return templ_7745c5c3_Err 262 - } 263 - } 264 - } 265 - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</ul>") 266 - if templ_7745c5c3_Err != nil { 267 - return templ_7745c5c3_Err 268 - } 269 - return nil 270 - }) 271 - templ_7745c5c3_Err = Document("Links").Render(templ.WithChildren(ctx, templ_7745c5c3_Var10), templ_7745c5c3_Buffer) 272 - if templ_7745c5c3_Err != nil { 273 - return templ_7745c5c3_Err 274 - } 275 - return nil 276 - }) 277 - } 278 - 279 - var _ = templruntime.GeneratedTemplate
···