diff --git a/Makefile b/Makefile index 4ec6084b1d1..ce24e2cd6b8 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ ALLSPHINXOPTS = --builder $(BUILDER) \ .PHONY: html html: venv $(SPHINXBUILD) $(ALLSPHINXOPTS) + $(VENVDIR)/bin/python3 -m pagefind --site $(BUILDDIR) --verbose ## htmlview to open the index page built by the html target in your browser .PHONY: htmlview diff --git a/pep_sphinx_extensions/pep_theme/static/mq.css b/pep_sphinx_extensions/pep_theme/static/mq.css index 2609a959ebd..5653f66a555 100644 --- a/pep_sphinx_extensions/pep_theme/static/mq.css +++ b/pep_sphinx_extensions/pep_theme/static/mq.css @@ -17,6 +17,10 @@ nav#pep-sidebar { display: none; } + /* Show mobile search container on small screens */ + .mobile-search-container { + display: block; + } pre { font-size: 0.8175rem; } @@ -46,6 +50,10 @@ float: left; margin-right: 2%; } + /* Hide mobile search container on larger screens */ + .mobile-search-container { + display: none; + } /* Make less prominent when sidebar ToC is available */ details > summary { font-size: 1rem; diff --git a/pep_sphinx_extensions/pep_theme/static/style.css b/pep_sphinx_extensions/pep_theme/static/style.css index 37323c27794..edbe8e38c05 100644 --- a/pep_sphinx_extensions/pep_theme/static/style.css +++ b/pep_sphinx_extensions/pep_theme/static/style.css @@ -427,6 +427,10 @@ dl.footnote > dd { padding-bottom: 2rem; font-weight: bold; } +/* Pagefind search results */ +#pep-sidebar ol.pagefind-ui__results { + padding-left: .5rem; +} .reference.external > strong { font-weight: normal; /* Fix strong links for :pep: and :rfc: roles */ diff --git a/pep_sphinx_extensions/pep_theme/templates/page.html b/pep_sphinx_extensions/pep_theme/templates/page.html index 560edea8199..53a54bf87f0 100644 --- a/pep_sphinx_extensions/pep_theme/templates/page.html +++ b/pep_sphinx_extensions/pep_theme/templates/page.html @@ -46,11 +46,21 @@