diff --git a/docs-src/layout/images/favicon.png b/docs-src/assets/favicon.png similarity index 100% rename from docs-src/layout/images/favicon.png rename to docs-src/assets/favicon.png diff --git a/docs-src/layout/images/logo-50.png b/docs-src/assets/logos/vcurrent/logo-50.png similarity index 100% rename from docs-src/layout/images/logo-50.png rename to docs-src/assets/logos/vcurrent/logo-50.png diff --git a/docs-src/layout/images/logo-black-50.png b/docs-src/assets/logos/vcurrent/logo-black-50.png similarity index 100% rename from docs-src/layout/images/logo-black-50.png rename to docs-src/assets/logos/vcurrent/logo-black-50.png diff --git a/docs-src/layout/images/logo-white-50.png b/docs-src/assets/logos/vcurrent/logo-white-50.png similarity index 100% rename from docs-src/layout/images/logo-white-50.png rename to docs-src/assets/logos/vcurrent/logo-white-50.png diff --git a/docs-src/layout/images/logo-white.png b/docs-src/assets/logos/vcurrent/logo-white.png similarity index 100% rename from docs-src/layout/images/logo-white.png rename to docs-src/assets/logos/vcurrent/logo-white.png diff --git a/docs-src/layout/images/logo.png b/docs-src/assets/logos/vcurrent/logo.png similarity index 100% rename from docs-src/layout/images/logo.png rename to docs-src/assets/logos/vcurrent/logo.png diff --git a/docs-src/docfx.json b/docs-src/docfx.json index 3f2a5c909..04869fb43 100644 --- a/docs-src/docfx.json +++ b/docs-src/docfx.json @@ -90,22 +90,18 @@ ], }, { + // Global Assets - favicon, logos for reuse etc. + "files": [ + "/assets/**", + ], + }, + { + // Images used in the namespace docs "files": [ - "layout/**", - "admin/**.png", - "admin/**.jpg", - "admin/**.svg", - "articles/**.png", - "articles/**.jpg", - "articles/**.svg", "api-docs/**.png", "api-docs/**.jpg", "api-docs/**.svg" ], - "exclude": [ - "obj/**", - "_site/**", - ] } ], "overwrite": [ @@ -123,14 +119,12 @@ "template": [ "default", "modern", - // "statictoc", - // "layout/oqtane" - "layout/oqtane", + "templates/oqtane", ], "globalMetadata": { "_appTitle": "Oqtane Docs - APIs and more for the Modular Blazor Application Framework", - "_appLogoPath": "layout/images/logo-50.png", - "_appFaviconPath": "layout/images/favicon.png", + "_appLogoPath": "assets/logos/vcurrent/logo-50.png", + "_appFaviconPath": "assets/favicon.png", "_enableNewTab": true, "_enableSearch": true, "_disableContribution": false, // turn off the edit-this diff --git a/docs-src/layout/oqtane-wip/namespace-metadata.js b/docs-src/layout/oqtane-wip/namespace-metadata.js deleted file mode 100644 index 2f35a27aa..000000000 --- a/docs-src/layout/oqtane-wip/namespace-metadata.js +++ /dev/null @@ -1,63 +0,0 @@ -// Metadata decorators which will affect how something with this -// priority is shown in the output. It affects the color and emojis shown -// The emojis which appear are configured in the CSS file - -const isWeb = { priority: 'web' }; -const isInternal = { priority: 'internal' }; -const isDocumentation = { priority: 'documentation' }; -const isData = { priority: 'data' }; -const isTheme = { priority: 'theme' }; - -const isModule = { priority: 'module' }; -const isImplementation = { priority: 'implementation' }; - -exports.data = { - "Oqtane": isInternal, - "Oqtane.Client": isInternal, - "Oqtane.Database.MySQL": isInternal, - "Oqtane.Database.PostgreSQL": isInternal, - "Oqtane.Database.Sqlite": isInternal, - "Oqtane.Database.SqlServer": isInternal, - "Oqtane.Databases": isInternal, - "Oqtane.Databases.Interfaces": isInternal, - - "Oqtane.Documentation": isDocumentation, - "Oqtane.Controllers": isWeb, - "Oqtane.Enums": isInternal, - "Oqtane.Extensions": isInternal, - "Oqtane.Infrastructure": isInternal, - "Oqtane.Infrastructure.EventSubscribers": isInternal, - "Oqtane.Installer": isInternal, - "Oqtane.Installer.Controls": isInternal, - "Oqtane.Interfaces": isInternal, - "Oqtane.Migrations": isInternal, - "Oqtane.Migrations.EntityBuilders": isInternal, - "Oqtane.Migrations.Framework": isInternal, - "Oqtane.Migrations.Master": isInternal, - "Oqtane.Migrations.Tenant": isInternal, - "Oqtane.Models": isData, - "Oqtane.Modules": isModule, - "Oqtane.Modules.Admin.ModuleCreator": isInternal, // isModule, - "Oqtane.Modules.Controls": isModule, - "Oqtane.Modules.HtmlText": isImplementation, - "Oqtane.Modules.HtmlText.Controllers": isImplementation, - "Oqtane.Modules.HtmlText.Manager": isImplementation, - "Oqtane.Modules.HtmlText.Migrations": isImplementation, - "Oqtane.Modules.HtmlText.Migrations.EntityBuilders": isImplementation, - "Oqtane.Modules.HtmlText.Models": isImplementation, - "Oqtane.Modules.HtmlText.Repository": isImplementation, - "Oqtane.Modules.HtmlText.Services": isImplementation, - "Oqtane.Oqtane.Client.Tests": isInternal, - "Oqtane.Pages": isData, - "Oqtane.Repository": isData, - "Oqtane.Repository.Databases.Interfaces": isInternal, - "Oqtane.SiteTemplates": isImplementation, - "Oqtane.Server": isInternal, - "Oqtane.Themes": isTheme, - "Oqtane.Themes.BlazorTheme": isImplementation, - "Oqtane.Themes.Controls": isTheme, - "Oqtane.Themes.OqtaneTheme": isImplementation, - "Oqtane.UI": isTheme, -} - -exports.priorityNormal = 'normal'; diff --git a/docs-src/layout/oqtane-wip/partials/head.tmpl.partial b/docs-src/layout/oqtane-wip/partials/head.tmpl.partial deleted file mode 100644 index f8f2a56d5..000000000 --- a/docs-src/layout/oqtane-wip/partials/head.tmpl.partial +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - {{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}} - - - - {{#_description}}{{/_description}} - - - - - - - - {{#_noindex}}{{/_noindex}} - {{#_enableSearch}}{{/_enableSearch}} - {{#_enableNewTab}}{{/_enableNewTab}} - diff --git a/docs-src/layout/oqtane-wip/partials/li.tmpl.partial b/docs-src/layout/oqtane-wip/partials/li.tmpl.partial deleted file mode 100644 index d0d2a1b12..000000000 --- a/docs-src/layout/oqtane-wip/partials/li.tmpl.partial +++ /dev/null @@ -1,30 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} -{{!2dm - added fullName to the link, so that the name can be abbreviated}} - diff --git a/docs-src/layout/oqtane-wip/partials/navbar-li.tmpl.partial b/docs-src/layout/oqtane-wip/partials/navbar-li.tmpl.partial deleted file mode 100644 index 9bd7f9f2b..000000000 --- a/docs-src/layout/oqtane-wip/partials/navbar-li.tmpl.partial +++ /dev/null @@ -1,31 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} -{{! Note: 2021-03-03 2dm taken from the statictoc templates and adding active class }} - - \ No newline at end of file diff --git a/docs-src/layout/oqtane-wip/partials/toc.tmpl.partial b/docs-src/layout/oqtane-wip/partials/toc.tmpl.partial deleted file mode 100644 index 84cef1d6c..000000000 --- a/docs-src/layout/oqtane-wip/partials/toc.tmpl.partial +++ /dev/null @@ -1,8 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} - - diff --git a/docs-src/layout/oqtane-wip/toc.extension.js b/docs-src/layout/oqtane-wip/toc.extension.js deleted file mode 100644 index 05b827ab5..000000000 --- a/docs-src/layout/oqtane-wip/toc.extension.js +++ /dev/null @@ -1,146 +0,0 @@ - -// List of namespaces which have special rules for display, icons etc. -const namespaceMetadata = require('./namespace-metadata.js'); - -// The primary prefix of all namespaces. Used to detect if an API-node is a namespace-node -const rootNamespace = 'Oqtane'; -const prefix1 = 'Oqtane'; -const prefix2 = 'TodoAddIfNeeded'; - -// These two values determine how the nodes are shortened if they are long -const truncateTo = 2; -const keepParts = 2; - -/** - * This method will be called at the start of exports.transform in toc.html.js - */ -exports.preTransform = function (model) { - // console.warn('2dm-preTransform'); - return model; -} - -/** - * This method will be called at the end of exports.transform in toc.html.js - */ -exports.postTransform = function (model) { - // console.warn('2dm-postTransform:'); - if(isApiToc(model)) - processNode(model, 1); - - // console.error("count:" + count); - return model; -} - - -// ---------------------------------------------------------------------------------------------------- - - -// find out if it's the API toc -// returns false or truthy -function isApiToc(model) { - if(!model) return false; - //var debugModel = JSON.stringify(model); - //var first100 = debugModel.substr(0, 100); - - // find out if it's the TOC of the API - if(!(model.items && model.items.length)) - return false; - - const firstName = model.items[0].name; - const match = isNamespace(firstName); - return match; -} - -// check if a string is likely a namespace API prefix -function isNamespace(name) { - return name && (name.indexOf(prefix1) === 0 || name.indexOf(prefix2) === 0); -} - -// repeat a string X times -function repeatString(part, count) { - if(count <= 0) return ''; - var result = ''; - for(let i = 0; i < count; i++) - result += part; - return result; -} - -let count = 0; - -function processNode(item, depth) { - // console.warn('2dm-processNode'); - - if(isNamespace(item.name)) { - // add metadata - before changing the namespace - decorateWithMetadata(item, depth); - // "folders" in the menu have a depth <= 2 - if(depth <= 2) - shortenNamespace(item, depth); - } - else - removeMetadata(item); - - // do recursively if necessary, but should only matter on the 1st or 2nd recursion - // if(level > 2) return; - - item.level = depth; - if (item.items && item.items.length > 0) { - const length = item.items.length; - for (let i = 0; i < length; i++) { - processNode(item.items[i], depth + 1); - }; - } -} - -/** - * shorten ... the namespace - */ -function shortenNamespace(item, level) { - item.fullName = item.name; - - // if we only have 1 namespace part like "Oqtane", just keep that - if (item.name.split('.').length === 1) return; - - // truncate leading primary namespace as it makes the TOC too long - item.name = item.name.indexOf(rootNamespace) === 0 - ? item.name.substr(rootNamespace.length + 1) - : item.name; - const parts = item.name.split('.'); - const partCount = parts.length; - - if(partCount > keepParts) { - parts.splice(0, partCount - truncateTo); - const newName = repeatString('...', partCount - keepParts) + parts.join('.'); - item.name = newName; - } -} - - - -/** - * add metadata for the template to prioritizes - * @param {*} item - * @param {*} depth - */ -function decorateWithMetadata(item, depth) { - count++; - // if(level > 2) return; - item.priority = namespaceMetadata.priorityNormal; - - // skip if it's not a "folder" - if(!item.topicUid) return; - - // find metadata if available, and attach the metadata-properties - const foundMetadata = namespaceMetadata.data[item.topicUid]; - if(foundMetadata) { - // console.warn('uid:' + item.topicUid); - item.priority = foundMetadata.priority; - } - // if(item.priority == "adam") - // console.warn("found and added priority" + JSON.stringify(item)); -} - -function removeMetadata(item) { - count++; - item.priority = namespaceMetadata.priorityNormal; -} \ No newline at end of file diff --git a/docs-src/layout/oqtane/build-toc-specs.js b/docs-src/templates/oqtane/build-toc-specs.js similarity index 100% rename from docs-src/layout/oqtane/build-toc-specs.js rename to docs-src/templates/oqtane/build-toc-specs.js diff --git a/docs-src/layout/oqtane/build-toc/polyfill-object.assign.js b/docs-src/templates/oqtane/build-toc/polyfill-object.assign.js similarity index 100% rename from docs-src/layout/oqtane/build-toc/polyfill-object.assign.js rename to docs-src/templates/oqtane/build-toc/polyfill-object.assign.js diff --git a/docs-src/layout/oqtane/build-toc/readme.md b/docs-src/templates/oqtane/build-toc/readme.md similarity index 100% rename from docs-src/layout/oqtane/build-toc/readme.md rename to docs-src/templates/oqtane/build-toc/readme.md diff --git a/docs-src/layout/oqtane/build-toc/toc-flatten-namespaces.js b/docs-src/templates/oqtane/build-toc/toc-flatten-namespaces.js similarity index 100% rename from docs-src/layout/oqtane/build-toc/toc-flatten-namespaces.js rename to docs-src/templates/oqtane/build-toc/toc-flatten-namespaces.js diff --git a/docs-src/layout/oqtane/build-toc/toc-tools-new.js b/docs-src/templates/oqtane/build-toc/toc-tools-new.js similarity index 100% rename from docs-src/layout/oqtane/build-toc/toc-tools-new.js rename to docs-src/templates/oqtane/build-toc/toc-tools-new.js diff --git a/docs-src/layout/oqtane/public/main.css b/docs-src/templates/oqtane/public/main.css similarity index 100% rename from docs-src/layout/oqtane/public/main.css rename to docs-src/templates/oqtane/public/main.css diff --git a/docs-src/layout/oqtane/toc.json.js b/docs-src/templates/oqtane/toc.json.js similarity index 100% rename from docs-src/layout/oqtane/toc.json.js rename to docs-src/templates/oqtane/toc.json.js diff --git a/docs/api/Oqtane.Components.App.html b/docs/api/Oqtane.Components.App.html index 368df77c2..c2d4502a5 100644 --- a/docs/api/Oqtane.Components.App.html +++ b/docs/api/Oqtane.Components.App.html @@ -7,7 +7,7 @@ - + @@ -44,7 +44,7 @@