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

Commit 687df6e

Browse files
authored
Merge pull request #1107 from bjones1/docs
Docs
2 parents 8208cd8 + b369c04 commit 687df6e

9 files changed

Lines changed: 61 additions & 60 deletions

File tree

conf.py

Lines changed: 9 additions & 6 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
@@ -347,9 +349,10 @@
347349
# This config value contains the locations and names of other projects that should be linked to in this documentation.
348350
intersphinx_mapping = {
349351
"RunestoneServer": (
350-
"https://runestoneserver.readthedocs.io/en/latest/",
351-
None,
352-
# An optional local file location -- useful when updating both Sphinx builds before the updates are pushed to the server.
353-
##"F:/Runestone/web2py/applications/runestone/_build/objects.inv",
352+
"https://runestoneserver.readthedocs.io/en/latest/", (
353+
None,
354+
# An optional local file location -- useful when updating both Sphinx builds before the updates are pushed to the server.
355+
##"C:/Users/bjones/Documents/git/web2py/applications/runestone/_build/objects.inv",
356+
)
354357
)
355358
}
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/js/runestonebase.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
/**
2-
* Runestone Base Class
3-
* All runestone components should inherit from RunestoneBase
1+
/* ********************************
2+
* |docname| - Runestone Base Class
3+
* ********************************
4+
* All runestone components should inherit from RunestoneBase. In addition all runestone components should do the following things:
45
*
5-
* In addition all runestone components should do the following things:
6-
* 1. Ensure that they are wrapped in a div with the class runestone
7-
* 2. Write their source AND their generated html to the database if the database is configured
8-
* 3. properly save and restore their answers using the checkServer mechanism in this base class.
9-
* Each component must provide an implementation of
10-
* - checkLocalStorage
11-
* - setLocalStorage
12-
* - restoreAnswers
13-
* disableInteraction
6+
* 1. Ensure that they are wrapped in a div with the class runestone
7+
* 2. Write their source AND their generated html to the database if the database is configured
8+
* 3. Properly save and restore their answers using the checkServer mechanism in this base class. Each component must provide an implementation of:
149
*
15-
* 4. provide a Selenium based unit test
10+
* - checkLocalStorage
11+
* - setLocalStorage
12+
* - restoreAnswers
13+
* - disableInteraction
1614
*
17-
**/
15+
* 4. provide a Selenium based unit test
16+
*/
1817

1918
import { pageProgressTracker } from "./bookfuncs.js";
2019
//import "./../styles/runestone-custom-sphinx-bootstrap.css";

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)