Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Handlebars as templating/output formatting engine #34

Open
amis92 opened this issue Mar 11, 2022 · 7 comments
Open

Consider Handlebars as templating/output formatting engine #34

amis92 opened this issue Mar 11, 2022 · 7 comments
Assignees

Comments

@amis92
Copy link
Member

amis92 commented Mar 11, 2022

No description provided.

@amis92
Copy link
Member Author

amis92 commented Mar 12, 2022

Format should define also output type, it might be a MIME type for example, or sth else. Default being plain text. Markdown and HTML as options?

@amis92
Copy link
Member Author

amis92 commented Mar 12, 2022

Extract FormatEditor component that can edit a RosterFormat object.

@amis92
Copy link
Member Author

amis92 commented Mar 12, 2022

Use PRE for output display.

Allow direct HTML (unescaped) output. IFRAME?

@amis92
Copy link
Member Author

amis92 commented Mar 15, 2022

@amis92 amis92 assigned Gerry546 and unassigned amis92 Mar 15, 2022
@Gerry546
Copy link

So to clarify, the goal is to come up with some ideas on how to present the formatted output of a roster right? :)

@amis92
Copy link
Member Author

amis92 commented Mar 17, 2022

Well, we need both ideas, and actual templates to be written, so yes, but also templates. :D

@amis92
Copy link
Member Author

amis92 commented Mar 29, 2022

Markdown template prototype:

{{roster.name}} ({{roster.gameSystemName}}) {{> costs roster}}

{{#each roster.forces}}
- {{> force}}
{{/each}}

{{#*inline "costs" ~}}
{{#if costs ~}}
[
{{~#each costs as |cost| ~}}
    {{#if cost.value ~}}
    {{cost.value}} {{cost.name ~}}{{#unless @last}}, {{/unless}}
    {{~/if ~}}
{{/each ~}}
]
{{~/if}}
{{~/inline}}

{{#*inline "force"}}
**{{name}} ({{catalogueName}})** {{> costs}}
{{#each selections}}
- {{> selection ~}}
{{/each ~}}
{{/inline}}

{{#*inline "selection"}}
**{{name}}** {{> costs }}
{{#each selections}}
  - {{> selection ~}}
{{/each ~}}
{{/inline}}

@Gerry546 Gerry546 removed their assignment Mar 29, 2022
@Gerry546 Gerry546 moved this from In Progress to Todo in Phalanx Mar 29, 2022
@Keagan-Hainsworth Keagan-Hainsworth self-assigned this Aug 30, 2022
@amis92 amis92 moved this from Todo to In Progress in Phalanx Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

4 participants