|
| 1 | +@using Moonlight.ApiServer.Database.Entities |
1 | 2 | @using Moonlight.Shared.Misc |
| 3 | + |
2 | 4 | <!DOCTYPE html> |
3 | 5 | <html lang="en" class="bg-background text-base-content font-inter"> |
4 | 6 |
|
5 | 7 | <head> |
6 | | - <meta charset="utf-8" /> |
7 | | - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 8 | + <meta charset="utf-8"/> |
| 9 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
8 | 10 | <title>@Configuration.Title</title> |
9 | | - <base href="/" /> |
10 | | - |
| 11 | + <base href="/"/> |
| 12 | + |
11 | 13 | @foreach (var style in Configuration.Styles) |
12 | 14 | { |
13 | | - <link rel="stylesheet" href="@style" /> |
| 15 | + <link rel="stylesheet" href="@style"/> |
| 16 | + } |
| 17 | + |
| 18 | + <link href="manifest.webmanifest" rel="manifest"/> |
| 19 | + <link rel="apple-touch-icon" sizes="512x512" href="/_content/Moonlight.Client/img/icon-512.png"/> |
| 20 | + <link rel="apple-touch-icon" sizes="192x192" href="/_content/Moonlight.Client/img/icon-192.png"/> |
| 21 | + |
| 22 | + @if (Theme != null) |
| 23 | + { |
| 24 | + <style> |
| 25 | + :root { |
| 26 | + --mooncore-color-background: @(Theme.Content.ColorBackground); |
| 27 | + --mooncore-color-base-100: @(Theme.Content.ColorBase100); |
| 28 | + --mooncore-color-base-150: @(Theme.Content.ColorBase150); |
| 29 | + --mooncore-color-base-200: @(Theme.Content.ColorBase200); |
| 30 | + --mooncore-color-base-250: @(Theme.Content.ColorBase250); |
| 31 | + --mooncore-color-base-300: @(Theme.Content.ColorBase300); |
| 32 | + --mooncore-color-base-content: @(Theme.Content.ColorBaseContent); |
| 33 | +
|
| 34 | + --mooncore-color-primary: @(Theme.Content.ColorPrimary); |
| 35 | + --mooncore-color-primary-content: @(Theme.Content.ColorPrimaryContent); |
| 36 | +
|
| 37 | + --mooncore-color-secondary: @(Theme.Content.ColorSecondary); |
| 38 | + --mooncore-color-secondary-content: @(Theme.Content.ColorSecondaryContent); |
| 39 | +
|
| 40 | + --mooncore-color-accent: @(Theme.Content.ColorAccent); |
| 41 | + --mooncore-color-accent-content: @(Theme.Content.ColorAccentContent); |
| 42 | +
|
| 43 | + --mooncore-color-neutral: @(Theme.Content.ColorNeutral); |
| 44 | + --mooncore-color-neutral-content: @(Theme.Content.ColorNeutralContent); |
| 45 | +
|
| 46 | + --mooncore-color-info: @(Theme.Content.ColorInfo); |
| 47 | + --mooncore-color-info-content: @(Theme.Content.ColorInfoContent); |
| 48 | +
|
| 49 | + --mooncore-color-success: @(Theme.Content.ColorSuccess); |
| 50 | + --mooncore-color-success-content: @(Theme.Content.ColorSuccessContent); |
| 51 | +
|
| 52 | + --mooncore-color-warning: @(Theme.Content.ColorWarning); |
| 53 | + --mooncore-color-warning-content: @(Theme.Content.ColorWarningContent); |
| 54 | +
|
| 55 | + --mooncore-color-error: @(Theme.Content.ColorError); |
| 56 | + --mooncore-color-error-content: @(Theme.Content.ColorErrorContent); |
| 57 | +
|
| 58 | + --mooncore-radius-selector: @(Theme.Content.RadiusSelector)rem; |
| 59 | + --mooncore-radius-field: @(Theme.Content.RadiusField)rem; |
| 60 | + --mooncore-radius-box: @(Theme.Content.RadiusBox)rem; |
| 61 | +
|
| 62 | + --mooncore-size-selector: @(Theme.Content.SizeSelector)rem; |
| 63 | + --mooncore-size-field: @(Theme.Content.SizeField)rem; |
| 64 | +
|
| 65 | + --mooncore-border: @(Theme.Content.Border)px; |
| 66 | + --mooncore-depth: @(Theme.Content.Depth); |
| 67 | + --mooncore-noise: @(Theme.Content.Noise); |
| 68 | + } |
| 69 | + </style> |
14 | 70 | } |
15 | | - |
16 | | - <link href="manifest.webmanifest" rel="manifest" /> |
17 | | - <link rel="apple-touch-icon" sizes="512x512" href="/_content/Moonlight.Client/img/icon-512.png" /> |
18 | | - <link rel="apple-touch-icon" sizes="192x192" href="/_content/Moonlight.Client/img/icon-192.png" /> |
19 | 71 | </head> |
20 | 72 |
|
21 | 73 | <body> |
|
31 | 83 | </div> |
32 | 84 | </div> |
33 | 85 | </div> |
34 | | - |
| 86 | + |
35 | 87 | </div> |
36 | 88 |
|
37 | 89 | @foreach (var script in Configuration.Scripts) |
|
48 | 100 | @code |
49 | 101 | { |
50 | 102 | [Parameter] public FrontendConfiguration Configuration { get; set; } |
| 103 | + [Parameter] public Theme? Theme { get; set; } |
51 | 104 | } |
0 commit comments