You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2023/11/18 08:34:16 UTC
(arrow) branch main updated: MINOR: [Docs] Make cards on index page of docs responsive (#38693)
This is an automated email from the ASF dual-hosted git repository.
alenka pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 8301eb5e26 MINOR: [Docs] Make cards on index page of docs responsive (#38693)
8301eb5e26 is described below
commit 8301eb5e26efd55bd03adb46aac4202523deb88a
Author: Bryce Mecum <pe...@gmail.com>
AuthorDate: Fri Nov 17 23:34:06 2023 -0900
MINOR: [Docs] Make cards on index page of docs responsive (#38693)
### Rationale for this change
The text inside the Specifications and Development cards in the docs get squished on mobile or small-viewport devices because their CSS grid definition isn't responsive. Example:

### What changes are included in this PR?
This changes this specific use of the [`grid-item`](https://sphinx-design.readthedocs.io/en/latest/grids.html) directive to take advantage of the responsive variant,
> or four numbers for extra-small (<576px), small (768px), medium (992px) and large screens (>1200px),
For the extra-small variant, the grid dynamically switches to a single-column which prevents squishing of the text inside the card. Otherwise a two-column grid is used.
### Are these changes tested?
Yes, I built the docs in a local conda env and tested that the cards look right at all widths. At narrow widths, it looks like this:

### Are there any user-facing changes?
Just to docs, see above.
Authored-by: Bryce Mecum <pe...@gmail.com>
Signed-off-by: AlenkaF <fr...@gmail.com>
---
docs/source/cpp/index.rst | 4 ++--
docs/source/developers/index.rst | 4 ++--
docs/source/index.rst | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/source/cpp/index.rst b/docs/source/cpp/index.rst
index 6d4d4aaa81..ee0434ac0f 100644
--- a/docs/source/cpp/index.rst
+++ b/docs/source/cpp/index.rst
@@ -22,7 +22,7 @@ C++ Implementation
Welcome to the Apache Arrow C++ implementation documentation!
-.. grid:: 2
+.. grid:: 1 2 2 2
:gutter: 4
:padding: 2 2 0 0
:class-container: sd-text-center
@@ -60,7 +60,7 @@ Welcome to the Apache Arrow C++ implementation documentation!
To the User Guide
-.. grid:: 2
+.. grid:: 1 2 2 2
:gutter: 4
:padding: 2 2 0 0
:class-container: sd-text-center
diff --git a/docs/source/developers/index.rst b/docs/source/developers/index.rst
index c2f10c9e95..83dc556e16 100644
--- a/docs/source/developers/index.rst
+++ b/docs/source/developers/index.rst
@@ -71,7 +71,7 @@ Code of Conduct
All participation in the Apache Arrow project is governed by the ASF's
`Code of Conduct <https://www.apache.org/foundation/policies/conduct.html>`_.
-.. grid:: 2
+.. grid:: 1 2 2 2
:gutter: 4
:padding: 2 2 0 0
:class-container: sd-text-center
@@ -146,7 +146,7 @@ All participation in the Apache Arrow project is governed by the ASF's
* :ref:`documentation`
* :ref:`building-docs`
-.. grid:: 2
+.. grid:: 1 2 2 2
:gutter: 4
:padding: 2 2 0 0
:class-container: sd-text-center
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 8407813bd7..e6e82c13d7 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -37,7 +37,7 @@ such topics as:
**To learn how to use Arrow refer to the documentation specific to your
target environment.**
-.. grid:: 2
+.. grid:: 1 2 2 2
:gutter: 4
:padding: 2 2 0 0
:class-container: sd-text-center