Baris Usakli 12 years ago
commit c9a3fac654

@ -1,4 +1,6 @@
.footer-stats {
display: none;
.stats-card {
text-align: center;

@ -1,7 +1,7 @@
(function (module) {
var config = {},
templates,
fs = null,
@ -56,7 +56,7 @@
template.parse = parse;
template.blocks = {};
return template;
return template;
};
function loadTemplates(templatesToLoad) {
@ -75,7 +75,7 @@
template.prototype.file = file;
template.prototype.parse = parse;
template.prototype.html = String(html);
global.templates[file] = new template;
loaded--;
@ -89,12 +89,10 @@
jQuery.when(jQuery.getJSON(RELATIVE_PATH + '/templates/config.json'), jQuery.getJSON(RELATIVE_PATH + '/api/get_templates_listing')).done(function(config_data, templates_data) {
config = config_data[0];
available_templates = templates_data[0];
console.log(config, available_templates);
templates.ready();
});
}
if (fs === null) loadClient();
else loadServer();
}
@ -114,7 +112,7 @@
}
return '';
}
templates.load_template = function(callback, url, template) {
var location = document.location || window.location,
@ -125,11 +123,11 @@
var tpl_url = templates.get_custom_map(api_url.split('?')[0]);
var trimmed = api_url;
if(!tpl_url) {
tpl_url = templates.getTemplateNameFromUrl(api_url);
}
var template_data = null;
@ -149,15 +147,15 @@
template.prototype.blocks = {};
templates[tpl_url] = new template;
parse_template();
});
} else {
parse_template();
}
}());
(function() {
jQuery.get(API_URL + api_url, function(data) {
@ -174,18 +172,18 @@
parse_template();
});
}());
function parse_template() {
if (!templates[tpl_url] || !template_data) return;
if(typeof global !== "undefined")
template_data['relative_path'] = nconf.get('relative_path');
else
else
template_data['relative_path'] = RELATIVE_PATH;
document.getElementById('content').innerHTML = templates[tpl_url].parse(template_data);
jQuery('#content [template-variable]').each(function(index, element) {
var value = null;
@ -238,7 +236,7 @@
}
function getBlock(regex, block, template) {
data = template.match(regex);
data = template.match(regex);
if (data == null) return;
if (self.blocks && block !== undefined) self.blocks[block] = data[0];
@ -267,7 +265,7 @@
template = replace(namespace + d, '', template);
} else if (data[d].constructor == Array) {
namespace += d + '.';
var regex = makeRegex(d),
block = getBlock(regex, namespace.substring(0, namespace.length-1), template);
@ -286,7 +284,7 @@
template = setBlock(regex, result, template);
} else if (data[d] instanceof Object) {
namespace += d + '.';
regex = makeRegex(d),
block = getBlock(regex, namespace, template)
if (block == null) continue;
@ -305,7 +303,7 @@
}
return template;
})(data, "", template);
}

@ -3,7 +3,7 @@
<a href="/" itemprop="url"><span itemprop="title">Home</span></a>
</li>
<li class="active" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span itemprop="title">{category_name}</span>
<span itemprop="title">{category_name} <a target="_blank" href="../{category_id}.rss"><i class="icon-rss-sign"></i></a></span>
</li>
<div id="category_active_users"></div>
</ol>
@ -12,7 +12,6 @@
<button id="new_post" class="btn btn-primary btn-lg {show_topic_button}">New Topic</button>
<div class="inline-block pull-right">
<a target="_blank" href="../{category_id}.rss"><i class="icon-rss-sign icon-2x"></i></a>&nbsp;
<a href="#" id="facebook-share"><i class="icon-facebook-sign icon-2x"></i></a>&nbsp;
<a href="#" id="twitter-intent"><i class="icon-twitter-sign icon-2x"></i></a>&nbsp;
<a href="#" id="google-share"><i class="icon-google-plus-sign icon-2x"></i></a>&nbsp;

@ -41,7 +41,7 @@
<div id="alert_window"></div>
<div class="container footer-stats">
<div id="footer" class="container footer-stats">
<div class="row">
<div class="col-md-3 col-xs-6">
<div class="stats-card well">
@ -64,9 +64,9 @@
</div>
</div>
</div>
</div>
<footer class="footer">Copyright &copy; 2013 <a target="_blank" href="http://www.nodebb.org">NodeBB</a> by <a target="_blank" href="https://github.com/psychobunny">psychobunny</a>, <a href="https://github.com/julianlam" target="_blank">julianlam</a>, <a href="https://github.com/barisusakli" target="_blank">barisusakli</a> from <a target="_blank" href="http://www.designcreateplay.com">designcreateplay</a></footer>
<footer class="footer">Copyright &copy; 2013 <a target="_blank" href="http://www.nodebb.org">NodeBB</a> by <a target="_blank" href="https://github.com/psychobunny">psychobunny</a>, <a href="https://github.com/julianlam" target="_blank">julianlam</a>, <a href="https://github.com/barisusakli" target="_blank">barisusakli</a> from <a target="_blank" href="http://www.designcreateplay.com">designcreateplay</a></footer>
</div>
<script>
$.getScript(RELATIVE_PATH + '/src/forum/footer.js');

@ -6,7 +6,7 @@
<a href="/category/{category_slug}" itemprop="url"><span itemprop="title">{category_name}</span></a>
</li>
<li class="active" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span itemprop="title">{topic_name}</span>
<span itemprop="title">{topic_name} <a target="_blank" href="../{topic_id}.rss"><i class="icon-rss-sign"></i></a></span>
</li>
<div id="thread_active_users" class="hidden-xs"></div>
</ol>
@ -21,7 +21,9 @@
<a class="main-avatar" href="/users/{main_posts.userslug}">
<img src="{main_posts.picture}" align="left" class="img-thumbnail" width=150 height=150 /><br />
</a>
<h3><p id="topic_title_{main_posts.pid}" class="topic-title">{topic_name}</p></h3>
<h3>
<p id="topic_title_{main_posts.pid}" class="topic-title">{topic_name}</p>
</h3>
<div class="topic-buttons" >
<div class="btn-group">

Loading…
Cancel
Save