bookdown icon indicating copy to clipboard operation
bookdown copied to clipboard

[FR] Tweak bs4_book() search to mimick pkgdown

Open maelle opened this issue 4 years ago • 3 comments

  • have something in the absence of results.
  • mimick formatting?

maelle avatar Apr 30 '21 15:04 maelle

  • XPath tweak to prevent duplicate text cf https://github.com/r-lib/pkgdown/issues/1656

maelle avatar May 03 '21 07:05 maelle

  • Support the bslib key as with pkgdown 🔑

apreshill avatar May 21 '21 16:05 apreshill

@apreshill do you mean re-using the rules below? I.e. related to #1021?


.algolia-autocomplete .aa-hint {
  color: mix($body-color, $body-bg, 90%);
}


/* "Max" needed until libsass supports https://sass-lang.com/documentation/syntax/special-functions#min-and-max */
.algolia-autocomplete .aa-dropdown-menu {
  width: Max(100%, 20rem);
  background-color: $body-bg;
  border: 1px solid $table-border-color;
  border-radius: 0.2rem;
  margin-top: 2px;

  max-height: 50vh;
  overflow-y: auto;
}
.algolia-autocomplete .aa-dropdown-menu .aa-suggestion {
  cursor: pointer;
  padding: 5px 4px;
  border-bottom: 1px mix($body-color, $body-bg, 20%) solid;
  font-size: 0.9rem;
  color: mix($body-color, $body-bg, 90%);

}

.search-details {
  font-size: 0.9rem;
  color: $primary;
  display: inline;
  font-weight: bolder;
}
.algolia-autocomplete .aa-dropdown-menu .aa-suggestion.aa-cursor {
  background-color: #B2D7FF;
}

maelle avatar May 24 '21 15:05 maelle