S
S
Skrolea2016-11-20 11:23:41
HTML
Skrolea, 2016-11-20 11:23:41

Anonymous blocks are not allowed unless they are part of a mixin. - What's wrong?

How to insert one mixin into another? Now swears atinclude ../buttons/buttons

mixin article-card(spec)
include ../buttons/buttons
  - spec = spec || {}
  - spec.__class = spec.__class || 'article-card'

  div(class=spec.__class)&attributes(attributes)
   .article-card__img
    img(src="images/news/12.png")
   .article-card__body
     .article-card__date
       p 20.11.2016
     .article-card__content              
      .article-card__title
         h3 Заголовок
      .article-card__description
         p Описание
     .article-card__buttons
        i.material-icons.article-icon share        
        #[+buttons({class: 'button',text:'Далее'})]

Why is he Anonymous blocks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2016-11-20
@werty1001

include ../buttons/buttons

mixin article-card()
    div&attributes(attributes)
        +buttons

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question