How to use the marko.c function in marko

To help you get started, we’ve selected a few marko examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marko-js / marko / test / fixtures / templates / compiler / hello-dynamic / expected.js View on Github external
var str = __helpers.s,
      empty = __helpers.e,
      notEmpty = __helpers.ne,
      escapeXml = __helpers.x;

  return function render(data, out) {
    out.w('Hello ' +
      escapeXml(data.name) +
      '! Hello ' +
      str(data.name) +
      '! Hello ' +
      str(data.missing) +
      '!');
  };
}
(module.exports = require("marko").c(__filename)).c(create);
github marko-js / marko / test / fixtures / compiler / autotest / custom-tag / expected.js View on Github external
function create(__helpers) {
  var str = __helpers.s,
      empty = __helpers.e,
      notEmpty = __helpers.ne,
      escapeXml = __helpers.x,
      __loadTag = __helpers.t,
      test_hello = __loadTag(require("../../../taglib/test-hello/renderer"));

  return function render(data, out) {
    test_hello({
        name: "World"
      }, out);
  };
}

(module.exports = require("marko").c(__filename)).c(create);
github marko-js / marko / test / fixtures / compiler / autotest / invoke / expected.js View on Github external
function create(__helpers) {
  var str = __helpers.s,
      empty = __helpers.e,
      notEmpty = __helpers.ne,
      escapeXml = __helpers.x;

  return function render(data, out) {
    data.renderBody(out);
  };
}

(module.exports = require("marko").c(__filename)).c(create);
github marko-js / marko / test / fixtures / compiler / autotest / custom-tag-import-var / expected.js View on Github external
__loadTag = __helpers.t,
      test_import_var = __loadTag(require("../../../taglib/scanned-tags/test-import-var/renderer"));

  return function render(data, out) {
    test_import_var({
        name: "World",
        foo: data.foo,
        bar: data.bar,
        renderBody: function renderBody(out) {
          out.w("This is the body content");
        }
      }, out);
  };
}

(module.exports = require("marko").c(__filename)).c(create);
github marko-js / marko / test / fixtures / codegen / autotest / templateRoot-prependChild / expected.js View on Github external
function create(__helpers) {
  var str = __helpers.s,
      empty = __helpers.e,
      notEmpty = __helpers.ne,
      escapeXml = __helpers.x;

  return function render(data, out) {
    var foo = "bar";

    out.w("<div></div>");
  };
}

(module.exports = require("marko").c(__filename)).c(create);
github marko-js / marko / test / fixtures / compiler / autotest / nested-tags / expected.js View on Github external
renderBody: function renderBody(out) {
            out.w("Body content");
          }
        }, out, test_nested_tags_overlay0);

      test_nested_tags_overlay_footer({
          className: "my-footer",
          renderBody: function renderBody(out) {
            out.w("Footer content");
          }
        }, out, test_nested_tags_overlay0);
    });
  };
}

(module.exports = require("marko").c(__filename)).c(create);
github bitinn / animeshot / templates / main.marko.js View on Github external
function create(__helpers) {
  var str = __helpers.s,
      empty = __helpers.e,
      notEmpty = __helpers.ne,
      escapeXml = __helpers.x;

  return function render(data, out) {
    out.w("<title>测试页面</title><div class="\&quot;main-upload\&quot;"><form id="\&quot;upload-dropzone\&quot;" class="\&quot;dropzone\&quot;" enctype="\&quot;multipart/form-data\&quot;" method="\&quot;post\&quot;" action="\&quot;api/files\&quot;"><div class="\&quot;fallback\&quot;"><input type="\&quot;file\&quot;" name="\&quot;file\&quot;"><button type="\&quot;submit\&quot;">Upload</button></div></form><div id="\&quot;upload-shot\&quot;" class="\&quot;upload-shot\&quot;"></div></div><div class="\&quot;main-search\&quot;"><form action="\&quot;api/search\&quot;"><div class="\&quot;search-box\&quot;"><input value="" type="\&quot;search\&quot;" name="\&quot;search\&quot;"></div></form></div>");
  };
}

(module.exports = require("marko").c(__filename)).c(create);
github ax5ui / ax5ui-kernel / src / ax5docs / _src_ax5core / index.html.js View on Github external
out.w('\n    \n  ');
            });

          out.w('\n');
        },
        "*": {
          "projectName": data.project_name,
          "pageTitle": "home",
          "bodyStyle": "main"
        }
      });

    out.w('\n');
  };
}
(module.exports = require("marko").c(__filename)).c(create);
github ax5ui / ax5ui-kernel / src / ax5docs / _src_ax5core / info / ax5-info.html.js View on Github external
function(out) {
              out.w('\n\n  ');
            });

          out.w('\n');
        },
        "*": {
          "projectName": data.project_name,
          "pageTitle": "ax5.info",
          "pageId": "ax5.info",
          "bodyStyle": "style-sub"
        }
      });
  };
}
(module.exports = require("marko").c(__filename)).c(create);
github bitinn / animeshot / templates / home.marko.js View on Github external
".300.jpg\" alt=\"300px\"&gt;<blockquote class="\&quot;preview-quote\&quot;"><p>" +
        escapeXml(shot.text) +
        "</p><cite><a href="\&quot;shots/&quot;">图片页面</a> <a href="\&quot;https://whatanime.ga/?url=&quot;" rel="\&quot;nofollow\&quot;">查找出处</a></cite></blockquote>");
    });

    out.w("<div><p><a class="\&quot;btn\&quot;" href="\&quot;/recent\&quot;">更多近期上传</a></p></div>");
  };
}

(module.exports = require("marko").c(__filename)).c(create);