mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
Add new ACP option to upload Touch Icon, #3668
Also added a number of fixes for mobile enhancements, such as serving a manifest.json file for Android devices, and serving proper link tags for all uploaded touch icons. This commit also creates a new template helper for link tags.
This commit is contained in:
@@ -40,6 +40,16 @@
|
||||
return '<meta ' + name + property + content + '/>';
|
||||
};
|
||||
|
||||
helpers.buildLinkTag = function(tag) {
|
||||
var link = tag.link ? 'link="' + tag.link + '" ' : '',
|
||||
rel = tag.rel ? 'rel="' + tag.rel + '" ' : '',
|
||||
type = tag.type ? 'type="' + tag.type + '" ' : '',
|
||||
href = tag.href ? 'href="' + tag.href + '" ' : '',
|
||||
sizes = tag.sizes ? 'sizes="' + tag.sizes + '" ' : '';
|
||||
|
||||
return '<link ' + link + rel + type + sizes + href + '/>';
|
||||
};
|
||||
|
||||
helpers.stringify = function(obj) {
|
||||
// Turns the incoming object into a JSON string
|
||||
return JSON.stringify(obj).replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">").replace(/"/g, '"');
|
||||
|
||||
Reference in New Issue
Block a user