emerald icon indicating copy to clipboard operation
emerald copied to clipboard

Pass template parameters to mixin

Open konradmb opened this issue 4 years ago • 3 comments

Enables passing template parameters to mixins:

import emerald
proc mySection(title: string) {.html_mixin.} =
    section:
        h1: title

proc templ(numItems: int) {.html_templ.} =
  append content:
    html(lang="en"):
        body:
            call_mixin mySection($numItems)

konradmb avatar Aug 14 '19 00:08 konradmb

I am long disconnected with this project. I don't really know the code anymore. Accepting PRs now is just lying about being able to maintain this project when in reality I can't.

My plan is to archive this project to make clear it's unmaintained. However, if you want to take over ownership, I can also transfer it to you. Let me know if you're interested.

flyx avatar Sep 06 '19 14:09 flyx

I don't really know the code anymore.

Well, so what I can say? :smiley:

However, if you want to take over ownership, I can also transfer it to you. Let me know if you're interested.

I would like to, but I really can't. I have no clue what's going on with the code. You did a great job and I don't want to hijack your project and leave it unmaintained, but I think I will merge the changes to my fork.

Anyway, thanks for emerald, this whole idea of Nim syntax for HTML is a breath of fresh air.

konradmb avatar Sep 27 '19 20:09 konradmb

You're welcome :). I'm archiving the project now.

flyx avatar Sep 28 '19 06:09 flyx