From e78c6895c0fd5ae537a330fcf91b3d29a0c9f012 Mon Sep 17 00:00:00 2001 From: dobromirts Date: Wed, 3 Apr 2024 22:18:50 +0300 Subject: [PATCH] Add appbuilder theme --- gulpfile.js | 4 +- src/styles/appbuilder/_variables.scss | 3 + src/styles/appbuilder/main.scss | 62 ++ src/styles/shared/components/_footer.scss | 2 +- .../shared/components/header/_navbar.scss | 2 +- template/conceptual.html.primary.js | 2 +- template/layout/_master.tmpl | 8 + .../appbuilder/appbuilderfoot.ja.tmpl.partial | 92 ++ .../appbuilder/appbuilderfoot.tmpl.partial | 92 ++ .../partials/appbuilder/footer.tmpl.partial | 13 + .../partials/appbuilder/navbar.tmpl.partial | 882 ++++++++++++++++++ template/partials/head.tmpl.partial | 44 + template/partials/navbar.tmpl.partial | 1 + template/partials/scripts.tmpl.partial | 10 + webpack.dev.js | 3 +- webpack.prod.js | 3 +- 16 files changed, 1217 insertions(+), 6 deletions(-) create mode 100644 src/styles/appbuilder/_variables.scss create mode 100644 src/styles/appbuilder/main.scss create mode 100644 template/partials/appbuilder/appbuilderfoot.ja.tmpl.partial create mode 100644 template/partials/appbuilder/appbuilderfoot.tmpl.partial create mode 100644 template/partials/appbuilder/footer.tmpl.partial create mode 100644 template/partials/appbuilder/navbar.tmpl.partial diff --git a/gulpfile.js b/gulpfile.js index 731d0e01..fcd24fc9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -46,7 +46,9 @@ const generateBundlingGlobalMetadata = (done, dev=false) => { {name:"lunr-search", ext: "js"}, {name:"runtime", ext: "js"}, {name:"igniteui", ext: "css"}, - {name:"slingshot", ext: "css"}] + {name:"slingshot", ext: "css"}, + {name:"appbuilder", ext: "css"}, + ] if(!dev) { outputBuildFiles = fs.readdirSync(path.join(__dirname, WEBPACK_BUILD_DIST)); } diff --git a/src/styles/appbuilder/_variables.scss b/src/styles/appbuilder/_variables.scss new file mode 100644 index 00000000..636a1e11 --- /dev/null +++ b/src/styles/appbuilder/_variables.scss @@ -0,0 +1,3 @@ +@import '../ignite-ui/variables'; + +$link-decoration: none; \ No newline at end of file diff --git a/src/styles/appbuilder/main.scss b/src/styles/appbuilder/main.scss new file mode 100644 index 00000000..e26b38b3 --- /dev/null +++ b/src/styles/appbuilder/main.scss @@ -0,0 +1,62 @@ +@import '~highlight.js/scss/vs2015.scss'; +@import '../shared/mixins'; +@import './variables'; +@import '../shared/global'; + +@media (max-width: 991px) { + .sidenav-container { + max-width: 100%; + } +} +@media (min-width: 768px) { + .article-container { + max-width: 100%; + } +} + +@media only screen and (min-width: 1281px) { + .mega-sticky-wrapper{ + height: 120px !important; + } + #mega-menu-wrap-max_mega_menu_2{ + height: 120px !important; + } +} + +@media only screen and (max-width: 1281px) { + .mega-sticky-wrapper{ + height: unset !important; + } + #mega-menu-wrap-max_mega_menu_2{ + height: unset !important; + } +} + +@media only screen and (max-width: 1281px) { + #main{ + padding-top: rem(16px); + } +} + +#mega-menu-wrap-max_mega_menu_2 { + background: white; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2); +} + +.footer { + background: #282561 !important; + padding: 0; +} + +.footer.footer-utils { + background: #19193d !important; + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.footer.footer-copyright { + background: #19193d !important; + color: #999 !important; + padding: 0 0 1rem !important; + text-align: center !important; +} diff --git a/src/styles/shared/components/_footer.scss b/src/styles/shared/components/_footer.scss index a766da5f..72ca3540 100644 --- a/src/styles/shared/components/_footer.scss +++ b/src/styles/shared/components/_footer.scss @@ -4,7 +4,7 @@ footer { } .footer { - border-top: 1px solid $border-color; + //border-top: 1px solid $border-color; background-color: $footer-bg; padding: 15px 0; } diff --git a/src/styles/shared/components/header/_navbar.scss b/src/styles/shared/components/header/_navbar.scss index bee87668..f496d599 100644 --- a/src/styles/shared/components/header/_navbar.scss +++ b/src/styles/shared/components/header/_navbar.scss @@ -78,7 +78,7 @@ display: none !important; } -.btn-secondary { +.btn-secondary:not(.px-3) { padding: 0px 8px 0px 0px !important; color: #9d9d9d; font-size: 0.825rem; diff --git a/template/conceptual.html.primary.js b/template/conceptual.html.primary.js index bd6720f9..a24b57a0 100644 --- a/template/conceptual.html.primary.js +++ b/template/conceptual.html.primary.js @@ -60,7 +60,7 @@ exports.transform = function (model) { } else if (model._platform === "appbuilder") { model._isAppBuilder = true; model._isIgnite = true; - model._showHelloBar = true; + model._showHelloBar = false; } else if (model._platform === "blazor") { model._isBlazor = true; model._isIgnite = true; diff --git a/template/layout/_master.tmpl b/template/layout/_master.tmpl index 4c0e1bb4..ac260af5 100644 --- a/template/layout/_master.tmpl +++ b/template/layout/_master.tmpl @@ -21,6 +21,10 @@ {{^_disableNavbar}} {{>partials/slingshot/navbar}} {{/_disableNavbar}} {{/slingshotTheme}} + {{#appbuilderTheme}} + {{^_disableNavbar}} {{>partials/appbuilder/navbar}} {{/_disableNavbar}} + {{/appbuilderTheme}} + {{#igniteuiTheme}} {{^_disableNavbar}} {{>partials/navbar}} {{/_disableNavbar}} {{/igniteuiTheme}} @@ -63,6 +67,10 @@ {{^_disableFooter}} {{>partials/slingshot/footer}} {{/_disableFooter}} {{/slingshotTheme}} + {{#appbuilderTheme}} + {{^_disableFooter}} {{>partials/appbuilder/footer}} {{/_disableFooter}} + {{/appbuilderTheme}} + {{#igniteuiTheme}} {{^_disableFooter}} {{>partials/footer}} {{/_disableFooter}} {{/igniteuiTheme}} diff --git a/template/partials/appbuilder/appbuilderfoot.ja.tmpl.partial b/template/partials/appbuilder/appbuilderfoot.ja.tmpl.partial new file mode 100644 index 00000000..c1e84dab --- /dev/null +++ b/template/partials/appbuilder/appbuilderfoot.ja.tmpl.partial @@ -0,0 +1,92 @@ + + + \ No newline at end of file diff --git a/template/partials/appbuilder/appbuilderfoot.tmpl.partial b/template/partials/appbuilder/appbuilderfoot.tmpl.partial new file mode 100644 index 00000000..c1e84dab --- /dev/null +++ b/template/partials/appbuilder/appbuilderfoot.tmpl.partial @@ -0,0 +1,92 @@ + + + \ No newline at end of file diff --git a/template/partials/appbuilder/footer.tmpl.partial b/template/partials/appbuilder/footer.tmpl.partial new file mode 100644 index 00000000..8921535c --- /dev/null +++ b/template/partials/appbuilder/footer.tmpl.partial @@ -0,0 +1,13 @@ + diff --git a/template/partials/appbuilder/navbar.tmpl.partial b/template/partials/appbuilder/navbar.tmpl.partial new file mode 100644 index 00000000..c3023724 --- /dev/null +++ b/template/partials/appbuilder/navbar.tmpl.partial @@ -0,0 +1,882 @@ + diff --git a/template/partials/head.tmpl.partial b/template/partials/head.tmpl.partial index 1c3baa6f..6cb3470d 100644 --- a/template/partials/head.tmpl.partial +++ b/template/partials/head.tmpl.partial @@ -43,6 +43,50 @@ full license information.}} + + {{#_isAppBuilder}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{/_isAppBuilder}} + + +{{#_isAppBuilder}} + + + + + +{{/_isAppBuilder}} diff --git a/webpack.dev.js b/webpack.dev.js index 5e92500b..188ea41c 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -8,7 +8,8 @@ module.exports = { entry: { main: './src/app/docfx.ts', igniteui: './src/styles/ignite-ui/main.scss', - slingshot: './src/styles/slingshot/main.scss' + slingshot: './src/styles/slingshot/main.scss', + appbuilder: './src/styles/appbuilder/main.scss' }, devtool: 'eval-source-map', externals: { diff --git a/webpack.prod.js b/webpack.prod.js index f2c29f18..c492e4ec 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -8,7 +8,8 @@ module.exports = { entry: { main: './src/app/docfx.ts', igniteui: './src/styles/ignite-ui/main.scss', - slingshot: './src/styles/slingshot/main.scss' + slingshot: './src/styles/slingshot/main.scss', + appbuilder: './src/styles/appbuilder/main.scss' }, externals: { jquery: 'jQuery'