Skip to content

Commit

Permalink
fix(HandlebarsGenerator): sync HTML helper templates
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Nov 21, 2024
1 parent 3cce490 commit 12bbc1d
Show file tree
Hide file tree
Showing 236 changed files with 14,323 additions and 15,076 deletions.
2 changes: 1 addition & 1 deletion share/mrdocs/addons/generator/adoc/layouts/index.adoc.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}

[#{{sectionref}}]
{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol}}
{{> symbol symbol=symbol}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xref:{{href}}[{{> @partial-block }}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`{{> @partial-block }}`
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
={{select level (repeat "=" level) (select @root.config.multipage "==" "=")}} {{> @partial-block }}
2 changes: 2 additions & 0 deletions share/mrdocs/addons/generator/adoc/partials/markup/p.adoc.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{> @partial-block }}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{#if class}}[.{{class}}]#{{/if}}{{> @partial-block }}{{#if class}}#{{/if}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[{{#if cols}}cols={{cols}}{{/if}}]
|===
{{> @partial-block }}
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> @partial-block }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| {{> @partial-block }}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| {{> @partial-block }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{> @partial-block }}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> @partial-block }}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions share/mrdocs/addons/generator/common/partials/symbol.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{else if (eq kind "guide")~}}
{{>types/declarator deduced nolink=nolink~}}
{{else~}}
{{#if (and link.ref (not nolink))}}xref:{{link.ref}}[pass:[{{name}}]]{{else}}{{name}}{{/if~}}
{{#if (and link.ref (not nolink))}}{{#>markup/a href=link.ref}}{{name}}{{/markup/a}}{{else}}{{name}}{{/if~}}
{{#if (or (eq template.kind "explicit") (eq template.kind "partial"))~}}
{{>types/template-args args=template.args nolink=nolink~}}
{{/if~}}
Expand Down
17 changes: 17 additions & 0 deletions share/mrdocs/addons/generator/common/partials/types/info-list.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{! List the "members" field of a symbol as a table with the symbol name and brief for each member. }}
{{#if members}}
{{#>markup/h level=(select @root.config.multipage 1 2)}}{{title}}{{/markup/h}}
{{#>markup/table cols=2}}
{{#>markup/thead}}
{{#>markup/tr~}}
{{#>markup/th}}Name{{/markup/th~}}
{{#>markup/th}}Description{{/markup/th}}
{{/markup/tr}}
{{/markup/thead}}
{{#>markup/tbody}}
{{#each (sort_by members "name")}}
{{>types/info-member .}}
{{/each}}
{{/markup/tbody}}
{{/markup/table}}
{{/if}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{! Helper for "info-list": renders a symbol as a row in a table of members }}
{{#>markup/tr~}}
{{#>markup/td~}}
{{#>markup/a href=ref}}{{#>markup/code}}{{>types/declarator-id . nolink=true}}{{/markup/code}}{{/markup/a}} {{>types/special-name-suffix .}}
{{~/markup/td}}
{{#>markup/td~}}
{{#if (ne kind "overload")~}}
{{~doc.brief}}
{{else~}}
{{#each (unique (pluck (pluck members "doc") "brief"))~}}
{{.}}
{{/each~}}
{{/if}}
{{~/markup/td}}
{{~/markup/tr}}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{{#if prefix~}}
{{>types/name-info prefix nolink=nolink~}}::
{{~/if~}}
{{#if (or (eq name "see-below") (eq name "implementation-defined"))~}}_{{name}}_{{else~}}
{{#if (and symbol.ref (not nolink))}}<a href="{{symbol.ref}}">{{name}}</a>{{else~}}
{{#if (or (eq name "see-below") (eq name "implementation-defined"))~}}{{ str '_'}}{{name}}{{ str '_'}}{{else~}}
{{#if (and symbol.ref (not nolink))}}{{#>markup/a href=symbol.ref}}{{name}}{{/markup/a}}{{else~}}
{{name}}{{/if}}{{#if args}}{{>types/template-args args=args nolink=nolink}}{{/if~}}{{/if~}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
{{>types/qualified-path symbol=symbol.parent nolink=nolink~}}
{{else~}}
{{/if~}}
{{#if symbol.name}}{{#if (not nolink)}}<a href="{{symbol.ref}}">{{symbol.name}}</a>{{else}}{{symbol.name}}{{/if}}::{{/if~}}
{{#if symbol.name}}{{#if (not nolink)}}{{#>markup/a href=symbol.ref}}{{symbol.name}}{{/markup/a}}{{else}}{{symbol.name}}{{/if}}::{{/if~}}
{{/unless}}
16 changes: 16 additions & 0 deletions share/mrdocs/addons/generator/common/partials/types/source.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{!
Renders where the symbol is declared with a link
to the source file when the `base-url` config
option is defined
}}
{{#>markup/p}}
{{#>markup/span~}}
Declared in {{#>markup/code~}}
{{ str "<" }}{{#unless (and @root.config.base-url (eq dcl.kind "source"))~}}
{{dcl.file}}
{{~else~}}
{{#>markup/a href=(concat @root.config.base-url dcl.file '#L' dcl.line)}}{{dcl.file}}{{/markup/a}}>
{{~/unless~}}{{ str ">" }}
{{~/markup/code}}
{{~/markup/span}}
{{/markup/p}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{!
Renders the name of the symbol with a suffix when
the symbol is a special member (e.g., constructor,
destructor, overload, variant member)
}}
{{#if (eq kind "overload")~}}
{{>types/special-name-suffix (front members)}}
{{~else if (eq kind "function")~}}
{{#if (eq class "constructor")}}
{{#>markup/span class="small"}}[constructor]{{/markup/span}}
{{~else if (eq class "destructor")~}}
{{#>markup/span class="small"}}[destructor]{{/markup/span}}
{{~/if~}}
{{else if (eq kind "field")~}}
{{~#if isVariant~}}
{{#>markup/span class="small"}}[variant member]{{/markup/span}}
{{~/if~}}
{{~/if}}
2 changes: 1 addition & 1 deletion share/mrdocs/addons/generator/html/layouts/index.html.hbs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{{! The section with a symbol in single page output or the symbol page in multi page output }}
{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol}}
{{> symbol symbol=symbol}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="{{href}}">{{> @partial-block }}</a>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<code>{{> @partial-block }}</code>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h{{or level 3}}{{#if class}} class="{{class}}"{{/if}}>{{> @partial-block }}</h{{or level 3}}>
4 changes: 4 additions & 0 deletions share/mrdocs/addons/generator/html/partials/markup/p.html.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p>
{{> @partial-block }}

</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<span{{#if class}} class="{{class}}"{{/if}}>
{{> @partial-block }}

</span>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<table style="table-layout: fixed; width: 100%;">
{{> @partial-block }}

</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<tbody>
{{> @partial-block }}

</tbody>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<td>
{{> @partial-block }}

</td>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<th>{{> @partial-block }}</th>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<thead>
{{> @partial-block }}

</thead>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<tr>
{{> @partial-block }}

</tr>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 12bbc1d

Please sign in to comment.