Skip to content

Commit

Permalink
(docs) Add dark theme (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
perlun authored Mar 30, 2021
1 parent c5c0dac commit 3178955
Show file tree
Hide file tree
Showing 11 changed files with 1,124 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"MSIL",
"Per's",
"Waka",
"hljs"
"hljs",
"sidetoc"
]
}
5 changes: 3 additions & 2 deletions docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@
}
},

// Our custom template changes are in docs/template
// Our custom template changes are in docs/templates/override
"template": [
"default",
"template"
"templates/override",
"templates/darkerfx"
],

"postProcessors": [],
Expand Down
39 changes: 39 additions & 0 deletions docs/templates/darkerfx/partials/affix.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}

<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
{{^_disableContribution}}
<div class="contribution">
<ul class="nav">
{{#docurl}}
<li>
<a href="{{docurl}}" class="contribution-link">{{__global.improveThisDoc}}</a>
</li>
{{/docurl}}
{{#sourceurl}}
<li>
<a href="{{sourceurl}}" class="contribution-link">{{__global.viewSource}}</a>
</li>
{{/sourceurl}}
</ul>
</div>
{{/_disableContribution}}
<div class="toggle-mode">
<div class="icon">
<i aria-hidden="true">☀</i>
</div>
<label class="switch">
<input type="checkbox" id="switch-style">
<span class="slider round"></span>
</label>
<div class="icon">
<i aria-hidden="true">☾</i>
</div>
<script type="text/javascript" src="{{_rel}}styles/toggle-theme.js"></script>
</div>

<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
Loading

0 comments on commit 3178955

Please sign in to comment.