From 0c0ac3e814c763e271d7a0c9b5c9b5e824b2f2f3 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 22 Sep 2015 14:07:23 +0100 Subject: [PATCH] Fix common event fields template to use subtitle char --- specification/modules/intro.rst | 5 ----- specification/targets.yaml | 1 - templating/matrix_templates/sections.py | 7 ++++++- .../matrix_templates/templates/common-event-fields.tmpl | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 specification/modules/intro.rst diff --git a/specification/modules/intro.rst b/specification/modules/intro.rst deleted file mode 100644 index fdfcbbdc..00000000 --- a/specification/modules/intro.rst +++ /dev/null @@ -1,5 +0,0 @@ -Modules -======= - -Modules blurb goes here. - diff --git a/specification/targets.yaml b/specification/targets.yaml index df61e7a1..96527dae 100644 --- a/specification/targets.yaml +++ b/specification/targets.yaml @@ -14,7 +14,6 @@ targets: - 6-appendices.rst groups: # reusable blobs of files when prefixed with 'group:' modules: - - modules/intro.rst - modules/voip_events.rst - modules/typing_notifications.rst - modules/receipts.rst diff --git a/templating/matrix_templates/sections.py b/templating/matrix_templates/sections.py index 6072222a..78f011b9 100644 --- a/templating/matrix_templates/sections.py +++ b/templating/matrix_templates/sections.py @@ -160,7 +160,12 @@ class MatrixSections(Sections): def _render_ce_type(self, type): template = self.env.get_template("common-event-fields.tmpl") ce_types = self.units.get("common_event_fields") - return template.render(common_event=ce_types[type]) + subtitle_title_char = self.units.get("spec_targets")[ + "relative_title_styles" + ]["subtitle"] + return template.render( + common_event=ce_types[type], title_kind=subtitle_title_char + ) def render_common_event_fields(self): return self._render_ce_type("event") diff --git a/templating/matrix_templates/templates/common-event-fields.tmpl b/templating/matrix_templates/templates/common-event-fields.tmpl index 2a3f7ec5..3f16be3d 100644 --- a/templating/matrix_templates/templates/common-event-fields.tmpl +++ b/templating/matrix_templates/templates/common-event-fields.tmpl @@ -1,5 +1,5 @@ {{common_event.title}} Fields -{{(7 + common_event.title | length) * '-'}} +{{(7 + common_event.title | length) * title_kind}} {{common_event.desc | wrap(80)}}