Mercurial > p > roundup > code
comparison doc/_templates/layout.html @ 7492:452a8bd1d826
add file with sphinx requirements for building doc.
Disable permalinks for older and newer sphinx versions.
make conf.py's work with old and new sphinx.
make layout.py work with 7.x sphinx which replaces the style
variable with styles[].
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 15 Jun 2023 20:46:59 -0400 |
| parents | 33124f6dc1c4 |
| children | 291afa77ad82 |
comparison
equal
deleted
inserted
replaced
| 7491:b290c7b95986 | 7492:452a8bd1d826 |
|---|---|
| 71 {%- endif %} | 71 {%- endif %} |
| 72 {%- endblock %} | 72 {%- endblock %} |
| 73 {%- endmacro %} | 73 {%- endmacro %} |
| 74 | 74 |
| 75 {%- macro css() %} | 75 {%- macro css() %} |
| 76 <link rel="stylesheet" href="{{ pathto('_static/basic.css', 1) }}" type="text/css" /> | 76 <link rel="stylesheet" href="{{ pathto('_static/NO_basic.css', 1) }}" type="text/css" /> |
| 77 <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> | 77 <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" /> |
| 78 <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> | 78 <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> |
| 79 {%- for cssfile in css_files %} | 79 {%- for cssfile in css_files %} |
| 80 <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> | 80 <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> |
| 81 {%- endfor %} | 81 {%- endfor %} |
| 82 {%- endmacro %} | 82 {%- endmacro %} |
| 83 | |
| 84 {# | |
| 85 In newer sphinx styles is an array and style does not exist | |
| 86 In older sphinx (1.x) style is the style set in conf.py. | |
| 87 | |
| 88 If style exists, assume styles doesn't exist and make styles | |
| 89 exist with style as the only value. | |
| 90 | |
| 91 So we can use styles[-1] in the css() macro. | |
| 92 When sourceforge lets me build docs with something newer than sphinx 1, | |
| 93 we can delete this. | |
| 94 #} | |
| 95 {% if style %} | |
| 96 {% set styles = [] %} | |
| 97 {{ styles.append( style ) }} | |
| 98 {% endif %} | |
| 83 | 99 |
| 84 <html lang="en"> | 100 <html lang="en"> |
| 85 <head> | 101 <head> |
| 86 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 102 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 87 <meta name="viewport" content="width=device-width, initial-scale=1"> | 103 <meta name="viewport" content="width=device-width, initial-scale=1"> |
