0.4.0 • Published 8 years ago

vue-easy-tags v0.4.0

Weekly downloads
2
License
MIT
Repository
-
Last release
8 years ago

vue-easy-tags

Makes it easy to generate HTML with Vue templates or render functions. Best with CoffeeTags (https://github.com/shreeve/coffeescript/tree/coffee-tags).

Example

In the following, template and render are equivalent.

module.exports =

  methods:
    shout: (what) ->
      alert "You love #{what}?!"

  template: <*>
    <div@auth>
      <div class="flippable">
        <div>
          <img src="images/logo.svg">
          <h5 @click="shout('mozzarella')">Signin (Template)</h5>
          <form>
            <input name="email"    placeholder="Email">
            <input name="password" placeholder="Password" type="password">
            <button class="full" type="submit">Sign in to the Wellness Center</button>
          </form>
        </div>
      </div>
    </div>
  <*>

  render: (h) ->
    <@auth>
      <.flippable>
        <>
          <img> src: "images/logo.svg"
          <h5> (on: click: => @shout 'cheddar'), "Signin (Render)"
          <form>
            <input> name: "email"   , placeholder: "Email"
            <input> name: "password", placeholder: "Password", type: "password"
            <button.full> (type: "submit"), "Sign in to the Wellness Center"

License

MIT

0.4.0

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago