From 98d0ea04f873c92842ffe9d5c0a54c8c5ebcc953 Mon Sep 17 00:00:00 2001 From: NOTMEE12 Date: Fri, 2 Jun 2023 17:05:03 +0200 Subject: [PATCH 01/19] added sidebar + sorted modules by sections --- docs/reST/index.html | 727 +++++++++++++++++++ docs/reST/themes/classic/elements.html | 103 ++- docs/reST/themes/classic/static/pygame.css_t | 30 +- 3 files changed, 833 insertions(+), 27 deletions(-) create mode 100644 docs/reST/index.html diff --git a/docs/reST/index.html b/docs/reST/index.html new file mode 100644 index 0000000000..5bffe9841b --- /dev/null +++ b/docs/reST/index.html @@ -0,0 +1,727 @@ + + + + + + +Pygame-ce Front Page + + + +
+

Pygame-ce Front Page

+ +
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 4)

+

Unknown directive type "toctree".

+
+.. toctree::
+   :maxdepth: 2
+   :glob:
+   :hidden:
+
+   ref/*
+   tutorials/en/*
+   tutorials/en/**/*
+   tutorials/ko/**/*
+   tutorials/es/*
+   c_api
+   filepaths
+   logos
+
+
+
+
+

Quick start

+

Welcome to pygame-ce! Once you've got pygame-ce installed +(pip install pygame-ce or pip3 install pygame-ce for most +people), the next question is how to get a game loop running. Pygame-ce, +unlike some other libraries, gives you full control of program +execution. That freedom means it is easy to mess up in your initial steps.

+

Here is a good example of a basic setup (opens the window, updates the screen, and handles events)--

+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 29)

+

Unknown directive type "literalinclude".

+
+.. literalinclude:: ref/code_examples/base_script.py
+
+
+
+

Here is a slightly more fleshed out example, which shows you how to move something +(a circle in this case) around on screen--

+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 34)

+

Unknown directive type "literalinclude".

+
+.. literalinclude:: ref/code_examples/base_script_example.py
+
+
+
+

For more in depth reference, check out the :ref:`tutorials-reference-label` +section below, check out a video tutorial (I'm a fan of this one), or reference the API +documentation by module.

+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 36); backlink

+Unknown interpreted text role "ref".
+
+
+

Documents

+
+
Readme
+
Basic information about pygame: what it is, who is involved, and where to find it.
+
:doc:`filepaths`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 48); backlink

+Unknown interpreted text role "doc".
+

How pygame handles file system paths.

+
+
:doc:`Pygame Logos <logos>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 52); backlink

+Unknown interpreted text role "doc".
+

The logos of Pygame in different resolutions.

+
+
LGPL License
+
This is the license pygame is distributed under. +It provides for pygame to be distributed with open source and commercial software. +Generally, if pygame is not changed, it can be used with any type of program.
+
+
+
+

Tutorials

+
+
:doc:`Introduction to Pygame <tutorials/en/intro-to-pygame>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 66); backlink

+Unknown interpreted text role "doc".
+

An introduction to the basics of pygame. +This is written for users of Python and appeared in volume two of the Py magazine.

+
+
:doc:`Import and Initialize <tutorials/en/import-init>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 71); backlink

+Unknown interpreted text role "doc".
+

The beginning steps on importing and initializing pygame. +The pygame package is made of several modules. +Some modules are not included on all platforms.

+
+
:doc:`How do I move an Image? <tutorials/en/move-it>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 75); backlink

+Unknown interpreted text role "doc".
+

A basic tutorial that covers the concepts behind 2D computer animation. +Information about drawing and clearing objects to make them appear animated.

+
+
:doc:`Chimp Tutorial, Line by Line <tutorials/en/chimp-explanation>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 80); backlink

+Unknown interpreted text role "doc".
+

The pygame examples include a simple program with an interactive fist and a chimpanzee. +This was inspired by the annoying flash banner of the early 2000s. +This tutorial examines every line of code used in the example.

+
+
:doc:`Sprite Module Introduction <tutorials/en/intro-to-sprites>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 86); backlink

+Unknown interpreted text role "doc".
+

Pygame includes a higher level sprite module to help organize games. +The sprite module includes several classes that help manage details found in almost all games types. +The Sprite classes are a bit more advanced than the regular pygame modules, +and need more understanding to be properly used.

+
+
:doc:`Surfarray Introduction <tutorials/en/intro-to-surfarray>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 91); backlink

+Unknown interpreted text role "doc".
+

Pygame used the NumPy python module to allow efficient per pixel effects on images. +Using the surface arrays is an advanced feature that allows custom effects and filters. +This also examines some of the simple effects from the pygame example, arraydemo.py.

+
+
:doc:`Camera Module Introduction <tutorials/en/intro-to-camera>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 96); backlink

+Unknown interpreted text role "doc".
+

Pygame, as of 1.9, has a camera module that allows you to capture images, +watch live streams, and do some basic computer vision. +This tutorial covers those use cases.

+
+
:doc:`Newbie Guide <tutorials/en/newbie-guide>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 99); backlink

+Unknown interpreted text role "doc".
+

A list of thirteen helpful tips for people to get comfortable using pygame.

+
+
:doc:`Making Games Tutorial <tutorials/en/make-games>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 102); backlink

+Unknown interpreted text role "doc".
+

A large tutorial that covers the bigger topics needed to create an entire game.

+
+
:doc:`Display Modes <tutorials/en/display-modes>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 105); backlink

+Unknown interpreted text role "doc".
+

Getting a display surface for the screen.

+
+
:doc:`한국어 튜토리얼 (Korean Tutorial) <tutorials/ko/빨간블록 검은블록/개요>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 108); backlink

+Unknown interpreted text role "doc".
+

빨간블록 검은블록

+
+
:doc:`Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Línea <tutorials/es/ChimpanceLineaporLinea>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 114); backlink

+Unknown interpreted text role "doc".
+

Los ejemplos de pygame incluyen un sencillo programa con un puño interactivo y un chimpancé. +Está inspirado en el molesto banner de flash de principios de la década de 2000. +Este tutorial examina cada línea de código utilizada en el ejemplo.

+
+
+
+
+

Reference

+
+
:ref:`genindex`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 120); backlink

+Unknown interpreted text role "ref".
+

A list of all functions, classes, and methods in the pygame package.

+
+
:doc:`ref/bufferproxy`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 123); backlink

+Unknown interpreted text role "doc".
+

An array protocol view of surface pixels

+
+
:doc:`ref/color`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 126); backlink

+Unknown interpreted text role "doc".
+

Color representation.

+
+
:doc:`ref/cursors`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 129); backlink

+Unknown interpreted text role "doc".
+

Loading and compiling cursor images.

+
+
:doc:`ref/display`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 132); backlink

+Unknown interpreted text role "doc".
+

Configure the display surface.

+
+
:doc:`ref/draw`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 135); backlink

+Unknown interpreted text role "doc".
+

Drawing simple shapes like lines and ellipses to surfaces.

+
+
:doc:`ref/event`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 138); backlink

+Unknown interpreted text role "doc".
+

Manage the incoming events from various input devices and the windowing platform.

+
+
:doc:`ref/examples`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 141); backlink

+Unknown interpreted text role "doc".
+

Various programs demonstrating the use of individual pygame modules.

+
+
:doc:`ref/font`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 144); backlink

+Unknown interpreted text role "doc".
+

Loading and rendering TrueType fonts.

+
+
:doc:`ref/freetype`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 147); backlink

+Unknown interpreted text role "doc".
+

Enhanced pygame module for loading and rendering font faces.

+
+
:doc:`ref/gfxdraw`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 150); backlink

+Unknown interpreted text role "doc".
+

Anti-aliasing draw functions.

+
+
:doc:`ref/image`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 153); backlink

+Unknown interpreted text role "doc".
+

Loading, saving, and transferring of surfaces.

+
+
:doc:`ref/joystick`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 156); backlink

+Unknown interpreted text role "doc".
+

Manage the joystick devices.

+
+
:doc:`ref/key`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 159); backlink

+Unknown interpreted text role "doc".
+

Manage the keyboard device.

+
+
:doc:`ref/locals`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 162); backlink

+Unknown interpreted text role "doc".
+

Pygame constants.

+
+
:doc:`ref/mixer`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 165); backlink

+Unknown interpreted text role "doc".
+

Load and play sounds

+
+
:doc:`ref/mouse`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 168); backlink

+Unknown interpreted text role "doc".
+

Manage the mouse device and display.

+
+
:doc:`ref/music`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 171); backlink

+Unknown interpreted text role "doc".
+

Play streaming music tracks.

+
+
:doc:`ref/pygame`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 174); backlink

+Unknown interpreted text role "doc".
+

Top level functions to manage pygame.

+
+
:doc:`ref/pixelarray`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 177); backlink

+Unknown interpreted text role "doc".
+

Manipulate image pixel data.

+
+
:doc:`ref/rect`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 180); backlink

+Unknown interpreted text role "doc".
+

Flexible container for a rectangle.

+
+
:doc:`ref/scrap`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 183); backlink

+Unknown interpreted text role "doc".
+

Native clipboard access.

+
+
:doc:`ref/sndarray`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 186); backlink

+Unknown interpreted text role "doc".
+

Manipulate sound sample data.

+
+
:doc:`ref/sprite`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 189); backlink

+Unknown interpreted text role "doc".
+

Higher level objects to represent game images.

+
+
:doc:`ref/surface`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 192); backlink

+Unknown interpreted text role "doc".
+

Objects for images and the screen.

+
+
:doc:`ref/surfarray`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 195); backlink

+Unknown interpreted text role "doc".
+

Manipulate image pixel data.

+
+
:doc:`ref/tests`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 198); backlink

+Unknown interpreted text role "doc".
+

Test pygame.

+
+
:doc:`ref/time`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 201); backlink

+Unknown interpreted text role "doc".
+

Manage timing and framerate.

+
+
:doc:`ref/transform`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 204); backlink

+Unknown interpreted text role "doc".
+

Resize and move images.

+
+
:doc:`pygame C API <c_api>`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 207); backlink

+Unknown interpreted text role "doc".
+

The C api shared amongst pygame extension modules.

+
+
:ref:`search`
+
+

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 210); backlink

+Unknown interpreted text role "ref".
+

Search pygame documents by keyword.

+
+
+
+
+ + diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index 1dfa0bee5f..1dd9ca9f3f 100644 --- a/docs/reST/themes/classic/elements.html +++ b/docs/reST/themes/classic/elements.html @@ -18,15 +18,15 @@
pygame-ce documentation
@@ -109,5 +166,5 @@
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 1725eb1738..c6675a001a 100644 --- a/docs/reST/themes/classic/static/pygame.css_t +++ b/docs/reST/themes/classic/static/pygame.css_t @@ -91,18 +91,22 @@ html:has(body.dark-theme) { } div.header { + style: block; padding: 0.5em; line-height: 1.2em; + position: fixed; } div.header > div { border: {{ theme_headerborder }}; border-collapse: collapse; background-color: {{ theme_headerbgcolor }}; + /* background-image: linear-gradient(to bottom right, {{ theme_headerbgcolor}}, {{ theme_bgcolor }}); */ } .dark-theme div.header > div { background-color: {{ theme_dark_headerbgcolor }}; border: {{ theme_dark_headerborder }}; + /* background-image: linear-gradient(to bottom right, {{ theme_dark_headerbgcolor}}, {{ theme_dark_bgcolor }}); */ } div.header .logo { background-color: {{ theme_logobgcolor }}; @@ -185,6 +189,7 @@ div.header .pagelinks a:hover { .pagelinks .top{ display: flex; + flex-direction: column; justify-content: space-between; align-items: center; } @@ -203,7 +208,7 @@ div.header .pagelinks a:hover { input[type="text"]{ background-color: {{ theme_searchbarbgcolor }}; color: {{ theme_searchbartextcolor }}; - font-size: 1rem; + font-size: 0.9rem; } .dark-theme input[type="text"]{ background-color: {{ theme_dark_searchbarbgcolor }}; @@ -259,7 +264,7 @@ div.document { position: relative; top: 2px; } -/* Ignore this, gets rid of minor positionaning difference*/ +/* Ignore this, gets rid of minor positioning difference*/ .theme-icon[data-theme="light-theme"] { transform: translate(0, 2px); } @@ -276,8 +281,21 @@ div.document { } .flex-container { - display: flex; - flex-direction: row; + display: block; + flex-direction: column; + align-content: stretch; + justify-content: space-evenly; + align-items: flex-start; + width: 17vw; + height: 99vh; + + transition-property: width; + transition-duration: 2s; + transition-timing-function: bezier; + transition-delay: 0.1s; +} +.flex-container:hover { + width: 20vw; } @media only screen and (max-width: 900px) { @@ -290,6 +308,10 @@ div.document { @media only screen and (max-width: 680px) { .flex-container { flex-direction: column; + width: 5vw; + } + .bottom { + hidden } div.header .logo { From 0793527a3acbabc2a846f365200f2b3cb5796a6c Mon Sep 17 00:00:00 2001 From: NOTMEE12 Date: Fri, 2 Jun 2023 21:10:09 +0200 Subject: [PATCH 02/19] added gradient --- docs/reST/themes/classic/elements.html | 42 +++++++++++--------- docs/reST/themes/classic/static/pygame.css_t | 23 +++++++---- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index 1dd9ca9f3f..73b4a035a8 100644 --- a/docs/reST/themes/classic/elements.html +++ b/docs/reST/themes/classic/elements.html @@ -34,8 +34,8 @@
pygame-ce documentation
+
-
{#- We render those sections based on functionality. @@ -53,7 +53,8 @@
pygame-ce documentation
{%- set hidden = ['Overlay', 'cdrom', 'sdl2_video', 'sdl2_controller'] %} {%- if pyg_sections %} -

Window
+

Window

+
{% set sep = joiner("
") %} {%- for section in pyg_sections %} {%- set docname = section['docname'] %} @@ -64,12 +65,13 @@
pygame-ce documentation
{%- set uri = uri + '#' + section['refid'] %} {%- endif %} {%- if name in window %} -{{- sep() }} {{ name }} +{{- sep() }} {{ name }} {%- endif %} {%- endfor %} -

+
-

Drawing / Surface
+

Drawing / Surface

+
{% set sep = joiner("
") %} {%- for section in pyg_sections %} {%- set docname = section['docname'] %} @@ -80,12 +82,13 @@
pygame-ce documentation
{%- set uri = uri + '#' + section['refid'] %} {%- endif %} {%- if name in drawing %} -{{- sep() }} {{ name }} +{{- sep() }} {{ name }} {%- endif %} {%- endfor %} -

+
-

Events/Input
+

Events/Input

+
{% set sep = joiner("
") %} {%- for section in pyg_sections %} {%- set docname = section['docname'] %} @@ -96,12 +99,13 @@
pygame-ce documentation
{%- set uri = uri + '#' + section['refid'] %} {%- endif %} {%- if name in events %} -{{- sep() }} {{ name }} +{{- sep() }} {{ name }} {%- endif %} {%- endfor %} -

+
-

Collisions
+

Collisions

+
{% set sep = joiner("
") %} {%- for section in pyg_sections %} {%- set docname = section['docname'] %} @@ -112,12 +116,13 @@
pygame-ce documentation
{%- set uri = uri + '#' + section['refid'] %} {%- endif %} {%- if name in collisions %} -{{- sep() }} {{ name }} +{{- sep() }} {{ name }} {%- endif %} {%- endfor %} -

+
-

Music
+

Music

+
{% set sep = joiner("
") %} {%- for section in pyg_sections %} {%- set docname = section['docname'] %} @@ -128,12 +133,13 @@
pygame-ce documentation
{%- set uri = uri + '#' + section['refid'] %} {%- endif %} {%- if name in music %} -{{- sep() }} {{ name }} +{{- sep() }} {{ name }} {%- endif %} {%- endfor %} -

+
-

Other
+

Other

+
{% set sep = joiner("
") %} {%- for section in pyg_sections %} {%- set docname = section['docname'] %} @@ -147,7 +153,7 @@
pygame-ce documentation
{{- sep() }} {{ name }} {%- endif %} {%- endfor %} -

+
{%- endif %} diff --git a/docs/reST/themes/classic/static/pygame.css_t b/docs/reST/themes/classic/static/pygame.css_t index c6675a001a..1e48c346d2 100644 --- a/docs/reST/themes/classic/static/pygame.css_t +++ b/docs/reST/themes/classic/static/pygame.css_t @@ -95,23 +95,25 @@ div.header { padding: 0.5em; line-height: 1.2em; position: fixed; + max-height: 98vh; } div.header > div { - border: {{ theme_headerborder }}; + /* border: {{ theme_headerborder }}; */ border-collapse: collapse; background-color: {{ theme_headerbgcolor }}; - /* background-image: linear-gradient(to bottom right, {{ theme_headerbgcolor}}, {{ theme_bgcolor }}); */ + background-image: linear-gradient(to bottom, {{ theme_headerbgcolor}}, {{ theme_bgcolor }}); } .dark-theme div.header > div { background-color: {{ theme_dark_headerbgcolor }}; border: {{ theme_dark_headerborder }}; - /* background-image: linear-gradient(to bottom right, {{ theme_dark_headerbgcolor}}, {{ theme_dark_bgcolor }}); */ + background-image: linear-gradient(to bottom, {{ theme_dark_headerbgcolor }}, {{ theme_dark_bgcolor }}); } div.header .logo { background-color: {{ theme_logobgcolor }}; + background-image: linear-gradient(to bottom, {{ theme_logobgcolor }}, {{ theme_headerbgcolor }}); padding: 0.3em; - border-right: 3px solid black; + /* border-right: 3px solid black; */ display: flex; align-items: center; justify-content: center; @@ -119,6 +121,7 @@ div.header .logo { } .dark-theme div.header .logo { background-color: {{ theme_dark_logobgcolor }}; + background-image: linear-gradient(to bottom, {{ theme_dark_logobgcolor}}, {{ theme_dark_headerbgcolor }}); border: none; } div.header .logo img { @@ -129,7 +132,7 @@ div.header .logo img { div.header .pagelinks { padding: 0.3em; - text-align: center; + text-align: left; vertical-align: middle; flex-grow: 1; } @@ -145,7 +148,7 @@ div.header p.bottom { } div.header .pagelinks a { - text-decoration: underline; + text-decoration: none; } .dark-theme div.header .pagelinks a { text-decoration: none; @@ -176,6 +179,7 @@ div.header .pagelinks a:hover { color: {{ theme_dark_linkcolor2 }}; font-size: 1.1rem; font-weight: 600; + margin-left: 1em; } .dl .dt{ @@ -195,6 +199,7 @@ div.header .pagelinks a:hover { } .pagelinks .top .nav-top-wrapper{ + text-align: center; flex-grow: 1; } @@ -287,7 +292,6 @@ div.document { justify-content: space-evenly; align-items: flex-start; width: 17vw; - height: 99vh; transition-property: width; transition-duration: 2s; @@ -303,12 +307,15 @@ div.document { flex-direction: column; gap: 1rem; } + .flex-container { + width: 30px; + } } @media only screen and (max-width: 680px) { .flex-container { flex-direction: column; - width: 5vw; + width: 30px; } .bottom { hidden From 06e3b6489f2f39b3114b4523f4c35b25c2bed05b Mon Sep 17 00:00:00 2001 From: NOTMEE12 Date: Sat, 3 Jun 2023 11:23:28 +0200 Subject: [PATCH 03/19] docs are functioning --- docs/reST/_static/sections.js | 3 + docs/reST/_static/{script.js => theme.js} | 0 docs/reST/ext/boilerplate.py | 3 +- docs/reST/index.html | 727 ------------------- docs/reST/themes/classic/elements.html | 7 +- docs/reST/themes/classic/static/pygame.css_t | 2 +- 6 files changed, 12 insertions(+), 730 deletions(-) create mode 100644 docs/reST/_static/sections.js rename docs/reST/_static/{script.js => theme.js} (100%) delete mode 100644 docs/reST/index.html diff --git a/docs/reST/_static/sections.js b/docs/reST/_static/sections.js new file mode 100644 index 0000000000..3b1a9ed29c --- /dev/null +++ b/docs/reST/_static/sections.js @@ -0,0 +1,3 @@ +const page = document + +page. \ No newline at end of file diff --git a/docs/reST/_static/script.js b/docs/reST/_static/theme.js similarity index 100% rename from docs/reST/_static/script.js rename to docs/reST/_static/theme.js diff --git a/docs/reST/ext/boilerplate.py b/docs/reST/ext/boilerplate.py index ad5089d5ed..c7acc95370 100644 --- a/docs/reST/ext/boilerplate.py +++ b/docs/reST/ext/boilerplate.py @@ -46,7 +46,8 @@ def setup(app): app.setup_extension("ext.indexer") # Add js files for theme changing in docs. - app.add_js_file("script.js") + app.add_js_file("theme.js") + app.add_js_file("sections.js") # Documents to leave untransformed by boilerplate app.add_config_value("boilerplate_skip_transform", [], "") diff --git a/docs/reST/index.html b/docs/reST/index.html deleted file mode 100644 index 5bffe9841b..0000000000 --- a/docs/reST/index.html +++ /dev/null @@ -1,727 +0,0 @@ - - - - - - -Pygame-ce Front Page - - - -
-

Pygame-ce Front Page

- -
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 4)

-

Unknown directive type "toctree".

-
-.. toctree::
-   :maxdepth: 2
-   :glob:
-   :hidden:
-
-   ref/*
-   tutorials/en/*
-   tutorials/en/**/*
-   tutorials/ko/**/*
-   tutorials/es/*
-   c_api
-   filepaths
-   logos
-
-
-
-
-

Quick start

-

Welcome to pygame-ce! Once you've got pygame-ce installed -(pip install pygame-ce or pip3 install pygame-ce for most -people), the next question is how to get a game loop running. Pygame-ce, -unlike some other libraries, gives you full control of program -execution. That freedom means it is easy to mess up in your initial steps.

-

Here is a good example of a basic setup (opens the window, updates the screen, and handles events)--

-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 29)

-

Unknown directive type "literalinclude".

-
-.. literalinclude:: ref/code_examples/base_script.py
-
-
-
-

Here is a slightly more fleshed out example, which shows you how to move something -(a circle in this case) around on screen--

-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 34)

-

Unknown directive type "literalinclude".

-
-.. literalinclude:: ref/code_examples/base_script_example.py
-
-
-
-

For more in depth reference, check out the :ref:`tutorials-reference-label` -section below, check out a video tutorial (I'm a fan of this one), or reference the API -documentation by module.

-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 36); backlink

-Unknown interpreted text role "ref".
-
-
-

Documents

-
-
Readme
-
Basic information about pygame: what it is, who is involved, and where to find it.
-
:doc:`filepaths`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 48); backlink

-Unknown interpreted text role "doc".
-

How pygame handles file system paths.

-
-
:doc:`Pygame Logos <logos>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 52); backlink

-Unknown interpreted text role "doc".
-

The logos of Pygame in different resolutions.

-
-
LGPL License
-
This is the license pygame is distributed under. -It provides for pygame to be distributed with open source and commercial software. -Generally, if pygame is not changed, it can be used with any type of program.
-
-
-
-

Tutorials

-
-
:doc:`Introduction to Pygame <tutorials/en/intro-to-pygame>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 66); backlink

-Unknown interpreted text role "doc".
-

An introduction to the basics of pygame. -This is written for users of Python and appeared in volume two of the Py magazine.

-
-
:doc:`Import and Initialize <tutorials/en/import-init>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 71); backlink

-Unknown interpreted text role "doc".
-

The beginning steps on importing and initializing pygame. -The pygame package is made of several modules. -Some modules are not included on all platforms.

-
-
:doc:`How do I move an Image? <tutorials/en/move-it>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 75); backlink

-Unknown interpreted text role "doc".
-

A basic tutorial that covers the concepts behind 2D computer animation. -Information about drawing and clearing objects to make them appear animated.

-
-
:doc:`Chimp Tutorial, Line by Line <tutorials/en/chimp-explanation>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 80); backlink

-Unknown interpreted text role "doc".
-

The pygame examples include a simple program with an interactive fist and a chimpanzee. -This was inspired by the annoying flash banner of the early 2000s. -This tutorial examines every line of code used in the example.

-
-
:doc:`Sprite Module Introduction <tutorials/en/intro-to-sprites>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 86); backlink

-Unknown interpreted text role "doc".
-

Pygame includes a higher level sprite module to help organize games. -The sprite module includes several classes that help manage details found in almost all games types. -The Sprite classes are a bit more advanced than the regular pygame modules, -and need more understanding to be properly used.

-
-
:doc:`Surfarray Introduction <tutorials/en/intro-to-surfarray>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 91); backlink

-Unknown interpreted text role "doc".
-

Pygame used the NumPy python module to allow efficient per pixel effects on images. -Using the surface arrays is an advanced feature that allows custom effects and filters. -This also examines some of the simple effects from the pygame example, arraydemo.py.

-
-
:doc:`Camera Module Introduction <tutorials/en/intro-to-camera>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 96); backlink

-Unknown interpreted text role "doc".
-

Pygame, as of 1.9, has a camera module that allows you to capture images, -watch live streams, and do some basic computer vision. -This tutorial covers those use cases.

-
-
:doc:`Newbie Guide <tutorials/en/newbie-guide>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 99); backlink

-Unknown interpreted text role "doc".
-

A list of thirteen helpful tips for people to get comfortable using pygame.

-
-
:doc:`Making Games Tutorial <tutorials/en/make-games>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 102); backlink

-Unknown interpreted text role "doc".
-

A large tutorial that covers the bigger topics needed to create an entire game.

-
-
:doc:`Display Modes <tutorials/en/display-modes>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 105); backlink

-Unknown interpreted text role "doc".
-

Getting a display surface for the screen.

-
-
:doc:`한국어 튜토리얼 (Korean Tutorial) <tutorials/ko/빨간블록 검은블록/개요>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 108); backlink

-Unknown interpreted text role "doc".
-

빨간블록 검은블록

-
-
:doc:`Tutorial de Pygame - Ejemplo del Chimpancé, Línea Por Línea <tutorials/es/ChimpanceLineaporLinea>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 114); backlink

-Unknown interpreted text role "doc".
-

Los ejemplos de pygame incluyen un sencillo programa con un puño interactivo y un chimpancé. -Está inspirado en el molesto banner de flash de principios de la década de 2000. -Este tutorial examina cada línea de código utilizada en el ejemplo.

-
-
-
-
-

Reference

-
-
:ref:`genindex`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 120); backlink

-Unknown interpreted text role "ref".
-

A list of all functions, classes, and methods in the pygame package.

-
-
:doc:`ref/bufferproxy`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 123); backlink

-Unknown interpreted text role "doc".
-

An array protocol view of surface pixels

-
-
:doc:`ref/color`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 126); backlink

-Unknown interpreted text role "doc".
-

Color representation.

-
-
:doc:`ref/cursors`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 129); backlink

-Unknown interpreted text role "doc".
-

Loading and compiling cursor images.

-
-
:doc:`ref/display`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 132); backlink

-Unknown interpreted text role "doc".
-

Configure the display surface.

-
-
:doc:`ref/draw`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 135); backlink

-Unknown interpreted text role "doc".
-

Drawing simple shapes like lines and ellipses to surfaces.

-
-
:doc:`ref/event`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 138); backlink

-Unknown interpreted text role "doc".
-

Manage the incoming events from various input devices and the windowing platform.

-
-
:doc:`ref/examples`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 141); backlink

-Unknown interpreted text role "doc".
-

Various programs demonstrating the use of individual pygame modules.

-
-
:doc:`ref/font`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 144); backlink

-Unknown interpreted text role "doc".
-

Loading and rendering TrueType fonts.

-
-
:doc:`ref/freetype`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 147); backlink

-Unknown interpreted text role "doc".
-

Enhanced pygame module for loading and rendering font faces.

-
-
:doc:`ref/gfxdraw`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 150); backlink

-Unknown interpreted text role "doc".
-

Anti-aliasing draw functions.

-
-
:doc:`ref/image`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 153); backlink

-Unknown interpreted text role "doc".
-

Loading, saving, and transferring of surfaces.

-
-
:doc:`ref/joystick`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 156); backlink

-Unknown interpreted text role "doc".
-

Manage the joystick devices.

-
-
:doc:`ref/key`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 159); backlink

-Unknown interpreted text role "doc".
-

Manage the keyboard device.

-
-
:doc:`ref/locals`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 162); backlink

-Unknown interpreted text role "doc".
-

Pygame constants.

-
-
:doc:`ref/mixer`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 165); backlink

-Unknown interpreted text role "doc".
-

Load and play sounds

-
-
:doc:`ref/mouse`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 168); backlink

-Unknown interpreted text role "doc".
-

Manage the mouse device and display.

-
-
:doc:`ref/music`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 171); backlink

-Unknown interpreted text role "doc".
-

Play streaming music tracks.

-
-
:doc:`ref/pygame`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 174); backlink

-Unknown interpreted text role "doc".
-

Top level functions to manage pygame.

-
-
:doc:`ref/pixelarray`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 177); backlink

-Unknown interpreted text role "doc".
-

Manipulate image pixel data.

-
-
:doc:`ref/rect`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 180); backlink

-Unknown interpreted text role "doc".
-

Flexible container for a rectangle.

-
-
:doc:`ref/scrap`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 183); backlink

-Unknown interpreted text role "doc".
-

Native clipboard access.

-
-
:doc:`ref/sndarray`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 186); backlink

-Unknown interpreted text role "doc".
-

Manipulate sound sample data.

-
-
:doc:`ref/sprite`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 189); backlink

-Unknown interpreted text role "doc".
-

Higher level objects to represent game images.

-
-
:doc:`ref/surface`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 192); backlink

-Unknown interpreted text role "doc".
-

Objects for images and the screen.

-
-
:doc:`ref/surfarray`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 195); backlink

-Unknown interpreted text role "doc".
-

Manipulate image pixel data.

-
-
:doc:`ref/tests`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 198); backlink

-Unknown interpreted text role "doc".
-

Test pygame.

-
-
:doc:`ref/time`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 201); backlink

-Unknown interpreted text role "doc".
-

Manage timing and framerate.

-
-
:doc:`ref/transform`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 204); backlink

-Unknown interpreted text role "doc".
-

Resize and move images.

-
-
:doc:`pygame C API <c_api>`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 207); backlink

-Unknown interpreted text role "doc".
-

The C api shared amongst pygame extension modules.

-
-
:ref:`search`
-
-

System Message: ERROR/3 (C:/Users/NotMEE12/OneDrive/Dokumenty/GitHub/pygame-ce/docs/reST/index.rst, line 210); backlink

-Unknown interpreted text role "ref".
-

Search pygame documents by keyword.

-
-
-
-
- - diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index 73b4a035a8..5bcc32e975 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. @@ -70,6 +70,7 @@
pygame-ce documentation
{%- endfor %}
+

Drawing / Surface

{% set sep = joiner("
") %} @@ -87,6 +88,7 @@
pygame-ce documentation
{%- endfor %}
+

Events/Input

{% set sep = joiner("
") %} @@ -104,6 +106,7 @@
pygame-ce documentation
{%- endfor %}
+

Collisions

{% set sep = joiner("
") %} @@ -121,6 +124,7 @@
pygame-ce documentation
{%- endfor %}
+

Music

{% set sep = joiner("
") %} @@ -138,6 +142,7 @@
pygame-ce documentation
{%- endfor %}
+

Other

{% set sep = joiner("
") %} diff --git a/docs/reST/themes/classic/static/pygame.css_t b/docs/reST/themes/classic/static/pygame.css_t index 1e48c346d2..96146880a4 100644 --- a/docs/reST/themes/classic/static/pygame.css_t +++ b/docs/reST/themes/classic/static/pygame.css_t @@ -174,7 +174,7 @@ div.header .pagelinks a:hover { .pagelinks .bottom a { font-weight: 400; color: {{ theme_linkcolor2 }}; -} + margin-left: 1em;} .dark-theme .pagelinks .bottom a { color: {{ theme_dark_linkcolor2 }}; font-size: 1.1rem; From d5d7822142d54fc5c5a7d86d19d4b5826ccbfd13 Mon Sep 17 00:00:00 2001 From: NOTMEE12 Date: Sat, 3 Jun 2023 13:04:23 +0200 Subject: [PATCH 04/19] fixed issue https://github.com/pygame-community/pygame-ce/issues/2224 --- docs/reST/themes/classic/elements.html | 2 +- docs/reST/themes/classic/theme.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index 5bcc32e975..261250ce1b 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. diff --git a/docs/reST/themes/classic/theme.conf b/docs/reST/themes/classic/theme.conf index 53f09930f3..b3ce5b3c4a 100644 --- a/docs/reST/themes/classic/theme.conf +++ b/docs/reST/themes/classic/theme.conf @@ -67,7 +67,7 @@ linkcolor2 = #000000 codebgcolor = #eeffcc codetextcolor = #333333 cli = #000000 -codedot = #D4D4D4 +codedot = #242424 codecomment = #169d00 codeword = #85E5FF codekeyword = #DE6C90 From fe2cab5bdef564cac48bb1453d5ec94bf32c24a3 Mon Sep 17 00:00:00 2001 From: NOTMEE12 Date: Sat, 3 Jun 2023 19:41:10 +0200 Subject: [PATCH 05/19] opening/closing sections is saved. --- docs/reST/_static/sections.js | 25 +++++++++++++++++--- docs/reST/themes/classic/elements.html | 21 ++++++++++------ docs/reST/themes/classic/static/pygame.css_t | 3 ++- 3 files changed, 38 insertions(+), 11 deletions(-) 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; From 8c4e685d5e48f6c4108a2f0eec823d24d60d9599 Mon Sep 17 00:00:00 2001 From: NOTMEE12 Date: Sat, 3 Jun 2023 22:57:15 +0200 Subject: [PATCH 06/19] custom scrollbars --- docs/reST/_static/theme.js | 4 +++- docs/reST/themes/classic/elements.html | 2 +- docs/reST/themes/classic/static/pygame.css_t | 23 +++++++++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/docs/reST/_static/theme.js b/docs/reST/_static/theme.js index 0986d830e1..9de40486e2 100644 --- a/docs/reST/_static/theme.js +++ b/docs/reST/_static/theme.js @@ -10,6 +10,7 @@ if (localStorage.getItem('theme') === null) { // Execute once the DOM is loaded document.addEventListener('DOMContentLoaded', () => { + document.body.className = localStorage.getItem('theme'); const search_buttons = document.querySelectorAll('.searchbar-button'); const search_submit = document.querySelector('.searchbar-submit'); @@ -27,6 +28,7 @@ document.addEventListener('DOMContentLoaded', () => { htmlElement.classList.add('light-theme', 'dark-theme'); htmlElement.classList.remove(theme); localStorage.setItem('theme', htmlElement.classList[0]); - }); + document.body.className = localStorage.getItem('theme'); + }); }); }); diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index d501889dac..493b4658e2 100644 --- a/docs/reST/themes/classic/elements.html +++ b/docs/reST/themes/classic/elements.html @@ -4,7 +4,7 @@ {%- block relbar1 %}{# Do not want bar across the top #}{% endblock %} {%- endif %} -{#- Classic header with Snakey on the left, page links on the right. +{#- Classic header with Snakey on the left, page links sidebar. #} {%- macro header() %}
diff --git a/docs/reST/themes/classic/static/pygame.css_t b/docs/reST/themes/classic/static/pygame.css_t index c1ab084ecd..57a38a7001 100644 --- a/docs/reST/themes/classic/static/pygame.css_t +++ b/docs/reST/themes/classic/static/pygame.css_t @@ -85,6 +85,7 @@ html { } html.dark-theme body { color: {{ theme_dark_textcolor }}; + background-color: {{ theme_dark_bgcolor }}; } html:has(body.dark-theme) { background-color: {{ theme_dark_bgcolor }}; @@ -285,7 +286,27 @@ div.document { .dark-theme *[data-theme="light-theme"]{ display: none; } - +::-webkit-scrollbar { + border-radius: 5px; + width: 10px; +} +::-webkit-scrollbar-track { + background: rgba(0, 0, 0, 0); +} +::-webkit-scrollbar-thumb { + background: #6aee28; +} +::-webkit-scrollbar-thumb:hover { + background: #4ace08; +} +.dark-theme { + ::-webkit-scrollbar-thumb { + background: #888 + } + ::-webkit-scrollbar-thumb:hover { + background: #555; + } +} .flex-container { display: block; flex-direction: column; From 177598fc101c963c92c3ac00eaed5c29ffa6eaa6 Mon Sep 17 00:00:00 2001 From: NOTMEE12 Date: Mon, 5 Jun 2023 14:57:46 +0200 Subject: [PATCH 07/19] added arrows --- docs/reST/_static/sections.js | 12 +++++++----- docs/reST/themes/classic/elements.html | 20 ++++++++++++-------- docs/reST/themes/classic/static/pygame.css_t | 13 ++++++------- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/docs/reST/_static/sections.js b/docs/reST/_static/sections.js index 7ff7f107ef..7adedc34dc 100644 --- a/docs/reST/_static/sections.js +++ b/docs/reST/_static/sections.js @@ -1,16 +1,17 @@ -function toggleSectionVisibility(section){ +function toggleSectionVisibility(section, message){ document.getElementById(section).hidden = ! document.getElementById(section).hidden; - if (document.getElementById(section).hidden === true){ + if (document.getElementById(section).hidden === true){ // show items = localStorage.getItem('hidden'); if (items !== null){ if (!(items.includes(section))){ - items = items + '|' + section + '|'; + items = items + section + '|'; } localStorage.setItem('hidden', items); } else { - localStorage.setItem('hidden', section); + localStorage.setItem('hidden', section + '|'); } - } else { + document.getElementById(section[0]).innerHTML = document.getElementById(section[0]).innerHTML.replace('▼', '▲') + } else { // hide items = localStorage.getItem('hidden'); if (items !== null){ if (items.includes(section)){ @@ -18,5 +19,6 @@ function toggleSectionVisibility(section){ } localStorage.setItem('hidden', items); } + document.getElementById(section[0]).innerHTML = document.getElementById(section[0]).innerHTML.replace('▲', '▼') } } \ No newline at end of file diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index 493b4658e2..9ca3804433 100644 --- a/docs/reST/themes/classic/elements.html +++ b/docs/reST/themes/classic/elements.html @@ -28,7 +28,7 @@
pygame-ce documentation
Dark Theme Icon
- + Search
@@ -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 %} @@ -181,7 +181,11 @@
pygame-ce documentation
diff --git a/docs/reST/themes/classic/static/pygame.css_t b/docs/reST/themes/classic/static/pygame.css_t index 57a38a7001..e2737115f5 100644 --- a/docs/reST/themes/classic/static/pygame.css_t +++ b/docs/reST/themes/classic/static/pygame.css_t @@ -299,14 +299,13 @@ div.document { ::-webkit-scrollbar-thumb:hover { background: #4ace08; } -.dark-theme { - ::-webkit-scrollbar-thumb { - background: #888 - } - ::-webkit-scrollbar-thumb:hover { - background: #555; - } +.dark-theme ::-webkit-scrollbar-thumb { + background: #888 } +.dark-theme ::-webkit-scrollbar-thumb:hover { + background: #555; +} + .flex-container { display: block; flex-direction: column; From b18202c9ca769b9eb66df8b2ad9173e229f2f3a3 Mon Sep 17 00:00:00 2001 From: NOTMEE12 Date: Sat, 10 Jun 2023 12:16:14 +0200 Subject: [PATCH 08/19] added many things support for small devices polish --- docs/reST/_static/sections.js | 20 +- docs/reST/_static/theme.js | 14 +- docs/reST/_static/three_lines.svg | 95 +++++++++ docs/reST/themes/classic/elements.html | 35 ++-- docs/reST/themes/classic/static/pygame.css_t | 194 ++++++++++++++++--- docs/reST/themes/classic/theme.conf | 10 + 6 files changed, 311 insertions(+), 57 deletions(-) create mode 100644 docs/reST/_static/three_lines.svg diff --git a/docs/reST/_static/sections.js b/docs/reST/_static/sections.js index 7adedc34dc..d145e469e7 100644 --- a/docs/reST/_static/sections.js +++ b/docs/reST/_static/sections.js @@ -10,15 +10,29 @@ function toggleSectionVisibility(section, message){ } else { localStorage.setItem('hidden', section + '|'); } - document.getElementById(section[0]).innerHTML = document.getElementById(section[0]).innerHTML.replace('▼', '▲') + document.getElementById(section[0]).innerHTML = document.getElementById(section[0]).innerHTML.replace('▼', '▲'); } else { // hide items = localStorage.getItem('hidden'); if (items !== null){ if (items.includes(section)){ - items = items.replace(section + '|', '') + items = items.replace(section + '|', ''); } localStorage.setItem('hidden', items); } - document.getElementById(section[0]).innerHTML = document.getElementById(section[0]).innerHTML.replace('▲', '▼') + document.getElementById(section[0]).innerHTML = document.getElementById(section[0]).innerHTML.replace('▲', '▼'); } +} + +function toggleChecked(classname){ + if (window.innerWidth <= 1100) { + el = document.getElementsByClassName(classname)[0]; + console.log(el.id); + if (el.id !== 'clicked') { + el.id = 'clicked'; + htmlElement.classList.add('clicked'); + } else { + el.id = null; + htmlElement.classList.remove('clicked'); + } + } } \ No newline at end of file diff --git a/docs/reST/_static/theme.js b/docs/reST/_static/theme.js index 9de40486e2..95a172d010 100644 --- a/docs/reST/_static/theme.js +++ b/docs/reST/_static/theme.js @@ -10,7 +10,7 @@ if (localStorage.getItem('theme') === null) { // Execute once the DOM is loaded document.addEventListener('DOMContentLoaded', () => { - document.body.className = localStorage.getItem('theme'); + document.body.className = localStorage.getItem('theme'); const search_buttons = document.querySelectorAll('.searchbar-button'); const search_submit = document.querySelector('.searchbar-submit'); @@ -25,10 +25,14 @@ document.addEventListener('DOMContentLoaded', () => { theme_icons.forEach((icon) => { icon.addEventListener('click', () => { const theme = icon.getAttribute('data-theme'); - htmlElement.classList.add('light-theme', 'dark-theme'); - htmlElement.classList.remove(theme); - localStorage.setItem('theme', htmlElement.classList[0]); - document.body.className = localStorage.getItem('theme'); + if (theme === 'light-theme'){ + new_theme = 'dark-theme'; + } else { + new_theme = 'light-theme'; + } + htmlElement.classList.replace(theme, new_theme); + localStorage.setItem('theme', new_theme); + document.body.className = localStorage.getItem('theme'); }); }); }); diff --git a/docs/reST/_static/three_lines.svg b/docs/reST/_static/three_lines.svg new file mode 100644 index 0000000000..ba54ee0772 --- /dev/null +++ b/docs/reST/_static/three_lines.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index 9ca3804433..e69a9e8f07 100644 --- a/docs/reST/themes/classic/elements.html +++ b/docs/reST/themes/classic/elements.html @@ -4,12 +4,13 @@ {%- block relbar1 %}{# Do not want bar across the top #}{% endblock %} {%- endif %} -{#- Classic header with Snakey on the left, page links sidebar. +{#- Classic header with Snakey on the left, page links on the sidebar. #} {%- macro header() %}