-
Notifications
You must be signed in to change notification settings - Fork 909
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
Support disabling of navbar translucency over cover blocks #702
Support disabling of navbar translucency over cover blocks #702
Conversation
@@ -24,7 +24,7 @@ | |||
} | |||
</style> | |||
{{ end }} | |||
<section id="{{ $blockID }}" class="row td-cover-block td-cover-block--height-{{ $height }} js-td-cover td-overlay td-overlay--dark -bg-{{ $col_id }}"> | |||
<section id="{{ $blockID }}" class="row td-cover-block td-cover-block--height-{{ $height }}{{ if not .Site.Params.ui.navbar_translucent_over_cover_disable }} js-td-cover{{ end }} td-overlay td-overlay--dark -bg-{{ $col_id }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While not strictly necessary, this change prevents the navbar-style-fiddling JS code from being triggered when translucency is disabled:
Lines 35 to 40 in db8f7a7
// Bootstrap Fixed Header | |
$(function() { | |
var promo = $(".js-td-cover"); | |
if (!promo.length) { | |
return | |
} |
Ah this is great! I can see the problem on the grpc site. Is there a good place to document this parameter so other users can find it? (I worked on the earliest iteration of the grpc website, back before Docsy existed. :) ) |
There are a few options, but I was hoping that we could get this merged first. I promise to: (1) add the config option to the example site config file, (2) submit a followup PR with some added documentation -- possible under the https://www.docsy.dev/docs/adding-content/lookandfeel/ section. WDYT?
Oh cool! Right, come to think of it, I do remember seeing your name in some commits from way back! 😄 |
Works for me! I'll merge this now. |
Done, but for some reason the build(s) are failing. I tried to "fix" them, but I believe that the cache might need to be reset. Here's the main PR I submitted: google/docsy-example#130 |
Yeah, Netlify preview builds sometimes go weird like that, I'll manually clear the cache and rerun it. |
So even more weirdly (and I may have to seek Netlify help on this), there are TWO sets of preview deploys coming from the docsy-example repo, one of which always fails. I have no idea where the other one came from, unless it's an artefact of a site name/Netlify settings change. Behold (if you can see these): Your PRs are absolutely fine and the previews are building with no issues. |
It seems like you have your own "LisaFC's team/goldydocs" Netlify account in addition to the "Docsy/docsy-example" account. I suspect that the config settings of the latter are out-of-date. That's why I usually like to put as many of the Netlify config settings as possible in the project's |
Yeah, the Docsy/docsy-example account is from ... somewhen. I'll see if I can track it down with some of the other Docsy-ites and/or dig into with Netlify. The goldydocs version is the one that actually works. |
Docsy has special formatting and code in support of translucent navbars when over a
block/cover
. This sometimes causes problems, e.g., see grpc/grpc.io#866.This PR introduces the
navbar_translucent_over_cover_disable
configuration option, allowing site devs to disable this special behavior.