Skip to content

Commit

Permalink
docs: Write current usage
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Nov 11, 2023
1 parent ea64210 commit 020e2a3
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 8 deletions.
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@

# -- General configuration
extensions = [
"atsphinx.color_text",
"sphinx.ext.todo",
]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

rst_prolog = """
.. |THIS| replace:: ``atsphinx-color-text``
"""

# -- Options for HTML output
html_theme = "alabaster"
html_static_path = ["_static"]
82 changes: 74 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,85 @@ atsphinx-color-text
Overview
========

.. todo:: Write it
This is Sphinx extension to render colored-text by HTML builder.

Installation
============
Getting started
===============

.. todo:: Write it
Thi is published on PyPI.
You can install by ``pip`` command.

.. code:: console
pip install atsphinx-color-text
Insert extension into your ``conf.py`` to enable it.

.. code:: python
extensions = [
"atsphinx.color_text",
]
Usage
=====

.. todo:: Write it
You can use this very easy.
Write ``color:~`` role into your reStructuredText source.

Example
-------

.. code:: rst
sphinx-revealjs is presentation library for
Pythonista using reStructuredText and :color:red:`Sphinx`.
Builder generates html from this source.

sphinx-revealjs is presentation library for Pythonista using reStructuredText and :color:red:`Sphinx`.

Supporting colors
=================

|THIS| refers Standard colors from `MDN`_ to implement named color roles.

.. list-table::
:header-rows: 1

Configuration
=============
* - role
- color code
* - ``:color:black:``
- :color:black:`#000000`
* - ``:color:silver:``
- :color:silver:`#c0c0c0`
* - ``:color:gray:``
- :color:gray:`#808080`
* - ``:color:white:``
- :color:white:`#ffffff`
* - ``:color:maroon:``
- :color:maroon:`#800000`
* - ``:color:red:``
- :color:red:`#ff0000`
* - ``:color:purple:``
- :color:purple:`#800080`
* - ``:color:fuchsia:``
- :color:fuchsia:`#ff00ff`
* - ``:color:green:``
- :color:green:`#008000`
* - ``:color:lime:``
- :color:lime:`#00ff00`
* - ``:color:olive:``
- :color:olive:`#808000`
* - ``:color:yellow:``
- :color:yellow:`#ffff00`
* - ``:color:navy:``
- :color:navy:`#000080`
* - ``:color:blue:``
- :color:blue:`#0000ff`
* - ``:color:teal:``
- :color:teal:`#008080`
* - ``:color:aqua:``
- :color:aqua:`#00ffff`

.. todo:: Write it
.. _MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/named-color

0 comments on commit 020e2a3

Please sign in to comment.