devlinjunker / template.webpack.fend

Example using Webpack to build a FEND Browser App (with HTML/CSS/JS and Image files)
http://devlinjunker.github.io/template.webpack.fend
MIT License
3 stars 2 forks source link

Simple Partials with Tailwind Styles #23

Closed devlinjunker closed 4 years ago

devlinjunker commented 4 years ago

Description

Started messing around with simple handlebars partials and helpers.

Added (checkbox) partial with:

Also needed to add new handlebar helper for handling default values, this lets us stylize the checkbox using basic black/white unless the dev adds custom styles with color and bg-color params

Related

11

12

Visual

Screenshot 2020-05-10 22 03 52

small checkbox: Screenshot 2020-05-16 11 34 09

Questions

TODO

devlinjunker commented 4 years ago

Handlebars may not be great for this interactive user interface component use case....

From the handlebars docs: https://handlebarsjs.com/installation/when-to-use-handlebars.html

devlinjunker commented 4 years ago

seems like ember uses handlebars templates: https://guides.emberjs.com/v3.3.0/templates/handlebars-basics/

It was on the list of event based frameworks (in prev comment) and also was mentioned when researching logical helpers (eq, noteq etc..): https://github.com/jmurphyau/ember-truth-helpers

devlinjunker commented 4 years ago

sizing seems complicated... if we add size property we also need to add https://github.com/jmurphyau/ember-truth-helpers to handlebars so we can check if size == 'sm' etc...

Need to think about:

devlinjunker commented 4 years ago

sizing seems complicated... if we add size property we also need to add https://github.com/jmurphyau/ember-truth-helpers to handlebars so we can check if size == 'sm' etc...

I was able to do this with a simple {{#if size}} ... {{/if}} check for both size = sm and lg