Browse Source

Updated docfx template

Tig 10 months ago
parent
commit
13a41262aa

+ 15 - 13
Terminal.Gui/Drawing/AlignmentModes.cs

@@ -21,27 +21,29 @@ public enum AlignmentModes
 
 
     /// <summary>
     /// <summary>
     ///     At least one space will be added between items. Useful for justifying text where at least one space is needed.
     ///     At least one space will be added between items. Useful for justifying text where at least one space is needed.
+    /// </summary>
+    /// <remarks>
     ///     <para>
     ///     <para>
     ///         If the total size of the items is greater than the container size, the space between items will be ignored
     ///         If the total size of the items is greater than the container size, the space between items will be ignored
     ///         starting from the end.
     ///         starting from the end.
     ///     </para>
     ///     </para>
-    /// </summary>
+    /// </remarks>
     AddSpaceBetweenItems = 2,
     AddSpaceBetweenItems = 2,
 
 
     /// <summary>
     /// <summary>
-    ///     When aligning via <see cref="Alignment.Start"/> or <see cref="Alignment.End"/>, the item opposite to the alignment
-    ///     (the first or last item) will be ignored.
+    ///    When aligning via <see cref="Alignment.Start"/> or <see cref="Alignment.End"/>, the item opposite to the alignment (the first or last item) will be ignored.
+    /// </summary>
+    /// <remarks>
     ///     <para>
     ///     <para>
     ///         If the container is smaller than the total size of the items, the end items will be clipped (their locations
     ///         If the container is smaller than the total size of the items, the end items will be clipped (their locations
     ///         will be greater than the container size).
     ///         will be greater than the container size).
     ///     </para>
     ///     </para>
-    ///     ///
-    ///     <example>
-    ///         <c>
-    ///             Start: |111 2222     33333|
-    ///             End:   |111     2222 33333|
-    ///         </c>
-    ///     </example>
-    /// </summary>
-    IgnoreFirstOrLast = 4
-}
+    /// </remarks>
+    /// <example>
+    ///     <c>
+    ///         Start: |111 2222     33333|
+    ///         End:   |111     2222 33333|
+    ///     </c>
+    /// </example>
+    IgnoreFirstOrLast = 4,
+}

+ 29 - 18
docfx/templates/modern/layout/_master.tmpl

