-
-
Notifications
You must be signed in to change notification settings - Fork 322
Expand file tree
/
Copy path_Layout.cshtml
More file actions
73 lines (69 loc) · 2.88 KB
/
Copy path_Layout.cshtml
File metadata and controls
73 lines (69 loc) · 2.88 KB
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
67
68
69
70
71
72
73
@using Microsoft.Extensions.Options
@using StardewModdingAPI.Web.Framework.ConfigModels
@using StardewModdingAPI.Web.Framework.Extensions
@inject IOptions<SiteConfig> SiteConfig
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@ViewData["Title"] - SMAPI.io</title>
<script>
(function () {
function applyTheme(mode) {
var actual = mode === 'system'
? (matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
: mode;
document.documentElement.dataset.theme = actual;
document.documentElement.dataset.themeMode = mode;
}
applyTheme(localStorage.getItem('theme') || 'system');
window.setTheme = function (mode) {
applyTheme(mode);
if (mode === 'system') localStorage.removeItem('theme');
else localStorage.setItem('theme', mode);
};
})();
</script>
<link rel="stylesheet" href="@Url.ContentWithCacheBust("~/Content/css/main.css")" />
@RenderSection("Head", required: false)
</head>
<body>
<div id="sidebar">
<h4>SMAPI</h4>
<ul>
<li><a href="@Url.PlainAction("Index", "Index")">About SMAPI</a></li>
<li><a href="https://stardewvalleywiki.com/Modding:Index">Modding docs</a></li>
</ul>
<h4>Tools</h4>
<ul>
<li><a href="@Url.PlainAction("Index", "Mods")">Mod compatibility</a></li>
<li><a href="@Url.PlainAction("Index", "LogParser", values: null)">Log parser</a></li>
<li><a href="@Url.PlainAction("Index", "JsonValidator", values: null)">JSON validator</a></li>
</ul>
@RenderSection("SidebarExtra", required: false)
<h4>Theme</h4>
<ul id="theme-picker">
<li>
<a href="#" data-theme-mode="system" onclick="setTheme('system'); return false;">System</a> |
<a href="#" data-theme-mode="light" onclick="setTheme('light'); return false;">Light</a> |
<a href="#" data-theme-mode="dark" onclick="setTheme('dark'); return false;">Dark</a>
</li>
</ul>
</div>
<div id="content-column">
<div id="content">
@if (ViewData["ViewTitle"] as string != string.Empty)
{
<h1>@(ViewData["ViewTitle"] ?? ViewData["Title"])</h1>
}
@RenderBody()
</div>
<div id="footer">
<div id="license">
Hi! See the <a href="@Url.PlainAction("Privacy", "Index")">privacy page</a>, <a href="https://github.com/pathoschild/SMAPI" title="view source">SMAPI's source code</a>, or <a href="https://smapi.io/community" title="community pages">ask questions</a>.
</div>
</div>
</div>
</body>
</html>