From bb754d884934dd966ae49dc8ab44c50c19efd69b Mon Sep 17 00:00:00 2001 From: Alex Kit Date: Wed, 12 Feb 2014 20:37:47 +0100 Subject: [PATCH] .mask support for Mask --- lib/linguist/languages.yml | 7 +++++ samples/Mask/view.mask | 61 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 samples/Mask/view.mask diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 6c692b9b..0ae56cd6 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1020,6 +1020,13 @@ Markdown: - .mkdown - .ron +Mask: + type: markup + lexer: SCSS + color: "#f97732" + ace_mode: scss + primary_extension: .mask + Matlab: type: programming color: "#bb92ac" diff --git a/samples/Mask/view.mask b/samples/Mask/view.mask new file mode 100644 index 00000000..521273e6 --- /dev/null +++ b/samples/Mask/view.mask @@ -0,0 +1,61 @@ + +// HTML Elements +header { + + img .logo src='/images/~[currentLogo].png' alt=logo; + + h4 > 'Bar View' + + if (currentUser) { + + .account > + a href='/acount' > + 'Hello, ~[currentUser.username]' + } +} + +.view { + ul { + + // Iteration + for ((user, index) of users) { + + li.user data-id='~[user.id]' { + + // interpolation + .name > '~[ user.username ]' + + // expression + .count > '~[: user.level.toFixed(2) ]' + + // util + /* Localization sample + * lastActivity: "Am {0:dd. MM} war der letzte Eintrag" + */ + .date > '~[ L: "lastActivity", user.date]' + } + } + } + + // Component + :countdownComponent { + input type = text > + :dualbind value='number'; + + button x-signal='click: countdownStart' > 'Start'; + + h5 { + '~[bind: number]' + + :animation x-slot='countdownStart' { + @model > 'transition | scale(0) > scale(1) | 500ms' + @next > 'background-color | red > blue | 2s linear' + } + } + } +} + +footer > :bazCompo { + + 'Component generated at ~[: $u.format($c.date, "HH-mm") ]' +} \ No newline at end of file