UNPKG

grunt-tmod-syd

Version:
7 lines 2.96 kB
/*TMODJS:{"version":"1.0.0"}*/ !function(a){function b(a,b){return(/string|function/.test(typeof b)?i:h)(a,b)}function c(a,b){return"string"!=typeof a&&(b=typeof a,"number"===b?a+="":a="function"===b?c(a.call(a)):""),a}function d(a){return l[a]}function e(a){return c(a).replace(/&(?![\w#]+;)|[<>"']/g,d)}function f(a,b){if(m(a))for(var c=0,d=a.length;d>c;c++)b.call(a,a[c],c,a);else for(c in a)b.call(a,a[c],c)}function g(a,b){var c=/(\/)[^/]+\1\.\.\1/,d=("./"+a).replace(/[^/]+$/,""),e=d+b;for(e=e.replace(/\/\.\//g,"/");e.match(c);)e=e.replace(c,"/");return e}function h(a,c){var d=b.get(a)||j({filename:a,name:"Render Error",message:"Template not found"});return c?d(c):d}function i(b,c){if("string"==typeof c){var d=c;c=function(){return new a(d)}}var e=k[b]=function(a){try{return new c(a,b)+""}catch(d){return j(d)()}};return e.prototype=c.prototype=n,e.toString=function(){return c+""},e}function j(a){var b="{Template Error}",c=a.stack||"";if(c)c=c.split("\n").slice(0,2).join("\n");else for(var d in a)c+="<"+d+">\n"+a[d]+"\n\n";return function(){return"object"==typeof console&&console.error(b+"\n\n"+c),b}}var k=b.cache={},a=this.String,l={"<":"&#60;",">":"&#62;",'"':"&#34;","'":"&#39;","&":"&#38;"},m=Array.isArray||function(a){return"[object Array]"==={}.toString.call(a)},n=b.utils={$helpers:{},$include:function(a,b,c){return a=g(c,a),h(a,b)},$string:c,$escape:e,$each:f},o=b.helpers=n.$helpers;b.get=function(a){return k[a.replace(/^\.\//,"")]},b.helper=function(a,b){o[a]=b},"function"==typeof define?define(function(){return b}):"undefined"!=typeof exports?module.exports=b:this.template=b,/*v:12*/ b("copyright","(c) 2013 "),/*v:24*/ b("index",function(b,c){"use strict";var d=this,e=(d.$helpers,function(a,e){e=e||b;var f=d.$include(a,e,c);return j+=f}),f=d.$escape,g=b.title,h=d.$each,i=b.list,j=(b.$value,b.$index,"");return e("./public/header"),j+=' <div id="main"> <h3>',j+=f(g),j+="</h3> <ul> ",h(i,function(a){j+=' <li><a href="',j+=f(a.url),j+='">',j+=f(a.title),j+="</a></li> "}),j+=" </ul> </div> ",e("./public/footer"),j+=" ",new a(j)}),/*v:11*/ b("public/footer",function(b,c){"use strict";var d=this,e=b.time,f=d.$escape,g=function(a,e){e=e||b;var f=d.$include(a,e,c);return h+=f},h="";return h+='<div id="footer"> ',e&&(h+=" <p class='time'>",h+=f(e),h+="</p> "),h+=" ",g("../copyright"),h+=" </div>",new a(h)}),/*v:11*/ b("public/header",function(b,c){"use strict";var d=this,e=function(a,e){e=e||b;var g=d.$include(a,e,c);return f+=g},f="";return f+=' <div id="header"> ',e("./logo"),f+=' <ul id="nav"> <li><a href="http://www.qq.com">首页</a></li> <li><a href="http://news.qq.com/">新闻</a></li> <li><a href="http://pp.qq.com/">图片</a></li> <li><a href="http://mil.qq.com/">军事</a></li> </ul> </div> ',new a(f)}),/*v:11*/ b("public/logo",' <h1 id="logo"> <a href="http://www.qq.com"> <img width=\'134\' height=\'44\' src="http://mat1.gtimg.com/www/images/qq2012/qqlogo_1x.png" alt="腾讯网" /> </a> </h1> ')}();