Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit f5087af

Browse files
committed
Docs: Rewrite for CodeChat.
1 parent 9efdcfa commit f5087af

8 files changed

Lines changed: 43 additions & 42 deletions

File tree

conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,14 @@
176176
"*.css": "CSS",
177177
"*.js": "JavaScript",
178178
"*.html": "HTML",
179-
# Perl use # for comments, so pretend these files are Perl.
179+
# Perl uses ``#`` for comments, so pretend these files are Perl.
180180
"*.in": "Perl",
181181
".gitignore": "Perl",
182182
"*.cfg": "INI",
183-
# This is actually a Python file.
183+
# These are actually a Python files.
184184
"codechat_config.json": "Python",
185+
"conf.tmpl": "Python",
186+
"pavement.tmpl": "Python",
185187
}
186188
#
187189
# **CodeChat note::** This is a list of exclude_patterns_ which applies only to
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# *********
2-
# |docname|
3-
# *********
1+
# ************************************
2+
# |docname| - the accessibility module
3+
# ************************************
44
from .accessibility import *

runestone/accessibility/accessibility.py

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,36 @@
11
"""
2-
*********
3-
|docname|
4-
*********
5-
6-
This extension adds an accessibiligy stylesheet.
7-
8-
By the 'accessibility_style' config value (in conf.py of
2+
**********************************************
3+
|docname| - select an accessibility stylesheet
4+
**********************************************
5+
By setting the `accessibility_style` config value (in `conf.py <../common/project_template/conf.tmpl>` of
96
an interactive book project) you can select what accessibility stylesheet
10-
you want to add ('normal', 'light', 'darkest' or 'none')
7+
you want to add (``normal``, ``light``, ``darkest``, or ``none``).
118
12-
An accessibility stylesheet overs:
9+
An accessibility stylesheet covers:
1310
14-
-Change of nav bar to color code based on Users using either mouse or
15-
keyboard to navigate the menu
16-
-Adjusting bootstrap buttons to invert color on active and on focus for
17-
accessibility for users
18-
-Changing default bootstrap buttons to follow WCAG 2.0 guidlines
11+
- Change of nav bar to color code based on Users using either mouse or keyboard to navigate the menu
12+
- Adjusting bootstrap buttons to invert color on active and on focus for accessibility for users
13+
- Changing default bootstrap buttons to follow WCAG 2.0 guidelines
1914
20-
acessibility.css reflects WCAG 2.0 AA compliance
21-
acessibilitydarkest.css reflects WCAG 2.0 AAA compliance
22-
accessibilitylight.css doesn't change bootstrap colors but adds
23-
inversion
15+
| ``acessibility.css`` reflects WCAG 2.0 AA compliance
16+
| ``acessibilitydarkest.css`` reflects WCAG 2.0 AAA compliance
17+
| ``accessibilitylight.css`` doesn't change bootstrap colors but adds inversion
2418
25-
Personally we prefered WCAG 2.0 AA compliance, so accessibility.css
19+
Personally we prefered WCAG 2.0 AA compliance, so ``accessibility.css``
2620
reflects ideal changes
2721
28-
http://imgur.com/a/TSDNf
29-
This shows the different CSS files from most compliance (left) to least
30-
compliance (right)
22+
.. figure:: https://i.imgur.com/jFzkI6g.jpg
23+
24+
This shows the different CSS files from most compliance (left) to least compliance (right).
3125
"""
3226

3327

3428
def setup(app):
3529
app.add_config_value("accessibility_style", "normal", "html")
3630

37-
# Since the `init_values()` method of the `app.config` object (Config class)
31+
# Since the ``init_values()`` method of the ``app.config`` object (Config class)
3832
# is not invoked yet (will be invoked after the setup of all extensions),
39-
# we need to access the raw config dictionary here
33+
# we need to access the raw config dictionary here.
4034
acc_style = app.config._raw_config.get("accessibility_style", "normal")
4135

4236
if acc_style == "normal":

runestone/accessibility/css/accessibility.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
*********
3-
|docname|
4-
*********
2+
**********************************************
3+
|docname| - a WCAG 2.0 AA compliant stylesheet
4+
**********************************************
55
*/
66

77
/* Variables holding theme colors */

runestone/accessibility/css/accessibilitydarkest.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
*********
3-
|docname|
4-
*********
2+
***********************************************************
3+
|docname| - a WCAG 2.0 AAA compliant stylesheet (dark mode)
4+
***********************************************************
55
*/
66

77
/*Navigation Tabbing Styling*/

runestone/accessibility/css/accessibilitylight.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
*********
3-
|docname|
4-
*********
2+
********************************************************************************
3+
|docname| - a stylesheet that doesn't change bootstrap colors but adds inversion
4+
********************************************************************************
55
*/
66

77
/*Navigation Tabbing Styling*/

runestone/common/project_template/conf.tmpl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# -*- coding: utf-8 -*-
1+
# *************************************************************
2+
# |docname| - Sphinx configuration file for a Runestone project
3+
# *************************************************************
24
#
35
# Problem Solving with Algorithms and Data Structures documentation build configuration file, created by
46
# sphinx-quickstart on Thu Oct 27 08:17:45 2011.
@@ -276,9 +278,13 @@ html_show_sourcelink = False
276278
# Output file base name for HTML help builder.
277279
htmlhelp_basename = 'PythonCoursewareProjectdoc'
278280

279-
# 'accessibility_style' config value is defined in the 'accessibility' extension.
281+
# .. _accessibility_style:
282+
#
283+
# accessibility_style
284+
# -------------------
285+
# This config value is defined in the `../../accessibility/accessibility.py` extension.
280286
# By this config value you can select what accessibility stylesheet
281-
# you want to add ('normal', 'light', 'darkest' or 'none')
287+
# you want to add (``normal``, ``light``, ``darkest`` or ``none``).
282288
#accessibility_style = 'normal'
283289

284290
# Config values for specific Runestone components

runestone/overview.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Base Class Provides
2727

2828
All Components
2929
--------------
30-
3130
* constructor that takes an object of options
3231
* restoreAnswers
3332
* setLocalStorage

0 commit comments

Comments
 (0)