Mustache / Handlebars // Developer note: ensure your ".mustache" files are imported as plain text. In Webpack you might use https://github.com/webpack-contrib/raw-loader
import Mustache from "mustache";
import FlexContainer from "@govtnz/ds/build/mustache/FlexContainer.mustache";
import FlexRow from "@govtnz/ds/build/mustache/FlexRow.mustache";
import FlexColumn from "@govtnz/ds/build/mustache/FlexColumn.mustache";
// The variables FlexContainer, FlexRow, FlexColumn are all strings that are mustache templates.
export default `${Mustache.render(FlexContainer, {
"width=fixed": true,
width: true,
children: `${Mustache.render(FlexRow, {
children: `${Mustache.render(FlexColumn, {
"xs=4": true,
xs: true,
sm: `4`,
md: `4`,
lg: `4`,
children: `.g-flex-col .g-flex-col-md-4`
})}${Mustache.render(FlexColumn, {
"xs=4": true,
xs: true,
sm: `4`,
md: `4`,
lg: `4`,
children: `.g-flex-col .g-flex-col-md-4`
})}${Mustache.render(FlexColumn, {
"xs=4": true,
xs: true,
sm: `4`,
md: `4`,
lg: `4`,
children: `.g-flex-col .g-flex-col-md-4`
})}${Mustache.render(FlexColumn, {
"xs=6": true,
xs: true,
sm: `6`,
md: `6`,
lg: `6`,
children: `.g-flex-col .g-flex-col-md-6`
})}${Mustache.render(FlexColumn, {
"xs=6": true,
xs: true,
sm: `6`,
md: `6`,
lg: `6`,
children: `.g-flex-col .g-flex-col-md-6`
})}${Mustache.render(FlexColumn, {
"xs=12": true,
xs: true,
sm: `12`,
md: `12`,
lg: `12`,
children: `.g-flex-col .g-flex-col-lg-12`
})}${Mustache.render(FlexColumn, {
"xs=1": true,
xs: true,
sm: `1`,
md: `1`,
lg: `1`,
children: `1/12`
})}${Mustache.render(FlexColumn, {
"xs=11": true,
xs: true,
sm: `11`,
md: `11`,
lg: `11`,
children: `11/12`
})}${Mustache.render(FlexColumn, {
"xs=2": true,
xs: true,
sm: `2`,
md: `2`,
lg: `2`,
children: `2/12`
})}${Mustache.render(FlexColumn, {
"xs=10": true,
xs: true,
sm: `10`,
md: `10`,
lg: `10`,
children: `10/12`
})}${Mustache.render(FlexColumn, {
"xs=3": true,
xs: true,
sm: `3`,
md: `3`,
lg: `3`,
children: `3/12`
})}${Mustache.render(FlexColumn, {
"xs=9": true,
xs: true,
sm: `9`,
md: `9`,
lg: `9`,
children: `9/12`
})}${Mustache.render(FlexColumn, {
"xs=4": true,
xs: true,
sm: `4`,
md: `4`,
lg: `4`,
children: `4/12`
})}${Mustache.render(FlexColumn, {
"xs=8": true,
xs: true,
sm: `8`,
md: `8`,
lg: `8`,
children: `8/12`
})}${Mustache.render(FlexColumn, {
"xs=5": true,
xs: true,
sm: `5`,
md: `5`,
lg: `5`,
children: `5/12`
})}${Mustache.render(FlexColumn, {
"xs=7": true,
xs: true,
sm: `7`,
md: `7`,
lg: `7`,
children: `7/12`
})}${Mustache.render(FlexColumn, {
"xs=6": true,
xs: true,
sm: `6`,
md: `6`,
lg: `6`,
children: `6/12`
})}${Mustache.render(FlexColumn, {
"xs=6": true,
xs: true,
sm: `6`,
md: `6`,
lg: `6`,
children: `6/12`
})}${Mustache.render(FlexColumn, {
"xs=7": true,
xs: true,
sm: `7`,
md: `7`,
lg: `7`,
children: `7/12`
})}${Mustache.render(FlexColumn, {
"xs=5": true,
xs: true,
sm: `5`,
md: `5`,
lg: `5`,
children: `5/12`
})}${Mustache.render(FlexColumn, {
"xs=8": true,
xs: true,
sm: `8`,
md: `8`,
lg: `8`,
children: `8/12`
})}${Mustache.render(FlexColumn, {
"xs=4": true,
xs: true,
sm: `4`,
md: `4`,
lg: `4`,
children: `4/12`
})}${Mustache.render(FlexColumn, {
"xs=9": true,
xs: true,
sm: `9`,
md: `9`,
lg: `9`,
children: `9/12`
})}${Mustache.render(FlexColumn, {
"xs=3": true,
xs: true,
sm: `3`,
md: `3`,
lg: `3`,
children: `3/12`
})}${Mustache.render(FlexColumn, {
"xs=10": true,
xs: true,
sm: `10`,
md: `10`,
lg: `10`,
children: `10/12`
})}${Mustache.render(FlexColumn, {
"xs=2": true,
xs: true,
sm: `2`,
md: `2`,
lg: `2`,
children: `2/12`
})}${Mustache.render(FlexColumn, {
"xs=11": true,
xs: true,
sm: `11`,
md: `11`,
lg: `11`,
children: `11/12`
})}${Mustache.render(FlexColumn, {
"xs=1": true,
xs: true,
sm: `1`,
md: `1`,
lg: `1`,
children: `1/12`
})}`
})}`
})}`;
twig-embed {% embed "FlexContainer.html.twig" with {'width':'fixed'} only %}{% block children %}{% embed "FlexRow.html.twig" %}{% block children %}{% embed "FlexColumn.html.twig" with {'xs':'4', 'sm':'4', 'md':'4', 'lg':'4', 'children':'.g-flex-col .g-flex-col-md-4'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'4', 'sm':'4', 'md':'4', 'lg':'4', 'children':'.g-flex-col .g-flex-col-md-4'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'4', 'sm':'4', 'md':'4', 'lg':'4', 'children':'.g-flex-col .g-flex-col-md-4'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'6', 'sm':'6', 'md':'6', 'lg':'6', 'children':'.g-flex-col .g-flex-col-md-6'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'6', 'sm':'6', 'md':'6', 'lg':'6', 'children':'.g-flex-col .g-flex-col-md-6'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'12', 'sm':'12', 'md':'12', 'lg':'12', 'children':'.g-flex-col .g-flex-col-lg-12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'1', 'sm':'1', 'md':'1', 'lg':'1', 'children':'1/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'11', 'sm':'11', 'md':'11', 'lg':'11', 'children':'11/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'2', 'sm':'2', 'md':'2', 'lg':'2', 'children':'2/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'10', 'sm':'10', 'md':'10', 'lg':'10', 'children':'10/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'3', 'sm':'3', 'md':'3', 'lg':'3', 'children':'3/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'9', 'sm':'9', 'md':'9', 'lg':'9', 'children':'9/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'4', 'sm':'4', 'md':'4', 'lg':'4', 'children':'4/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'8', 'sm':'8', 'md':'8', 'lg':'8', 'children':'8/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'5', 'sm':'5', 'md':'5', 'lg':'5', 'children':'5/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'7', 'sm':'7', 'md':'7', 'lg':'7', 'children':'7/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'6', 'sm':'6', 'md':'6', 'lg':'6', 'children':'6/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'6', 'sm':'6', 'md':'6', 'lg':'6', 'children':'6/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'7', 'sm':'7', 'md':'7', 'lg':'7', 'children':'7/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'5', 'sm':'5', 'md':'5', 'lg':'5', 'children':'5/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'8', 'sm':'8', 'md':'8', 'lg':'8', 'children':'8/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'4', 'sm':'4', 'md':'4', 'lg':'4', 'children':'4/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'9', 'sm':'9', 'md':'9', 'lg':'9', 'children':'9/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'3', 'sm':'3', 'md':'3', 'lg':'3', 'children':'3/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'10', 'sm':'10', 'md':'10', 'lg':'10', 'children':'10/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'2', 'sm':'2', 'md':'2', 'lg':'2', 'children':'2/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'11', 'sm':'11', 'md':'11', 'lg':'11', 'children':'11/12'} only %}{% endembed %}
{% embed "FlexColumn.html.twig" with {'xs':'1', 'sm':'1', 'md':'1', 'lg':'1', 'children':'1/12'} only %}{% endembed %}{% endblock %}{% endembed %}{% endblock %}{% endembed %}