Skip to content

Commit

Permalink
Update layout to use the new pydata theme
Browse files Browse the repository at this point in the history
  • Loading branch information
AlenkaF committed Jul 10, 2023
1 parent a2bea01 commit 67c8e5e
Show file tree
Hide file tree
Showing 21 changed files with 240 additions and 186 deletions.
3 changes: 2 additions & 1 deletion dev/release/post-11-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def test_version_post_tag
"+ \"name\": \"#{@release_compatible_version} (stable)\",",
"+ {",
"+ \"name\": \"#{@previous_compatible_version}\",",
"+ \"version\": \"#{@previous_compatible_version}/\"",
"+ \"version\": \"#{@previous_compatible_version}/\",",
"+ \"url\": \"https://arrow.apache.org/docs/#{@previous_compatible_version}/\"",
"+ },",
],
],
Expand Down
9 changes: 6 additions & 3 deletions dev/release/utils-update-docs-versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@
# Create new versions
new_versions = [
{"name": f"{dev_compatible_version} (dev)",
"version": "dev/"},
"version": "dev/",
"url": "https://arrow.apache.org/docs/dev/"},
{"name": f"{stable_compatible_version} (stable)",
"version": ""},
"version": "",
"url": "https://arrow.apache.org/docs/"},
{"name": previous_compatible_version,
"version": f"{previous_compatible_version}/"},
"version": f"{previous_compatible_version}/",
"url": f"https://arrow.apache.org/docs/{previous_compatible_version}/"},
*old_versions[2:],
]
with open(main_versions_path, 'w') as json_file:
Expand Down
Binary file added docs/source/_static/arrow-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 4 additions & 6 deletions docs/source/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
--pst-color-h2: var(--color-text-base);
/* Use softer blue from bootstrap's default info color */
--pst-color-info: 23, 162, 184;
--pst-header-height: 0px;
}

code {
Expand All @@ -50,14 +49,13 @@ code {
a.navbar-brand img {
height: auto;
width: auto;
max-height: 15vh;
max-height: var(--pst-header-height);
max-width: 100%;
}

/* Contibuting landing page overview cards */

.contrib-card {
background: #fff;
border-radius: 0;
padding: 30px 10px 20px 10px;
margin: 10px 0px;
Expand All @@ -70,17 +68,17 @@ a.navbar-brand img {
.contrib-card .sd-card-img-top {
margin: 2px;
height: 75px;
background: none !important;
}

.contrib-card .sd-card-title {
/* color: rgb(var(--pst-color-h1)) !important; */
color: var(--pst-color-primary);
font-size: var(--pst-font-size-h3);
/* font-weight: bold; */
padding: 1rem 0rem 0.5rem 0rem;
}

.contrib-card .sd-card-footer {
border: none;
border: none !important;
}

.contib-card .sd-card-footer p.sd-card-text{
Expand Down
42 changes: 28 additions & 14 deletions docs/source/_static/versions.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,72 @@
[
{
"name": "13.0 (dev)",
"version": "dev/"
"version": "dev/",
"url": "https://arrow.apache.org/docs/dev/"
},
{
"name": "12.0 (stable)",
"version": ""
"version": "",
"url": "https://arrow.apache.org/docs/"
},
{
"name": "12.0",
"version": "12.0/"
"version": "12.0/",
"url": "https://arrow.apache.org/docs/12.0/"
},
{
"name": "11.0",
"version": "11.0/"
"version": "11.0/",
"url": "https://arrow.apache.org/docs/11.0/"
},
{
"name": "10.0",
"version": "10.0/"
"version": "10.0/",
"url": "https://arrow.apache.org/docs/10.0/"
},
{
"name": "9.0",
"version": "9.0/"
"version": "9.0/",
"url": "https://arrow.apache.org/docs/9.0/"
},
{
"name": "8.0",
"version": "8.0/"
"version": "8.0/",
"url": "https://arrow.apache.org/docs/8.0/"
},
{
"name": "7.0",
"version": "7.0/"
"version": "7.0/",
"url": "https://arrow.apache.org/docs/7.0/"
},
{
"name": "6.0",
"version": "6.0/"
"version": "6.0/",
"url": "https://arrow.apache.org/docs/6.0/"
},
{
"name": "5.0",
"version": "5.0/"
"version": "5.0/",
"url": "https://arrow.apache.org/docs/5.0/"
},
{
"name": "4.0",
"version": "4.0/"
"version": "4.0/",
"url": "https://arrow.apache.org/docs/4.0/"
},
{
"name": "3.0",
"version": "3.0/"
"version": "3.0/",
"url": "https://arrow.apache.org/docs/3.0/"
},
{
"name": "2.0",
"version": "2.0/"
"version": "2.0/",
"url": "https://arrow.apache.org/docs/2.0/"
},
{
"name": "1.0",
"version": "1.0/"
"version": "1.0/",
"url": "https://arrow.apache.org/docs/dev/"
}
]
25 changes: 0 additions & 25 deletions docs/source/_templates/docs-sidebar.html

This file was deleted.

4 changes: 0 additions & 4 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
<!-- End Matomo Code -->
{% endblock %}

{# Silence the navbar #}
{% block docs_navbar %}
{% endblock %}

{# Add version warnings #}
{% block footer %}
{{ super() }}
Expand Down
60 changes: 0 additions & 60 deletions docs/source/_templates/version-switcher.html

This file was deleted.

35 changes: 26 additions & 9 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,34 @@
# further. For a list of options available for each theme, see the
# documentation.
#

html_theme_options = {
"show_toc_level": 2,
"use_edit_page_button": True,
"logo": {
"image_light": "_static/arrow.png",
"image_dark": "_static/arrow-dark.png",
},
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/apache/arrow",
"icon": "fa-brands fa-square-github",
},
{
"name": "Twitter",
"url": "https://twitter.com/ApacheArrow",
"icon": "fa-brands fa-square-twitter",
},
],
"switcher": {
# TODO: add versions.json to the arrow-site and change the link
"json_url": "https://gist.githubusercontent.com/AlenkaF/9cc5820d3030cefcd2eee48e1ea58dc5/raw/8eb52d2878ab9e689f59fecb66bb20667a3e7d6a/versions.json",
"version_match": version,
}
}

html_context = {
"switcher_json_url": "/docs/_static/versions.json",
"switcher_template_url": "https://arrow.apache.org/docs/{version}",
# for local testing
# "switcher_template_url": "http://0.0.0.0:8000/docs/{version}",
"github_user": "apache",
"github_repo": "arrow",
"github_version": "main",
Expand All @@ -319,7 +337,7 @@
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
html_logo = "_static/arrow.png"
# html_logo = "_static/arrow.png"

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or
Expand Down Expand Up @@ -354,10 +372,9 @@

# Custom sidebar templates, maps document names to template names.
#
html_sidebars = {
# html_sidebars = {
# '**': ['sidebar-logo.html', 'sidebar-search-bs.html', 'sidebar-nav-bs.html'],
'**': ['docs-sidebar.html'],
}
# }

# The base URL which points to the root of the HTML documentation,
# used for canonical url
Expand Down
23 changes: 23 additions & 0 deletions docs/source/cpp/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,28 @@ Welcome to the Apache Arrow C++ implementation documentation!

API Reference

.. grid:: 1
:gutter: 4
:padding: 2 2 0 0
:class-container: sd-text-center

.. grid-item-card:: Cookbook
:class-card: contrib-card
:shadow: md

Collection of recipes which demonstrate how to
solve many common tasks that users might need
to perform when working with arrow data

+++

.. button-link:: https://arrow.apache.org/cookbook/cpp/
:click-parent:
:color: secondary
:expand:

C++ Cookbook

.. toctree::
:maxdepth: 2
:hidden:
Expand All @@ -102,3 +124,4 @@ Welcome to the Apache Arrow C++ implementation documentation!
user_guide
Examples <examples/index>
api
C++ cookbook <https://arrow.apache.org/cookbook/cpp/>
2 changes: 1 addition & 1 deletion docs/source/developers/images/book-open-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/developers/images/bug-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/developers/images/code-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/developers/images/users-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions docs/source/developers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
.. specific language governing permissions and limitations
.. under the License.
.. _developers:

Development
===========

.. toctree::
:maxdepth: 2
:caption: Development
:hidden:

contributing
bug_reports
Expand Down
Loading

0 comments on commit 67c8e5e

Please sign in to comment.