You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ru...@apache.org on 2022/02/08 18:07:26 UTC
[iceberg-docs] 07/47: Style updates (#5)
This is an automated email from the ASF dual-hosted git repository.
russellspitzer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-docs.git
commit 7597f00d9c7aca731ba8ecd507a5b9dadce31c8f
Author: Samuel Redai <43...@users.noreply.github.com>
AuthorDate: Thu Jan 13 16:27:16 2022 -0800
Style updates (#5)
- Update font-family and font-size in docs to match common pages
- Increase docs page width (there was a lot of whitespace on the edges)
- Add highlighting to search results to make the matched text more visible
---
docs/assets/_custom.scss | 14 ++++++++++++++
docs/assets/search.js | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/docs/assets/_custom.scss b/docs/assets/_custom.scss
index 612762e..01d26f0 100644
--- a/docs/assets/_custom.scss
+++ b/docs/assets/_custom.scss
@@ -1,3 +1,9 @@
+body {
+ font-family: sans-serif, -apple-system, BlinkMacSystemFont, segoe ui, Helvetica, Arial, apple color emoji, segoe ui emoji;
+ font-size: 16px;
+ word-wrap: break-word;
+}
+
.navigation-icon {
width: 1.28571429em;
max-height: 14px;
@@ -49,6 +55,9 @@ ul#book-search-results {
width: 100%;
background-color: white;
z-index: 10;
+ a b mark {
+ background-color: #B8E1F3;
+ }
}
ul#book-search-results li small {
@@ -75,4 +84,9 @@ aside nav ul {
.book-menu {
font-size: 0.8rem;
+}
+
+.container {
+ max-width: $container-max-width + 20;
+ margin: 0 auto;
}
\ No newline at end of file
diff --git a/docs/assets/search.js b/docs/assets/search.js
index 54ee547..3dc1050 100644
--- a/docs/assets/search.js
+++ b/docs/assets/search.js
@@ -74,9 +74,9 @@
const resultLocation = page.content.toLowerCase().indexOf(query.toLowerCase());
return `<a href="${page.href}">...` +
page.content.substring(resultLocation-extraLength, resultLocation) +
- "<b>" +
+ "<b><mark>" +
page.content.substring(resultLocation, resultLocation + query.length) +
- "</b>" +
+ "</mark></b>" +
page.content.substring(resultLocation + query.length, resultLocation + extraLength) +
"..." +
"</a>"