Jade Mixins #162
Replies: 4 comments
-
agora é pug!!! |
Beta Was this translation helpful? Give feedback.
-
Jade é um nome tao mais bonito =( |
Beta Was this translation helpful? Give feedback.
-
Todos meus projetos são em Jade, sabem como está essa alteração no nome? Deveria os projetos antigos? Só os novos? |
Beta Was this translation helpful? Give feedback.
-
o próximo release será @rubenmarcus Tem esse de montar mixin tableHead(cols)
thead
tr
each campo in cols
th #{campo}
mixin tableRow(dados, kind, cols)
each row in dados
tr(data-action=row[kind])
each td, k in row
if typeof(td) === 'object'
each v, kv in td
td(data-th=cols[kv]) #{v}
else if k === 'ramo'
td(data-th=cols[k])
svg.icontable
use(xlink:href='##{td}')
else if k === 'pago'
td(data-th=cols[k])
if Number(td)
svg.icontable
use(xlink:href='#credit')
else if cols[k]
td(data-th=cols[k]) #{td}
mixin tableBody(dados, kind, cols)
tbody
+tableRow(dados, kind, cols)
mixin table(lista)
+tableHead(lista.colsItems)
+tableBody(lista.items, lista.kind, lista.colsItems) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Quem aqui usa jade?
Queria compartilhar alguns mixins que eu uso, e ver alguns legais que a galera use..
fiz esse pra inclusão de svg, ficou um pouco redundante mas o jade não deixa fazer includes dinamicos.. pelo menos a sintaxe no input ficou bem facil
Fiz um pra checkbox tambem:
Quero escrever um post mais pra frente sobre Jade, mas preciso montar meu portfolio primeiro...
Valeu
Beta Was this translation helpful? Give feedback.
All reactions