Révision | cbb81a4d0e183bd7a3e75791624517f505de9ea1 (tree) |
---|---|
l'heure | 2022-05-24 21:28:05 |
Auteur | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
Improvement on 'std' layout
@@ -44,20 +44,20 @@ | ||
44 | 44 | } |
45 | 45 | html_style = 'SwBMnl+rtfd.css' |
46 | 46 | |
47 | -# # HTML-Slides (using Hieroglyph) | |
48 | -# #------------------------------- | |
49 | -# extensions.append('hieroglyph') | |
50 | -# | |
51 | -# slide_theme = 'slides' | |
52 | -# slide_levels = 2 | |
53 | -# | |
54 | -# slide_theme_options = {'custom_css': 'SwBMnl-hieroglyph_slides=article.css'} | |
55 | -# | |
56 | -# slide_link_to_html=False | |
57 | -# slide_link_html_to_slides=False | |
58 | - | |
59 | 47 | |
60 | 48 | # sphinx.ext.todo |
61 | 49 | #----------------- |
62 | 50 | extensions.append('sphinx.ext.todo') |
63 | 51 | todo_include_todos=True |
52 | + | |
53 | + | |
54 | +# Needs | |
55 | +#------ | |
56 | +extensions.append('sphinxcontrib.needs') | |
57 | +needs_include_needs = True | |
58 | +needs_id_required = True | |
59 | +needs_id_regex = r'^[A-Z][A-Za-z]*_[A-Za-z0-9-]{2,}' | |
60 | + | |
61 | + | |
62 | +from std_needs import needs_types, needs_layouts | |
63 | +needs_default_layout = 'clean_collapsed' |
@@ -0,0 +1,19 @@ | ||
1 | +needs_types = [ | |
2 | + dict(directive="resolution", title="Resolution", prefix="R_", color="#9DC5BB", style="boundary"), | |
3 | + dict(directive="use", title="UseCase", prefix="U_", color="#C5EBC3", style="usecase"), #Note: usecase does not nest -- needed for :np: | |
4 | + dict(directive="spec", title="Specification", prefix="S_", color="#FEDCD2", style="component"), | |
5 | + dict(directive="impl", title="Implementation", prefix="I_", color="#DF744A", style="artifact"), | |
6 | + dict(directive="verify", title="Verify", prefix="V_", color="#F6E27F", style="folder"), | |
7 | + dict(directive="risk", title="Jeopardize", prefix="J_", color="#AA1234", style="queue"), | |
8 | +] | |
9 | + | |
10 | +needs_layouts = { | |
11 | + 'clean_collapsed': {'grid': 'simple', | |
12 | + 'layout': { | |
13 | + 'head': [ | |
14 | + '<<meta("type_name")>>: **<<meta("title")>>** <<meta_id()>> <<collapse_button("meta", ' | |
15 | + 'collapsed="icon:arrow-down-circle", visible="icon:arrow-right-circle", initial=True)>> '], | |
16 | + 'meta': [ | |
17 | + '<<meta_all(no_links=True)>>', | |
18 | + '<<meta_links_all()>>'], | |
19 | + }}} |
@@ -38,6 +38,7 @@ | ||
38 | 38 | margin-left: -0.8ex; |
39 | 39 | } |
40 | 40 | |
41 | +.rst-content dl.footnote * { margin-bottom: 0; padding: 0;} | |
41 | 42 | div.GAM-extra #postcardHeader .blogdate { |
42 | 43 | color: #000066; background: #c0c0c0; |
43 | 44 | text-align: right; |
@@ -66,3 +67,6 @@ | ||
66 | 67 | border: 1px solid #c0c0c0; |
67 | 68 | border-radius: 33%; |
68 | 69 | } |
70 | +.rst-content .sidebar p.sidebar-title {margin-bottom: 0;} | |
71 | +.rst-content .sidebar div.local li p {margin: 0;} | |
72 | + |
@@ -0,0 +1,49 @@ | ||
1 | +/* -*- coding: utf-8-unix -*- | |
2 | +* By ALbert Mietus, 2022. No (C) Copyright. | |
3 | +*/ | |
4 | + | |
5 | +/* | |
6 | + * Needs | |
7 | + */ | |
8 | + | |
9 | + | |
10 | +/* Requirements are body text. Don't make it smaller,lighter, denser 'table-text' */ | |
11 | +.rst-content table.docutils.need tr *:not(.admonition) p {font-size: 1rem; margin-bottom: 0.2rem; color: black; } | |
12 | +.rst-content table.docutils.need div.admonition, | |
13 | +.rst-content table.docutils.need ul.simple { margin-bottom: 0.4rem;} | |
14 | + | |
15 | +/* Need head(er) en meta (links, labels, ect) can be less prominent */ | |
16 | +.rst-content table.need tr.head td, | |
17 | +.rst-content table.need tr.meta td {padding: 2px 16px;} | |
18 | +.rst-content table.need tr.meta .line-block {line-height: normal;} | |
19 | + | |
20 | +/* Make clear boxes around a requirements ... */ | |
21 | +.rst-content table.need tr {border: 2px solid #000066;} | |
22 | + | |
23 | +/* .. and color them to type (keep in sync with (std) conf.py::needs_types */ | |
24 | +.rst-content table.need.needs_type_resolution:not(.field-list) tbody tr:not(.meta) td {background-color: #9DC5BB;} | |
25 | +.rst-content table.need.needs_type_use:not(.field-list) tbody tr:not(.meta) td {background-color: #C5EBC3;} | |
26 | +.rst-content table.need.needs_type_spec:not(.field-list) tbody tr:not(.meta) td {background-color: #FEDCD2;} | |
27 | +.rst-content table.need.needs_type_impl:not(.field-list) tbody tr:not(.meta) td {background-color: #DF744A;} | |
28 | +.rst-content table.need.needs_type_verify:not(.field-list) tbody tr:not(.meta) td {background-color: #F6E27F;} | |
29 | +.rst-content table.need.needs_type_risk:not(.field-list) tbody tr:not(.meta) td {background-color: #AA1234; color:white;} | |
30 | +.rst-content table.need.needs_type_risk:not(.field-list) tbody tr:not(.meta) td p { color:white;} | |
31 | + | |
32 | +/* Fancy, icon-style need-type-name */ | |
33 | +table.need tr.head td .needs_type_name { | |
34 | + color: #000066; | |
35 | + text-decoration: underline overline; | |
36 | + -webkit-text-decoration-color: #000066; | |
37 | + text-decoration-color: #000066; | |
38 | +} | |
39 | + | |
40 | +/*HACK*/ | |
41 | +table.rtm-rotated-head th {height: 20em;} /*Magic Number*/ | |
42 | +table.rtm-rotated-head th:not(:first-child)>p { | |
43 | + transform: translate(0px, 30px) /* Magic Numbers */ | |
44 | + rotate(-90deg); | |
45 | + width: 20px; | |
46 | +} | |
47 | + | |
48 | +.rst-content table.need dl.simple {margin-top: 1ex; margin-bottom: 1ex;} | |
49 | +.rst-content table.need dl.simple dt {margin-top: 1ex; margin-bottom: 0.2ex;} |