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

Template fragment syntax #6

Open
mohsen1 opened this issue Mar 3, 2015 · 1 comment
Open

Template fragment syntax #6

mohsen1 opened this issue Mar 3, 2015 · 1 comment

Comments

@mohsen1
Copy link
Member

mohsen1 commented Mar 3, 2015

Each piece of the form should be made of a template fragment. A template fragment is a Handlebars HTML file that has fields related to that fragment.

For example, for boolean type we will have a checkbox. This is the proposal for the template fragment for boolean type:

<!---
  Boolean type
  ==========

  Fileds:
  name (string) - the name of the property: 
  title (string) - The title property

  Example Schema:
  {
    "type": "boolean",
    "title": "In the U.S."
  }
-->
<label>
   {{name}}
   <input type="checkbox" title="{{title}}>
</label>

Fragments should be well documented. Maybe we can fix the format of documentations and make a tool for validating fragments. Documentations makes it very easy to customize.

Question:

Should we put each fragments style in a inline <style> tag inside the html?

@bvaughn
Copy link
Member

bvaughn commented Mar 3, 2015

I like this template format.

However, inline styles would prevent users from using our pre-built template but with external stylesheet overrides. (I think this is likely to be a common use-case.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants