mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 18:26:15 +01:00
clean up client side + config.json
This commit is contained in:
19
public/src/templates.js
Normal file
19
public/src/templates.js
Normal file
@@ -0,0 +1,19 @@
|
||||
var templates = {};
|
||||
|
||||
function loadTemplates(templatesToLoad) {
|
||||
var timestamp = new Date().getTime();
|
||||
|
||||
for (var t in templatesToLoad) {
|
||||
(function(template) {
|
||||
$.get('templates/' + template + '.tpl?v=' + timestamp, function(html) {
|
||||
templates[template] = html;
|
||||
});
|
||||
}(templatesToLoad[t]));
|
||||
}
|
||||
}
|
||||
|
||||
function templates_init() {
|
||||
loadTemplates(['register', 'home', 'login']);
|
||||
}
|
||||
|
||||
templates_init();
|
||||
Reference in New Issue
Block a user