muwu 3.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/muwu/cli/help/summary +1 -1
- data/lib/muwu/cli/help/view +2 -2
- data/lib/muwu/controller/controller_interaction.rb +10 -4
- data/lib/muwu/default/default.rb +2 -8
- data/lib/muwu/helper/html_href_helper.rb +77 -77
- data/lib/muwu/helper/outline_helper.rb +22 -24
- data/lib/muwu/helper/regexp_lib.rb +26 -51
- data/lib/muwu/helper/sanitizer_helper.rb +5 -5
- data/lib/muwu/manifest/manifest.rb +52 -70
- data/lib/muwu/manifest_task/document_html.rb +16 -22
- data/lib/muwu/manifest_task/text.rb +13 -13
- data/lib/muwu/manifest_task/{text_item.rb → topic.rb} +9 -9
- data/lib/muwu/manifest_task_builder/text_builder.rb +24 -24
- data/lib/muwu/manifest_task_builder/{text_item_builder.rb → topic_builder.rb} +48 -74
- data/lib/muwu/project/project.rb +0 -8
- data/lib/muwu/project_builder/assets/config/css/base/html_elements.scss +57 -62
- data/lib/muwu/project_builder/assets/config/css/base/index.scss +3 -2
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_contents.scss +35 -57
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_metadata.scss +2 -14
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_navigator.scss +6 -11
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_subcontents.scss +35 -57
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_text.scss +2 -48
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_title.scss +18 -23
- data/lib/muwu/project_builder/assets/config/css/base/section_muwu_topic.scss +38 -0
- data/lib/muwu/project_builder/assets/config/css/colors/dark.scss +33 -31
- data/lib/muwu/project_builder/assets/config/css/colors/index.scss +2 -1
- data/lib/muwu/project_builder/assets/config/css/colors/light.scss +33 -33
- data/lib/muwu/project_builder/project_validator.rb +7 -7
- data/lib/muwu/project_exception/{lynx_not_available.rb → no_html_viewer_configured.rb} +2 -2
- data/lib/muwu/project_exception/{text_source_file_not_found.rb → topic_source_file_not_found.rb} +6 -7
- data/lib/muwu/project_options/project_options.rb +4 -1
- data/lib/muwu/project_options_builder/project_option_validator_key.rb +17 -19
- data/lib/muwu/project_options_builder/project_option_validator_value.rb +42 -59
- data/lib/muwu/render_concat/render_concat.rb +22 -22
- data/lib/muwu/render_html_partial/js_library/navigation.js +1 -1
- data/lib/muwu/render_html_partial/render_contents.rb +139 -139
- data/lib/muwu/render_html_partial/render_document_html.rb +2 -2
- data/lib/muwu/render_html_partial/render_metadata.rb +25 -37
- data/lib/muwu/render_html_partial/render_navigator.rb +39 -39
- data/lib/muwu/render_html_partial/render_subcontents.rb +142 -143
- data/lib/muwu/render_html_partial/render_text.rb +11 -11
- data/lib/muwu/render_html_partial/render_title.rb +21 -21
- data/lib/muwu/render_html_partial/{render_text_item.rb → render_topic.rb} +62 -35
- data/lib/muwu/render_html_partial_builder/render_contents_builder.rb +17 -23
- data/lib/muwu/render_html_partial_builder/render_subcontents_builder.rb +3 -9
- data/lib/muwu/render_html_partial_builder/render_text_builder.rb +11 -11
- data/lib/muwu/render_html_partial_builder/render_topic_builder.rb +281 -0
- data/lib/muwu/render_inspector/render_inspector.rb +58 -58
- data/lib/muwu/viewer/viewer.rb +2 -2
- data/lib/muwu.rb +2 -7
- metadata +30 -78
- data/lib/muwu/project_builder/assets/config/css/base/mixin_text_section_heading.scss +0 -24
- data/lib/muwu/render_html/render_markup_to_html.rb +0 -87
- data/lib/muwu/render_html_partial_builder/render_text_item_builder.rb +0 -274
- data/lib/muwu/var/deflistdiv.rb +0 -239
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
module Muwu
|
|
2
2
|
module ManifestTaskBuilders
|
|
3
|
-
class
|
|
3
|
+
class TopicBuilder
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
include Muwu
|
|
7
7
|
include Helper
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
@@topic_id = 0
|
|
11
|
+
|
|
12
|
+
|
|
10
13
|
attr_accessor(
|
|
11
14
|
:heading_data,
|
|
12
15
|
:numbering,
|
|
@@ -14,19 +17,19 @@ module Muwu
|
|
|
14
17
|
:parent_manifest_text,
|
|
15
18
|
:project,
|
|
16
19
|
:source_filename,
|
|
17
|
-
:
|
|
20
|
+
:topic
|
|
18
21
|
)
|
|
19
22
|
|
|
20
23
|
|
|
21
24
|
def self.build
|
|
22
25
|
builder = new
|
|
23
26
|
yield(builder)
|
|
24
|
-
builder.
|
|
27
|
+
builder.topic
|
|
25
28
|
end
|
|
26
29
|
|
|
27
30
|
|
|
28
31
|
def initialize
|
|
29
|
-
@
|
|
32
|
+
@topic = ManifestTask::Topic.new
|
|
30
33
|
end
|
|
31
34
|
|
|
32
35
|
|
|
@@ -35,63 +38,70 @@ module Muwu
|
|
|
35
38
|
@outline_fragment = outline_fragment
|
|
36
39
|
@parent_manifest_text = parent_manifest_text
|
|
37
40
|
@project = parent_manifest_text.project
|
|
41
|
+
phase_1_set_id
|
|
38
42
|
phase_1_set_project
|
|
39
43
|
phase_2_set_source_filename
|
|
40
44
|
phase_3_set_heading
|
|
41
45
|
phase_4_set_destination
|
|
42
46
|
phase_4_set_naming
|
|
43
47
|
phase_4_set_numbering
|
|
44
|
-
|
|
48
|
+
phase_5_set_subtopics
|
|
45
49
|
phase_6_validate_file_presence
|
|
46
50
|
end
|
|
47
51
|
|
|
48
52
|
|
|
53
|
+
def phase_1_set_id
|
|
54
|
+
@topic.id = @@topic_id
|
|
55
|
+
@@topic_id = @@topic_id.next
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
|
|
49
59
|
def phase_1_set_project
|
|
50
|
-
@
|
|
60
|
+
@topic.project = @project
|
|
51
61
|
end
|
|
52
62
|
|
|
53
63
|
|
|
54
64
|
def phase_2_set_source_filename
|
|
55
65
|
@source_filename = determine_source_filename
|
|
56
|
-
@
|
|
66
|
+
@topic.source_filename = @source_filename
|
|
57
67
|
end
|
|
58
68
|
|
|
59
69
|
|
|
60
70
|
def phase_3_set_heading
|
|
61
71
|
@heading_data = determine_heading_data
|
|
62
|
-
@
|
|
63
|
-
@
|
|
72
|
+
@topic.heading = @heading_data[:heading]
|
|
73
|
+
@topic.heading_origin = @heading_data[:origin]
|
|
64
74
|
end
|
|
65
75
|
|
|
66
76
|
|
|
67
77
|
def phase_4_set_destination
|
|
68
|
-
@
|
|
78
|
+
@topic.destination = @parent_manifest_text.destination
|
|
69
79
|
end
|
|
70
80
|
|
|
71
81
|
|
|
72
82
|
def phase_4_set_naming
|
|
73
83
|
if Hash === @outline_fragment
|
|
74
|
-
@
|
|
84
|
+
@topic.naming = [@parent_manifest_text.naming, SanitizerHelper.sanitize_topic_path(outline_step)].flatten
|
|
75
85
|
else
|
|
76
|
-
@
|
|
86
|
+
@topic.naming = [@parent_manifest_text.naming, @heading_data[:heading]].flatten
|
|
77
87
|
end
|
|
78
88
|
end
|
|
79
89
|
|
|
80
90
|
|
|
81
91
|
def phase_4_set_numbering
|
|
82
|
-
@
|
|
92
|
+
@topic.numbering = @numbering
|
|
83
93
|
end
|
|
84
94
|
|
|
85
95
|
|
|
86
|
-
def
|
|
96
|
+
def phase_5_set_subtopics
|
|
87
97
|
if Hash === @outline_fragment
|
|
88
|
-
@
|
|
98
|
+
@topic.subtopics = determine_subtopics
|
|
89
99
|
end
|
|
90
100
|
end
|
|
91
101
|
|
|
92
102
|
|
|
93
103
|
def phase_6_validate_file_presence
|
|
94
|
-
ProjectValidator.new(@project).
|
|
104
|
+
ProjectValidator.new(@project).validate_task_topic(@topic)
|
|
95
105
|
end
|
|
96
106
|
|
|
97
107
|
|
|
@@ -99,9 +109,9 @@ module Muwu
|
|
|
99
109
|
private
|
|
100
110
|
|
|
101
111
|
|
|
102
|
-
def
|
|
103
|
-
ManifestTaskBuilders::
|
|
104
|
-
b.build_from_outline_fragment_text(step, section_numbering, @
|
|
112
|
+
def build_topic(step, section_numbering)
|
|
113
|
+
ManifestTaskBuilders::TopicBuilder.build do |b|
|
|
114
|
+
b.build_from_outline_fragment_text(step, section_numbering, @topic)
|
|
105
115
|
end
|
|
106
116
|
end
|
|
107
117
|
|
|
@@ -111,17 +121,17 @@ module Muwu
|
|
|
111
121
|
end
|
|
112
122
|
|
|
113
123
|
|
|
114
|
-
def
|
|
115
|
-
|
|
124
|
+
def determine_subtopics
|
|
125
|
+
subtopics = []
|
|
116
126
|
child_steps = [@outline_fragment.flatten[1]].flatten
|
|
117
127
|
if child_steps.empty? == false
|
|
118
|
-
child_section_numbering = section_number_extend(@
|
|
128
|
+
child_section_numbering = section_number_extend(@topic.numbering)
|
|
119
129
|
child_steps.each do |step|
|
|
120
130
|
child_section_numbering = section_number_increment(child_section_numbering)
|
|
121
|
-
|
|
131
|
+
subtopics << build_topic(step, child_section_numbering)
|
|
122
132
|
end
|
|
123
133
|
end
|
|
124
|
-
|
|
134
|
+
subtopics
|
|
125
135
|
end
|
|
126
136
|
|
|
127
137
|
|
|
@@ -139,7 +149,7 @@ module Muwu
|
|
|
139
149
|
|
|
140
150
|
|
|
141
151
|
def determine_source_filename_explicitly
|
|
142
|
-
filename = SanitizerHelper.
|
|
152
|
+
filename = SanitizerHelper.sanitize_topic_basename(outline_step)
|
|
143
153
|
filepath = ['text']
|
|
144
154
|
File.join([filepath, filename].flatten)
|
|
145
155
|
end
|
|
@@ -153,57 +163,40 @@ module Muwu
|
|
|
153
163
|
end
|
|
154
164
|
end
|
|
155
165
|
|
|
156
|
-
# TODO: This method looks obsolete. Find its references.
|
|
157
|
-
def determine_source_filename_implicitly
|
|
158
|
-
# filename = make_filename_implicitly(outline_step)
|
|
159
|
-
# filepath = make_filepath_implicitly
|
|
160
|
-
# File.join([filepath, filename].flatten)
|
|
161
|
-
determine_source_filename_cascade_implicitly
|
|
162
|
-
end
|
|
163
|
-
|
|
164
166
|
|
|
165
|
-
def
|
|
167
|
+
def determine_source_filename_implicitly
|
|
166
168
|
source_filename = ''
|
|
167
169
|
file_path = make_filepath_implicitly
|
|
168
|
-
file_basename = SanitizerHelper.
|
|
170
|
+
file_basename = SanitizerHelper.sanitize_topic_path(outline_step)
|
|
169
171
|
file_name_md = file_basename + '.md'
|
|
170
|
-
|
|
171
|
-
file_attempt_md = File.join([file_path, file_name_md].flatten)
|
|
172
|
-
file_attempt_haml = File.join([file_path, file_name_haml].flatten)
|
|
173
|
-
if File.exist?(file_attempt_md)
|
|
174
|
-
source_filename = file_attempt_md
|
|
175
|
-
elsif File.exist?(file_attempt_haml)
|
|
176
|
-
source_filename = file_attempt_haml
|
|
177
|
-
else
|
|
178
|
-
source_filename = file_attempt_md
|
|
179
|
-
end
|
|
172
|
+
source_filename = File.join([file_path, file_name_md].flatten)
|
|
180
173
|
source_filename
|
|
181
174
|
end
|
|
182
175
|
|
|
183
176
|
|
|
184
177
|
def determine_heading_data
|
|
185
|
-
if @
|
|
178
|
+
if @topic.source_file_does_exist
|
|
186
179
|
determine_heading_from_file
|
|
187
|
-
elsif @
|
|
180
|
+
elsif @topic.source_file_does_not_exist
|
|
188
181
|
determine_heading_from_file_basename_or_outline
|
|
189
182
|
end
|
|
190
183
|
end
|
|
191
184
|
|
|
192
185
|
|
|
193
186
|
def determine_heading_from_file
|
|
194
|
-
case File.extname(@
|
|
195
|
-
when '.haml'
|
|
196
|
-
determine_heading_from_file_haml
|
|
187
|
+
case File.extname(@topic.source_filename_absolute).downcase
|
|
197
188
|
when '.md'
|
|
198
189
|
determine_heading_from_file_md
|
|
199
190
|
else
|
|
191
|
+
# TODO: Obsolete? What criteria produce this outcome?
|
|
200
192
|
determine_heading_from_file_basename
|
|
201
193
|
end
|
|
202
194
|
end
|
|
203
195
|
|
|
204
196
|
|
|
197
|
+
# TODO: Obsolete? see def determine_heading_from_file
|
|
205
198
|
def determine_heading_from_file_basename
|
|
206
|
-
heading = File.basename(@
|
|
199
|
+
heading = File.basename(@topic.source_filename, '.*')
|
|
207
200
|
origin = :basename
|
|
208
201
|
{ heading: heading, origin: origin }
|
|
209
202
|
end
|
|
@@ -212,7 +205,7 @@ module Muwu
|
|
|
212
205
|
def determine_heading_from_file_basename_or_outline
|
|
213
206
|
case @project.outline_text_pathnames
|
|
214
207
|
when 'explicit'
|
|
215
|
-
heading = File.basename(@
|
|
208
|
+
heading = File.basename(@topic.source_filename, '.*')
|
|
216
209
|
origin = :basename
|
|
217
210
|
when 'flexible', 'implicit'
|
|
218
211
|
heading = outline_step
|
|
@@ -225,25 +218,8 @@ module Muwu
|
|
|
225
218
|
end
|
|
226
219
|
|
|
227
220
|
|
|
228
|
-
def determine_heading_from_file_haml
|
|
229
|
-
first_line = File.open(@text_item.source_filename_absolute, 'r') { |f| f.gets("\n").to_s }
|
|
230
|
-
if first_line =~ RegexpLib.haml_heading
|
|
231
|
-
determine_heading_from_file_haml_first_line(first_line)
|
|
232
|
-
else
|
|
233
|
-
determine_heading_from_file_basename_or_outline
|
|
234
|
-
end
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
def determine_heading_from_file_haml_first_line(first_line)
|
|
239
|
-
heading = first_line.gsub(RegexpLib.haml_heading_plus_whitespace,'').strip
|
|
240
|
-
origin = :text_source
|
|
241
|
-
{ heading: heading, origin: origin }
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
|
|
245
221
|
def determine_heading_from_file_md
|
|
246
|
-
first_line = File.open(@
|
|
222
|
+
first_line = File.open(@topic.source_filename_absolute, 'r') { |f| f.gets("\n").to_s }
|
|
247
223
|
if first_line =~ RegexpLib.markdown_heading
|
|
248
224
|
determine_heading_from_file_md_first_line(first_line)
|
|
249
225
|
else
|
|
@@ -266,12 +242,11 @@ module Muwu
|
|
|
266
242
|
elsif @project.text_block_naming_is_not_simple
|
|
267
243
|
path_from_project_home.concat(@parent_manifest_text.naming_downcase)
|
|
268
244
|
end
|
|
269
|
-
safe_path_from_project_home = SanitizerHelper.
|
|
245
|
+
safe_path_from_project_home = SanitizerHelper.sanitize_topic_path(path_from_project_home)
|
|
270
246
|
safe_path_from_project_home
|
|
271
247
|
end
|
|
272
248
|
|
|
273
249
|
|
|
274
|
-
|
|
275
250
|
def outline_step
|
|
276
251
|
case @outline_fragment
|
|
277
252
|
when Hash
|
|
@@ -283,7 +258,7 @@ module Muwu
|
|
|
283
258
|
|
|
284
259
|
|
|
285
260
|
def outline_step_sanitized
|
|
286
|
-
SanitizerHelper.
|
|
261
|
+
SanitizerHelper.sanitize_topic_path(outline_step)
|
|
287
262
|
end
|
|
288
263
|
|
|
289
264
|
|
|
@@ -301,7 +276,6 @@ module Muwu
|
|
|
301
276
|
end
|
|
302
277
|
|
|
303
278
|
|
|
304
|
-
|
|
305
279
|
end
|
|
306
280
|
end
|
|
307
281
|
end
|
data/lib/muwu/project/project.rb
CHANGED
|
@@ -287,14 +287,6 @@ module Muwu
|
|
|
287
287
|
end
|
|
288
288
|
|
|
289
289
|
|
|
290
|
-
# TODO: Broken due to introduction of the `/compiled` folder
|
|
291
|
-
# Keeping it as a comment in case it becomes useful in the future.
|
|
292
|
-
#
|
|
293
|
-
# def path_images
|
|
294
|
-
# File.absolute_path(File.join(@working_directory, 'images'))
|
|
295
|
-
# end
|
|
296
|
-
|
|
297
|
-
|
|
298
290
|
def path_outline
|
|
299
291
|
@working_directory
|
|
300
292
|
end
|
|
@@ -20,57 +20,62 @@
|
|
|
20
20
|
// can successfully rely on `content-box` sizing.
|
|
21
21
|
//
|
|
22
22
|
|
|
23
|
-
$
|
|
24
|
-
$
|
|
23
|
+
$font-size: 1em;
|
|
24
|
+
$font-size-code: ($font-size * 0.9);
|
|
25
|
+
|
|
26
|
+
$header-factor: 0.125em;
|
|
27
|
+
$font-size-h1: ($font-size + ($header_factor * 4));
|
|
28
|
+
$font-size-h2: ($font-size + ($header_factor * 3));
|
|
29
|
+
$font-size-h3: ($font-size + ($header_factor * 2));
|
|
30
|
+
$font-size-h-default: $font-size-h3;
|
|
31
|
+
|
|
32
|
+
$line-height: ($font-size * 1.333);
|
|
33
|
+
|
|
34
|
+
$margin: $line-height;
|
|
35
|
+
$margin-double: ($margin * 2);
|
|
36
|
+
$margin-triple: ($margin * 3);
|
|
37
|
+
$margin-half: ($margin / 2);
|
|
38
|
+
$margin-quarter: ($margin / 4);
|
|
39
|
+
$margin-tenth: ($margin / 10);
|
|
40
|
+
$margin-contents-subtable: ($margin-quarter);
|
|
25
41
|
|
|
26
42
|
* {
|
|
27
43
|
box-sizing: content-box;
|
|
28
|
-
|
|
29
|
-
line-height: $muwu-root-line-height;
|
|
44
|
+
line-height: $line-height;
|
|
30
45
|
margin: 0;
|
|
31
46
|
padding: 0;
|
|
32
47
|
text-indent: 0;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
html {
|
|
37
|
-
width: 100%;
|
|
48
|
+
font-size: $font-size;
|
|
38
49
|
}
|
|
39
50
|
|
|
40
51
|
body {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
font-family: sans-serif;
|
|
53
|
+
font-size: 1rem;
|
|
54
|
+
padding: $margin-double;
|
|
44
55
|
}
|
|
45
56
|
|
|
46
57
|
blockquote {
|
|
47
|
-
margin: $
|
|
58
|
+
margin: $margin $margin-double;
|
|
48
59
|
}
|
|
49
60
|
|
|
50
61
|
code {
|
|
51
|
-
font-size: $
|
|
52
|
-
padding: 0rem 0.15rem;
|
|
62
|
+
font-size: ($font-size * 0.9);
|
|
53
63
|
}
|
|
54
64
|
|
|
55
65
|
dl {
|
|
56
|
-
margin: $
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
p {
|
|
70
|
-
display: inline;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
66
|
+
margin: $margin 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
dt {
|
|
70
|
+
display: list-item;
|
|
71
|
+
list-style-type: none;
|
|
72
|
+
font-weight: bold;
|
|
73
|
+
margin-top: $margin;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
dd {
|
|
77
|
+
display: list-item;
|
|
78
|
+
list-style-type: none;
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
img {
|
|
@@ -80,33 +85,33 @@ img {
|
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
h1, h2, h3, h4, h5, h6 {
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
margin: $margin 0;
|
|
89
|
+
font-size: $font-size-h-default;
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
hr {
|
|
88
|
-
margin: $
|
|
93
|
+
margin: $margin 0;
|
|
89
94
|
border-width: 0;
|
|
90
95
|
}
|
|
91
96
|
|
|
97
|
+
main {
|
|
98
|
+
margin-left: auto;
|
|
99
|
+
margin-right: auto;
|
|
100
|
+
max-width: 40em;
|
|
101
|
+
}
|
|
92
102
|
ol {
|
|
93
|
-
margin: $
|
|
94
|
-
|
|
95
|
-
margin: 0rem 1rem;
|
|
96
|
-
}
|
|
103
|
+
margin: 0 $margin;
|
|
104
|
+
padding: 0 $margin;
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
p {
|
|
100
|
-
margin: $
|
|
108
|
+
margin: $margin 0rem;
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
pre {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
font-size: ($muwu-root-font-size * 0.8);
|
|
108
|
-
padding: 0rem 0rem;
|
|
109
|
-
}
|
|
112
|
+
margin: $margin 0;
|
|
113
|
+
overflow-x: auto;
|
|
114
|
+
padding: $margin-half $margin;
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
q {
|
|
@@ -114,29 +119,19 @@ q {
|
|
|
114
119
|
}
|
|
115
120
|
|
|
116
121
|
ul {
|
|
117
|
-
margin: $
|
|
118
|
-
|
|
119
|
-
margin: 0rem 1rem;
|
|
120
|
-
}
|
|
122
|
+
margin: 0 $margin;
|
|
123
|
+
padding: 0 $margin;
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
|
|
124
127
|
|
|
125
128
|
|
|
126
129
|
@media screen {
|
|
127
|
-
html {
|
|
128
|
-
body {
|
|
129
|
-
padding: 1.5rem;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
130
|
}
|
|
133
131
|
|
|
132
|
+
|
|
134
133
|
@media print {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
ol, ul {
|
|
138
|
-
page-break-inside: avoid;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
134
|
+
ol, ul {
|
|
135
|
+
page-break-inside: avoid;
|
|
141
136
|
}
|
|
142
137
|
}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
@import 'section_muwu_contents';
|
|
3
3
|
@import 'section_muwu_metadata';
|
|
4
4
|
@import 'section_muwu_navigator';
|
|
5
|
+
@import 'section_muwu_subcontents';
|
|
5
6
|
@import 'section_muwu_text';
|
|
6
7
|
@import 'section_muwu_title';
|
|
7
|
-
@import '
|
|
8
|
+
@import 'section_muwu_topic';
|
|
8
9
|
|
|
9
10
|
// A better approach to CSS would be to assign classes to elements via the
|
|
10
11
|
// html renderer. Until such functionality exists, messy selector chaining
|
|
11
|
-
// is the incumbent design.
|
|
12
|
+
// is the incumbent design.
|
|
@@ -1,58 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
margin:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
td.number {
|
|
38
|
-
text-align: right;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
>ol {
|
|
43
|
-
list-style-type: none;
|
|
44
|
-
display: block;
|
|
45
|
-
margin: 0rem;
|
|
46
|
-
li {
|
|
47
|
-
margin: ($muwu-root-line-height * 0.5) 0rem;
|
|
48
|
-
a {
|
|
49
|
-
display: inline;
|
|
50
|
-
}
|
|
51
|
-
ol {
|
|
52
|
-
list-style-type: none;
|
|
53
|
-
display: block;
|
|
54
|
-
margin: 0rem 1rem;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
[data-document-block='contents'] {
|
|
2
|
+
margin: $margin-triple 0;
|
|
3
|
+
}
|
|
4
|
+
[data-contents='heading'] {
|
|
5
|
+
font-size: $font-size-h1;
|
|
6
|
+
margin-bottom: $margin;
|
|
7
|
+
text-align: left;
|
|
8
|
+
}
|
|
9
|
+
[data-contents='list'] {
|
|
10
|
+
list-style-type: none;
|
|
11
|
+
display: block;
|
|
12
|
+
margin: 0rem;
|
|
13
|
+
}
|
|
14
|
+
[data-contents='list-topic'] {
|
|
15
|
+
margin: $margin-half 0rem;
|
|
16
|
+
}
|
|
17
|
+
[data-contents='list-topic'] > [data-contents='list'] {
|
|
18
|
+
margin: 0 $margin-half;
|
|
19
|
+
}
|
|
20
|
+
[data-contents='table'] {
|
|
21
|
+
border-collapse: collapse;
|
|
22
|
+
}
|
|
23
|
+
[data-contents='table-number'] {
|
|
24
|
+
padding: $margin-quarter;
|
|
25
|
+
text-align: right;
|
|
26
|
+
vertical-align: top;
|
|
27
|
+
}
|
|
28
|
+
[data-contents='table-topic'] {
|
|
29
|
+
padding: $margin-quarter;
|
|
30
|
+
text-align: left;
|
|
31
|
+
}
|
|
32
|
+
[data-contents='table-topic'] > [data-contents='table'] {
|
|
33
|
+
border-collapse: collapse;
|
|
34
|
+
margin-top: $margin-contents-subtable;
|
|
35
|
+
margin-bottom: -($margin-contents-subtable);
|
|
58
36
|
}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
margin:
|
|
3
|
-
dl {
|
|
4
|
-
div {
|
|
5
|
-
margin: $muwu-root-line-height 0;
|
|
6
|
-
dt {
|
|
7
|
-
font-weight: bold;
|
|
8
|
-
display: block;
|
|
9
|
-
}
|
|
10
|
-
dd {
|
|
11
|
-
display: block;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
[data-document-block='metadata'] {
|
|
2
|
+
margin: $margin-triple 0;
|
|
15
3
|
}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
a.document_link {
|
|
8
|
-
font-size: ($muwu-root-font-size * 0.8);
|
|
9
|
-
padding: ($muwu-root-line-height * 0.5);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
[data-document-block='navigator'] {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
justify-content: space-around;
|
|
5
|
+
font-size: 0.8em;
|
|
6
|
+
width: 100%;
|
|
12
7
|
}
|