File: test.mustache.fold

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (115 lines) | stat: -rw-r--r-- 5,167 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<beginfold id='1'><!--</beginfold id='1'> Mustache / Handlebars / Ractive template <endfold id='1'>--></endfold id='1'>
<beginfold id='2'><!DOCTYPE</beginfold id='2'> html<endfold id='2'>></endfold id='2'>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>{{title}}</title>
    </head>
    <beginfold id='1'><!--</beginfold id='1'> CSS <endfold id='1'>--></endfold id='1'>
    <beginfold id='3'><style</beginfold id='3'>>
        <beginfold id='4'>/*</beginfold id='4'> Mustache variable support in CSS is incomplete <endfold id='4'>*/</endfold id='4'>
        {{mustache}}
        [ {{other}} ]
        body <beginfold id='5'>{</beginfold id='5'>
            {{{other}}}
            font-size: 15pt;
            font-family: Verdana;
        <endfold id='5'>}</endfold id='5'>
    <endfold id='3'></style</endfold id='3'>>
    <beginfold id='1'><!--</beginfold id='1'> JavaScript <endfold id='1'>--></endfold id='1'>
    <beginfold id='6'><script</beginfold id='6'>>
        var foo = {{bar}};
        `template {{foo}} ${ var a = {{b}} }`
    <endfold id='6'></script</endfold id='6'>>

    <body>
    <beginfold id='7'>{{#movie</beginfold id='7'>}}
        <beginfold id='8'><div</beginfold id='8'>>
            <h1>{{title}}</h1>
            <img src="{{poster}}" alt="{{title}}"/>
        <endfold id='8'></div</endfold id='8'>>
        <beginfold id='8'><div</beginfold id='8'>>
            Rating - {{ratings.critics_rating}}
        <endfold id='8'></div</endfold id='8'>>
    <endfold id='7'>{{/movie}}</endfold id='7'>
    <beginfold id='7'>{{^movie</beginfold id='7'>}}
        <beginfold id='8'><div</beginfold id='8'>>
            Movie Does Not Exist :(
        <endfold id='8'></div</endfold id='8'>>
    <endfold id='7'>{{/movie}}</endfold id='7'>
    <beginfold id='9'>{{!</beginfold id='9'> this is a comment TODO ALERT <endfold id='9'>}}</endfold id='9'>

    This is a partial {{> partial1 }}
    <beginfold id='7'>{{#block</beginfold id='7'>
        param=foo
        param2=bar}}
        {{block foo=bar}}
    <endfold id='7'>{{/block}}</endfold id='7'>

    <beginfold id='1'><!--</beginfold id='1'> Handlebars <endfold id='1'>--></endfold id='1'>

    <beginfold id='7'>{{#list</beginfold id='7'> people}}{{firstName}} {{lastName}}<endfold id='7'>{{/list}}</endfold id='7'>
    <beginfold id='7'>{{#noop</beginfold id='7'>}}{{body}}<endfold id='7'>{{/noop}}</endfold id='7'>
    <beginfold id='7'>{{#with</beginfold id='7'> story}}
        <beginfold id='8'><div</beginfold id='8'> class="intro">{{{intro}}}<endfold id='8'></div</endfold id='8'>>
        <beginfold id='8'><div</beginfold id='8'> class="body">{{{body}}}<endfold id='8'></div</endfold id='8'>>
    <endfold id='7'>{{/with}}</endfold id='7'>
    <beginfold id='7'>{{#each</beginfold id='7'> comments}}
        <beginfold id='8'><div</beginfold id='8'> class="comment">
            <h2>{{subject}}</h2>
            {{{body}}}
        <endfold id='8'></div</endfold id='8'>>
    <endfold id='7'>{{/each}}</endfold id='7'>
    <beginfold id='7'>{{#list</beginfold id='7'> nav}}
        <a href="{{url}}">{{title}}</a>
    <endfold id='7'>{{/list}}</endfold id='7'>

    <beginfold id='10'>{{!--</beginfold id='10'> Conditionals <endfold id='10'>--}}</endfold id='10'>
    <beginfold id='7'>{{#if</beginfold id='7'> isActive}}
        <img src="star.gif" alt="Active">
    {{else if isInactive}}
        <img src="cry.gif" alt="Inactive">
    {{else}}
        <img src="cry.gif" alt="">
    <endfold id='7'>{{/if}}</endfold id='7'>

    <beginfold id='10'>{{!--</beginfold id='10'> Escaping <endfold id='10'>--}}</endfold id='10'>
    \{{escaped}}
    <beginfold id='11'>{{{{raw}}}}</beginfold id='11'>
        {{escaped}}
    <endfold id='11'>{{{{/raw}}}}</endfold id='11'>

    <beginfold id='10'>{{!--</beginfold id='10'> Whitespace Control <endfold id='10'>--}}</endfold id='10'>
    <beginfold id='7'>{{#each</beginfold id='7'> nav ~}}
        <a href="{{url}}">
            <beginfold id='7'>{{~#if</beginfold id='7'> test}}
                {{~title}}
            {{~^~}}
                Empty
            {{~/if~<endfold id='7'>}}</endfold id='7'>
        </a>
    <endfold id='7'>{{~/each}}</endfold id='7'>

    <beginfold id='10'>{{!--</beginfold id='10'> Helpers <endfold id='10'>--}}</endfold id='10'>
    {{link "See more..." story.url}}
    {{log "Look at me!" level="error"}}

    <beginfold id='10'>{{!--</beginfold id='10'> Partial <endfold id='10'>--}}</endfold id='10'>
    {{> myPartial name=../name }}
    <beginfold id='7'>{{#> myPartial</beginfold id='7'> }}
        Failover content
    <endfold id='7'>{{/myPartial}}</endfold id='7'>
    <beginfold id='7'>{{#*inline</beginfold id='7'> "myPartial"}}
        My Content
    <endfold id='7'>{{/inline}}</endfold id='7'>
    <beginfold id='7'>{{#each</beginfold id='7'> children}}
        {{> myPartial}}
    <endfold id='7'>{{/each}}</endfold id='7'>

    <beginfold id='1'><!--</beginfold id='1'> Delimiters in tags (folding) <endfold id='1'>--></endfold id='1'>
    word<beginfold id='8'><div</beginfold id='8'>>word

    word<endfold id='8'></div</endfold id='8'>>word

    </body>
</html>