Created
September 7, 2016 15:17
-
-
Save Christo44/1edc7adaed9d1a5b66b1c4c44705470d to your computer and use it in GitHub Desktop.
Create list if specific values are present, & omit empty values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-var books= {"books": [""]} | |
mixin component(name, books) | |
for book in books | |
case book | |
when "l" | |
-var p= "large" | |
when "m" | |
-var p= "medium" | |
when "s" | |
-var p= "small" | |
default | |
-var p= "large" | |
div(class= book) | |
p= p | |
+component("name", ["l", "m"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment