Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation and contribution links tweak #773

Merged
merged 3 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docfx/templates/material/styles/docfx.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,12 @@ $(function () {
$('#navbar ul a.active').parents('li').addClass(active);
renderBreadcrumb();
showSearch();

// if window url is site root then set first item in navbar to active
if (window.location.pathname === '/') {
$('#navbar ul li:first-child').addClass(active);
}

}

function showSearch() {
Expand Down Expand Up @@ -1196,4 +1202,10 @@ $(function () {
$('a:not([data-tab])').click(function (e) { delegateAnchors(e); });
});
}

// Hide the contribution panel on home page, by-tool, by-product pages
if (window.location.pathname === '/' || window.location.pathname === '/index.html' || window.location.pathname === '/by-tool.html'
|| window.location.pathname === '/by-product.html' || window.location.pathname === '/compact-view.html') {
$('.contribution-panel').hide();
}
});
6 changes: 4 additions & 2 deletions docfx/templates/material/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ article h4 {
/* Both navbars use box-shadow */
-webkit-box-shadow: var(--card-box-shadow);
-moz-box-shadow: var(--card-box-shadow);
box-shadow: var(--card-box-shadow);
/* box-shadow: var(--card-box-shadow); */
box-shadow: 0 0 14px 12px rgb(0 0 0 / 30%);
min-height: 65px;
}

.subnav {
Expand Down Expand Up @@ -884,7 +886,7 @@ p.sample-title {
}
.github-mark img{
height: 45px;
margin-top: 5px;
margin-top: 10px;
}

/* List view styles */
Expand Down
2 changes: 1 addition & 1 deletion docfx/templates/material/styles/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,5 @@ ul.github-facts li {

.github-repository{
font-size: 18px;
margin: 5px 10px 0 0;
margin: 10px 10px 0 0;
}