We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helpers to document:
"gravatar" @Override public CharSequence apply(String emailAddress, Options options) throws IOException { Boolean secure = options.hash("secure", false); if(emailAddress == null){ return secure ? SECURE_DEFAULT_GRAVATAR_URL : DEFAULT_GRAVATAR_URL; } Integer s = options.hash("size"); String d = options.hash("default"); String f = options.hash("forcedefault"); String r = options.hash("rating");
"math" saasquatch.utils.thirdparty.Expression
private static final String DEFAULT_CHARSET = "UTF-8"; private static final String DEFAULT_SPACING = "+"; public static final String NAME = "urlencode"; @Override public CharSequence apply(String content, Options options) throws IOException { String charset = options.hash("charset", DEFAULT_CHARSET); String space = options.hash("space", DEFAULT_SPACING); String ret = URLEncoder.encode(content, charset); if(!space.equals(DEFAULT_SPACING)) { ret = ret.replace(DEFAULT_SPACING, space); } return new Handlebars.SafeString(ret); }
private final String cdnDomain; private final String themeId; public AssetHelper(String themeId, String cdnDomain) { this.themeId = themeId; this.cdnDomain = cdnDomain; } @Override public CharSequence apply(String fileUrl, Options options) { Context rootContext = HandlebarsFactoryImpl.getRootContext(options); String assetVersion = String.valueOf(rootContext.get("assetVersion")); Boolean isSecureUrl = Boolean.parseBoolean(String.valueOf(rootContext.get("isSecureUrl"))); String ret = Cdn.getResourceAt("/theme/" + themeId + "/assets/" + assetVersion + "/" + fileUrl, cdnDomain, isSecureUrl); return new Handlebars.SafeString(ret); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Helpers to document:
Gravatar:
Math
UrlEncode
Asset Helper
The text was updated successfully, but these errors were encountered: