Skip to content

Commit df85c5d

Browse files
committed
docs: update to latest modern template file
1 parent e5c30f7 commit df85c5d

2 files changed

Lines changed: 31 additions & 21 deletions

File tree

docs/site/Site.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Docfx.App" Version="2.74.0" />
11+
<PackageReference Include="Docfx.App" Version="2.74.1" />
12+
<ProjectReference Include="../../src/bunit.core/bunit.core.csproj" />
13+
<ProjectReference Include="../../src/bunit.web/bunit.web.csproj" />
1214
</ItemGroup>
15+
1316
</Project>

docs/site/templates/bunit/layout/_master.tmpl

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
1+
{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
22
{{!include(/^public/.*/)}}
33
{{!include(favicon.ico)}}
44
{{!include(logo.svg)}}
5-
{{!include(search-stopwords.json)}}
65
<!DOCTYPE html>
76
<html {{#_lang}}lang="{{_lang}}"{{/_lang}}>
87
<head>
@@ -34,20 +33,29 @@
3433
{{#_disableNewTab}}<meta name="docfx:disablenewtab" content="true">{{/_disableNewTab}}
3534
{{#_disableTocFilter}}<meta name="docfx:disabletocfilter" content="true">{{/_disableTocFilter}}
3635
{{#docurl}}<meta name="docfx:docurl" content="{{docurl}}">{{/docurl}}
37-
38-
<script type="module">
39-
import docfx from './{{_rel}}public/main.js'
40-
window.docfx = docfx
41-
window.MathJax = {
42-
options: {
43-
processHtmlClass: ['tex2jax_process', 'math']
44-
}
45-
}
46-
</script>
47-
<script type="text/javascript" src="{{_rel}}public/docfx.min.js"></script>
36+
<meta name="loc:inThisArticle" content="{{__global.inThisArticle}}">
37+
<meta name="loc:searchResultsCount" content="{{__global.searchResultsCount}}">
38+
<meta name="loc:searchNoResults" content="{{__global.searchNoResults}}">
39+
<meta name="loc:tocFilter" content="{{__global.tocFilter}}">
40+
<meta name="loc:nextArticle" content="{{__global.nextArticle}}">
41+
<meta name="loc:prevArticle" content="{{__global.prevArticle}}">
42+
<meta name="loc:themeLight" content="{{__global.themeLight}}">
43+
<meta name="loc:themeDark" content="{{__global.themeDark}}">
44+
<meta name="loc:themeAuto" content="{{__global.themeAuto}}">
45+
<meta name="loc:changeTheme" content="{{__global.changeTheme}}">
46+
<meta name="loc:copy" content="{{__global.copy}}">
47+
<meta name="loc:downloadPdf" content="{{__global.downloadPdf}}">
4848
{{/redirect_url}}
4949
</head>
5050

51+
{{^redirect_url}}
52+
<script type="module" src="./{{_rel}}public/docfx.min.js"></script>
53+
54+
<script>
55+
const theme = localStorage.getItem('theme') || 'auto'
56+
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
57+
</script>
58+
5159
{{#_googleAnalyticsTagId}}
5260
<script async src="https://www.googletagmanager.com/gtag/js?id={{_googleAnalyticsTagId}}"></script>
5361
<script>
@@ -58,9 +66,8 @@
5866
</script>
5967
{{/_googleAnalyticsTagId}}
6068

61-
{{^redirect_url}}
62-
<body class="tex2jax_ignore" data-layout="{{_layout}}{{layout}}" data-yaml-mime="{{yamlmime}}">
63-
<header class="bg-body bg-dark-subtle">
69+
<body class="tex2jax_ignore" data-layout="{{_layout}}{{layout}}" data-yaml-mime="{{yamlmime}}">
70+
<header class="bg-body border-bottom">
6471
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
6572
<div class="container-xxl flex-nowrap">
6673
<a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}">
@@ -115,10 +122,10 @@
115122
{{^_disableContribution}}
116123
<div class="contribution d-print-none">
117124
{{#sourceurl}}
118-
<a href="{{sourceurl}}" class="edit-link">Edit this page</a>
125+
<a href="{{sourceurl}}" class="edit-link">{{__global.improveThisDoc}}</a>
119126
{{/sourceurl}}
120127
{{^sourceurl}}{{#docurl}}
121-
<a href="{{docurl}}" class="edit-link">Edit this page</a>
128+
<a href="{{docurl}}" class="edit-link">{{__global.improveThisDoc}}</a>
122129
{{/docurl}}{{/sourceurl}}
123130
</div>
124131
{{/_disableContribution}}
@@ -156,7 +163,7 @@
156163
<div class="container-xxl search-results" id="search-results"></div>
157164
{{/_enableSearch}}
158165

159-
<footer class="bg-body-tertiary">
166+
<footer class="border-top text-secondary bg-body-tertiary">
160167
<div class="container-xxl">
161168
<div class="flex-fill">
162169
{{{_appFooter}}}{{^_appFooter}}<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>{{/_appFooter}}
@@ -165,4 +172,4 @@
165172
</footer>
166173
</body>
167174
{{/redirect_url}}
168-
</html>
175+
</html>

0 commit comments

Comments
 (0)