diff --git a/docs/reST/_static/sections.js b/docs/reST/_static/sections.js index 3b1a9ed29c..7ff7f107ef 100644 --- a/docs/reST/_static/sections.js +++ b/docs/reST/_static/sections.js @@ -1,3 +1,22 @@ -const page = document - -page. \ No newline at end of file +function toggleSectionVisibility(section){ + document.getElementById(section).hidden = ! document.getElementById(section).hidden; + if (document.getElementById(section).hidden === true){ + items = localStorage.getItem('hidden'); + if (items !== null){ + if (!(items.includes(section))){ + items = items + '|' + section + '|'; + } + localStorage.setItem('hidden', items); + } else { + localStorage.setItem('hidden', section); + } + } else { + items = localStorage.getItem('hidden'); + if (items !== null){ + if (items.includes(section)){ + items = items.replace(section + '|', '') + } + localStorage.setItem('hidden', items); + } + } +} \ No newline at end of file diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index 261250ce1b..d501889dac 100644 --- a/docs/reST/themes/classic/elements.html +++ b/docs/reST/themes/classic/elements.html @@ -35,7 +35,7 @@
pygame-ce documentation

-
+
{#- We render those sections based on functionality. @@ -53,7 +53,7 @@
pygame-ce documentation
{%- set hidden = ['Overlay', 'cdrom', 'sdl2_video', 'sdl2_controller'] %} {%- if pyg_sections %} -

Window

+

Window

{% set sep = joiner("
") %} {%- for section in pyg_sections %} @@ -71,7 +71,7 @@
pygame-ce documentation

-

Drawing / Surface

+

Drawing / Surface

{% set sep = joiner("
") %} {%- for section in pyg_sections %} @@ -89,7 +89,7 @@
pygame-ce documentation

-

Events/Input

+

Events/Input

{% set sep = joiner("
") %} {%- for section in pyg_sections %} @@ -107,7 +107,7 @@
pygame-ce documentation

-

Collisions

+

Collisions

{% set sep = joiner("
") %} {%- for section in pyg_sections %} @@ -125,7 +125,7 @@
pygame-ce documentation

-

Music

+

Music

{% set sep = joiner("
") %} {%- for section in pyg_sections %} @@ -143,7 +143,7 @@
pygame-ce documentation

-

Other

+

Other

{% set sep = joiner("
") %} {%- for section in pyg_sections %} @@ -178,4 +178,11 @@
pygame-ce documentation
{%- block relbaritems %} + {% endblock %} diff --git a/docs/reST/themes/classic/static/pygame.css_t b/docs/reST/themes/classic/static/pygame.css_t index 96146880a4..c1ab084ecd 100644 --- a/docs/reST/themes/classic/static/pygame.css_t +++ b/docs/reST/themes/classic/static/pygame.css_t @@ -174,7 +174,8 @@ div.header .pagelinks a:hover { .pagelinks .bottom a { font-weight: 400; color: {{ theme_linkcolor2 }}; - margin-left: 1em;} + margin-left: 1em; +} .dark-theme .pagelinks .bottom a { color: {{ theme_dark_linkcolor2 }}; font-size: 1.1rem;