@@ -14,6 +14,7 @@
       <meta name="viewport" content="width=device-width, initial-scale=1.0">
       <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}}">
       <meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
       {{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
       {{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
+      {{#description}}<meta name="description" content="{{description}}">{{/description}}
       <link rel="icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
       <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/docfx.min.css">
       <link rel="stylesheet" href="{{_rel}}public/main.css">
       <link rel="stylesheet" href="{{_rel}}public/main.css">
@@ -36,29 +37,30 @@
       <meta name="loc:changeTheme" content="{{__global.changeTheme}}">
       <meta name="loc:changeTheme" content="{{__global.changeTheme}}">
       <meta name="loc:copy" content="{{__global.copy}}">
       <meta name="loc:copy" content="{{__global.copy}}">
       <meta name="loc:downloadPdf" content="{{__global.downloadPdf}}">
       <meta name="loc:downloadPdf" content="{{__global.downloadPdf}}">
-    {{/redirect_url}}
-  </head>
 
 
-  {{^redirect_url}}
-  <script type="module" src="./{{_rel}}public/docfx.min.js"></script>
+      <script type="module" src="./{{_rel}}public/docfx.min.js"></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>
+      <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>
 
 
-  {{#_googleAnalyticsTagId}}
-  <script async src="https://www.googletagmanager.com/gtag/js?id={{_googleAnalyticsTagId}}"></script>
-  <script>
-    window.dataLayer = window.dataLayer || [];
-    function gtag() { dataLayer.push(arguments); }
-    gtag('js', new Date());
-    gtag('config', '{{_googleAnalyticsTagId}}');
-  </script>
-  {{/_googleAnalyticsTagId}}
+      {{#_googleAnalyticsTagId}}
+      <script async src="https://www.googletagmanager.com/gtag/js?id={{_googleAnalyticsTagId}}"></script>
+      <script>
+        window.dataLayer = window.dataLayer || [];
+        function gtag() { dataLayer.push(arguments); }
+        gtag('js', new Date());
+        gtag('config', '{{_googleAnalyticsTagId}}');
+      </script>
+      {{/_googleAnalyticsTagId}}
+    {{/redirect_url}}
+  </head>
 
 
+  {{^redirect_url}}
   <body class="tex2jax_ignore" data-layout="{{_layout}}{{layout}}" data-yaml-mime="{{yamlmime}}">
   <body class="tex2jax_ignore" data-layout="{{_layout}}{{layout}}" data-yaml-mime="{{yamlmime}}">
     <header class="bg-body border-bottom">
     <header class="bg-body border-bottom">
+      {{^_disableNavbar}}
       <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
       <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
         <div class="container-xxl flex-nowrap">
         <div class="container-xxl flex-nowrap">
           <a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}">
           <a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}">
@@ -80,9 +82,11 @@
           </div>
           </div>
         </div>
         </div>
       </nav>
       </nav>
+      {{/_disableNavbar}}
     </header>
     </header>
 
 
     <main class="container-xxl">
     <main class="container-xxl">
+      {{^_disableToc}}
       <div class="toc-offcanvas">
       <div class="toc-offcanvas">
         <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
         <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
           <div class="offcanvas-header">
           <div class="offcanvas-header">
@@ -94,16 +98,21 @@
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
+      {{/_disableToc}}
 
 
       <div class="content">
       <div class="content">
         <div class="actionbar">
         <div class="actionbar">
-          <button class="btn btn-lg border-0 d-md-none" style="margin-top: -.65em; margin-left: -.8em"
+          {{^_disableToc}}
+          <button class="btn btn-lg border-0 d-md-none"
               type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas"
               type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas"
               aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
               aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
             <i class="bi bi-list"></i>
             <i class="bi bi-list"></i>
           </button>
           </button>
+          {{/_disableToc}}
 
 
+          {{^_disableBreadcrumb}}
           <nav id="breadcrumb"></nav>
           <nav id="breadcrumb"></nav>
+          {{/_disableBreadcrumb}}
         </div>
         </div>
 
 
         <article data-uid="{{uid}}">
         <article data-uid="{{uid}}">
@@ -127,9 +136,11 @@
 
 
       </div>
       </div>
 
 
+      {{^_disableAffix}}
       <div class="affix">
       <div class="affix">
         <nav id="affix"></nav>
         <nav id="affix"></nav>
       </div>
       </div>
+      {{/_disableAffix}}
     </main>
     </main>
 
 
     {{#_enableSearch}}
     {{#_enableSearch}}

+ 1 - 1
docfx/templates/modern/partials/class.header.tmpl.partial

@@ -96,7 +96,7 @@
 {{/inClass}}
 {{/inClass}}
 
 
 {{#inheritedMembers.0}}
 {{#inheritedMembers.0}}
-<dl class="typelist derived">
+<dl class="typelist inheritedMembers">
   <dt>{{__global.inheritedMembers}}</dt>
   <dt>{{__global.inheritedMembers}}</dt>
   <dd>
   <dd>
 {{/inheritedMembers.0}}
 {{/inheritedMembers.0}}

+ 1 - 39
docfx/templates/modern/public/main.css

@@ -1,39 +1 @@
-:root, [data-bs-theme=light] {
-    --bs-font-monospace: 'Cascadia Code', SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
-    --bs-font-sans-serif: "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-    --bs-body-font-weight: 300;
-    --bs-body-font-weight: 0.9rem;
-
-    --bs-body-color: #dee2e6;
-    --bs-body-bg: #152332;
-
-    --bs-navbar-brand-font-size: 1.5em;
-}
-
-
-.toc, .navbar-brand, .nav-link {
-    font-family: var(--bs-font-monospace)
-}
-
-.toc {
-    font-size: 13em;
-}
-
-.toc li {
-    font-weight: 300;
-    margin: .2em 0;
-}
-
-h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
-    font-weight: 200;
-} 
-
-.toc form.filter>i.bi {
-    font-size: var(--bs-body-font-size);
-}
-
-.toc .flex-fill {
-    font-size: var(--bs-body-font-size);
-}
-
-.inheritedMembers { display: none; }
+.inheritedMembers { display: none; }