reimertz / lagom

🖼 simplistic presentation generator
https://lagom.re.im
MIT License
199 stars 19 forks source link

Add links around supplied info #4

Closed Haroenv closed 8 years ago

Haroenv commented 8 years ago

When running the cli, it asks for your site, twitter, GitHub, and those are added in the created slides, but they aren't links. I think it'd be nice if they are also available as links by default.

Haroenv commented 8 years ago

I've seen that it should be added around https://github.com/reimertz/lagom/blob/master/src/index.html#L17, but I couldn't find what you're using to render the moustaches, so I don't know how to add variables in attributes.

reimertz commented 8 years ago

yeah, this needs some rework.. :) This is how I do it now https://github.com/reimertz/lagom/blob/master/src/bin/lagom-create.js#L35

Haroenv commented 8 years ago

<a href="https://twitter.com/{{twitter}}">{{twitter}}</a> would work then?

reimertz commented 8 years ago

yep, that would do it, the only issue is that if the user doesn't enter anything, you'd still get a link without any content.

i think a better thing here is to introduce a template renderer.

reimertz commented 8 years ago

so we could do something similar to this

{{ if twitter }}
  <a href="https://twitter.com/{{twitter}}">{{twitter}}</a>
{{ endif }}
Haroenv commented 8 years ago

Yep, that's what I remark in #5 too, now all of those variables always get rendered (link or not)