Metadata-Version: 2.3
Name: slides-xp
Version: 0.1.0
Summary: A home-made, ultra-janky, Windows XP-themed markdown slideshow viewer.
Keywords: slides,slideshow,nostalgia,windows-xp,markdown
Author: Maddy Guthridge
Author-email: Maddy Guthridge <hello@maddyguthridge.com>
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Education
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Text Processing :: Markup :: Markdown
Classifier: Typing :: Typed
Requires-Dist: flask>=3.1.3,<4.0.0
Requires-Dist: pyhtml-enhanced>=2.2.0,<3.0.0
Requires-Dist: click>=8.1.8,<9.0.0
Requires-Dist: mistune>=3.2.1,<4.0.0
Requires-Dist: pygments>=2.19.1,<3.0.0
Requires-Dist: granian>=2.7.4
Requires-Dist: asgiref>=3.11.1
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# Slides XP

A home-made, ultra-janky, Windows XP-themed markdown slideshow viewer.

I plan to rewrite this eventually, but it works well enough for now :)

## Screenshots

Title slide. Most of the text is customizable:

![A slide that looks like the Windows XP boot screen. The title is Maddy COMP1531 Tutorial XP](./assets/boot.jpg)

Regular slides, generated from a directory of Markdown files:

![A slide themed after the Windows XP desktop.](./assets/slide.jpg)

Ending slide, which is also customizable:

![A slide that looks like a Windows XP blue screen of death](./assets/bsod.jpg)

## Installing

```sh
pipx install slides-xp
```

## Running

```sh
sxp <directories to serve>
```

Or, without installation, using `uv`:

```sh
uvx slides-xp <directories to serve>
```

## How it works

* `granian` as a WSGI server
* `flask` to manage the web app
* `pyhtml` to construct the HTML
* `htmx` for minimal interactivity improvements

## Theming

You can use the `--theme` option to specify the a built-in theme, or a path to
a directory containing CSS theme files.

The built-in themes are:

* `default`
* `xp`

### Python-generated slides

Python files that end with `.slide.py` can be used to generate slides using
Python, which is useful for custom themed slides. The file should include a
`render` function that returns a `pyhtml` tag.

### Custom CSS

A theme directory should contain (at least) these files:

* `main.css`: main stylesheet. Always loaded.
* `slide.css`: stylesheet for slide pages.
* `picker.css`: stylesheet for slide picker page.

These stylesheets are mounted at the `/theme` endpoint.

Within these stylesheets, the following classes can be selected.

* `.highlight`: code blocks
* `.slide-content`: slide content
* `.picker-box`: slide picker
* `.picker-item`: slide within slide picker

And the following variables are available:

* `--hl-comment`: code block highlighting, comment
* `--hl-doc`: code block highlighting, documentation
* `--hl-keyword`: code block highlighting, keyword
* `--hl-var`: code block highlighting, variable
* `--hl-func`: code block highlighting, function
* `--hl-type`: code block highlighting, type
* `--hl-string`: code block highlighting, string
