Skip to content

Commit

Permalink
Merge branch 'docfx-moderntheme'
Browse files Browse the repository at this point in the history
  • Loading branch information
antongit committed Oct 24, 2023
2 parents 486f2aa + abfd346 commit 7773f1f
Show file tree
Hide file tree
Showing 17 changed files with 617 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/**/obj/
_site
.vscode
/_exported_templates/*
2 changes: 2 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docfx build
docfx serve
49 changes: 0 additions & 49 deletions custom template/vvvv/layout/_master.tmpl

This file was deleted.

72 changes: 72 additions & 0 deletions custom template/vvvv_modern/layout/_master.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}
{{!include(/^public/.*/)}}
{{!include(favicon.ico)}}
{{!include(logo.svg)}}

<!DOCTYPE html>
<html {{#_lang}}lang="{{_lang}}"{{/_lang}}>

{{>partials/head}}

{{^redirect_url}}
<body class="tex2jax_ignore" data-layout="{{_layout}}{{layout}}" data-yaml-mime="{{yamlmime}}">
<header class="bg-body border-bottom">
{{>partials/navbar}}
</header>

<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>

<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" style="margin-top: -.65em; margin-left: -.8em"
type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas"
aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>

<nav id="breadcrumb"></nav>
</div>

<article data-uid="{{uid}}">
{{!body}}
</article>

{{^_disableNextArticle}}
<div class="next-article d-print-none border-top" id="nextArticle"></div>
{{/_disableNextArticle}}

</div>

<div class="affix">
{{^_disableContribution}}
<div class="contribution d-print-none">
{{#sourceurl}}
<a href="{{sourceurl}}" class="edit-link">{{_improveThisDoc}}</a>
{{/sourceurl}}
{{^sourceurl}}{{#docurl}}
<a href="{{docurl}}" class="edit-link">{{_improveThisDoc}}</a>
{{/docurl}}{{/sourceurl}}
</div>
{{/_disableContribution}}
<nav id="affix"></nav>
</div>
</main>

{{^_disableFooter}}
{{>partials/footer}}
{{/_disableFooter}}
{{>partials/scripts}}
</body>
{{/redirect_url}}
</html>
9 changes: 9 additions & 0 deletions custom template/vvvv_modern/partials/breadcrumb.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}

<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li>{{_tocTitle}}</li>
</ul>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
{{!Add your own custom template for the content for ManagedReference here}}
{{#_splitReference}}
{{#isCollection}}
{{>partials/collection}}
{{/isCollection}}
{{#isItem}}
{{>partials/item}}
{{/isItem}}
{{/_splitReference}}
14 changes: 14 additions & 0 deletions custom template/vvvv_modern/partials/footer.tmpl copy.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}

<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">{{__global.backToTop}}</a>
</span>
{{{_appFooter}}}
{{^_appFooter}}<span>Generated by <strong>DocFX</strong></span>{{/_appFooter}}
</div>
</div>
</footer>
9 changes: 9 additions & 0 deletions custom template/vvvv_modern/partials/footer.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<footer class="border-top">
<div class="container-xxl">
<div class="d-flex flex-column flex-sm-row justify-content-between pt-1 text-center small">
<p class="broughtToYou">Brought to you by <a href="https://vvvv.org">vvvv.org</a> | <a href="https://www.visualprogramming.net">visualprogramming.net</a></p>
<p>Made with <a href="https://dotnet.github.io/docfx">docfx</a></p>
<p><a href="#top">Back to top</a></p>
</div>
</div>
</footer>
46 changes: 46 additions & 0 deletions custom template/vvvv_modern/partials/head.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<head>
<meta charset="utf-8">
{{#redirect_url}}
<meta http-equiv="refresh" content="0;URL='{{redirect_url}}'">
{{/redirect_url}}
{{^redirect_url}}
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
<link rel="icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}public/docfx.min.css">
<link rel="stylesheet" href="{{_rel}}public/main.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"/>
<link rel="stylesheet" href="{{_rel}}public/customDocSearch.css">
<meta name="docfx:navrel" content="{{_navRel}}">
<meta name="docfx:tocrel" content="{{_tocRel}}">
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
{{#_enableSearch}}<meta name="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
{{#_disableNewTab}}<meta name="docfx:disablenewtab" content="true">{{/_disableNewTab}}
{{#_disableTocFilter}}<meta name="docfx:disabletocfilter" content="true">{{/_disableTocFilter}}
{{#docurl}}<meta name="docfx:docurl" content="{{docurl}}">{{/docurl}}
<meta name="loc:inThisArticle" content="{{_inThisArticle}}">
<meta name="loc:searchResultsCount" content="{{__global.searchResultsCount}}">
<meta name="loc:searchNoResults" content="{{__global.searchNoResults}}">
<meta name="loc:tocFilter" content="{{__global.tocFilter}}">
<meta name="loc:nextArticle" content="{{__global.nextArticle}}">
<meta name="loc:prevArticle" content="{{__global.prevArticle}}">
<meta name="loc:themeLight" content="{{__global.themeLight}}">
<meta name="loc:themeDark" content="{{__global.themeDark}}">
<meta name="loc:themeAuto" content="{{__global.themeAuto}}">
<meta name="loc:changeTheme" content="{{__global.changeTheme}}">
<meta name="loc:copy" content="{{__global.copy}}">
{{/redirect_url}}
</head>

<script type="module">
import options from './{{_rel}}public/main.js'
import { init } from './{{_rel}}public/docfx.min.js'
init(options)
</script>

<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
3 changes: 3 additions & 0 deletions custom template/vvvv_modern/partials/item.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}

{{>partials/class.header}}
18 changes: 18 additions & 0 deletions custom template/vvvv_modern/partials/navbar.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{!Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.}}

<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}">
<img id="logo" class="svg" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="{{_appName}}" >
{{_appName}}
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
</div>
<div id="docsearch" class="ds-search ds-search mx-auto mb-3 mb-md-0"></div>
</div>
</div>
</nav>
4 changes: 4 additions & 0 deletions custom template/vvvv_modern/partials/scripts.tmpl.partial
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<script type="text/javascript" src="{{_rel}}styles/gdpr-video.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
<script type="text/javascript"> docsearch({ appId: 'ZHW2WU2R4S', apiKey: 'e51f751bd604785e217464c70a19aa39', indexName: 'thegraybook-vvvv', container: '#docsearch', debug: 'false'});</script>
<script async defer data-domain="thegraybook.visualprogramming.net" src="https://plausible.io/js/plausible.js"></script>
71 changes: 71 additions & 0 deletions custom template/vvvv_modern/public/customDocSearch.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
:root {
--docsearch-primary-color: #505050;
--docsearch-logo-color: #505050;
--docsearch-container-background: rgba(33, 33, 33, 0.8);
}

.ds-search
{
width: 230px;
background-color: var(--bs-body-bg);
}

.DocSearch-SearchBar
{
/* position: relative; */
}

.DocSearch-Modal
{
margin: 80px auto auto;
border-radius: 3px;
}

.DocSearch-Button
{
border-radius: 2px;
height: 30px;
border-width: 1px;
border-style: solid;
border-radius: 2px;
border-color: var(--bs-border-color);
text-decoration: none;
background-color: var(--bs-body-bg);
padding: 0.5em 0.5em;
min-width: 200px;
color: var(--bs-secondary-color);
margin-right: auto;
margin-left: auto;
}

.DocSearch-Button:hover
{
background-color: var(--bs-body-bg);
color: var(--bs-body-color);
}

.DocSearch-Button .DocSearch-Search-Icon {
color: var(--bs-border-color);
}

.DocSearch-Button-Keys
{
padding-top: 3px;
}

.DocSearch-Button:hover
{
box-shadow: inherit;
}

.DocSearch-Button-Placeholder {
padding: 0 60px 0 6px;
}

.DocSearch-Logo svg {
color: var(--bs-border-color);
}

.DocSearch-Logo .cls-1, .DocSearch-Logo .cls-2 {
color: var(--bs-border-color);
}
Loading

0 comments on commit 7773f1f

Please sign in to comment.