mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 10:17:15 +02:00
dynamic title for settings pages
This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
background: #fff;
|
||||
font-size: 14px;
|
||||
|
||||
h1 {
|
||||
font-size: 35px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,11 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
|
||||
};
|
||||
|
||||
Settings.populateTOC = function() {
|
||||
var title = ajaxify.currentPage
|
||||
.replace('admin/settings/', '')
|
||||
.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
|
||||
|
||||
$('#settings-title').text(title + ' Settings');
|
||||
$('.settings-header').each(function() {
|
||||
var header = $(this).text(),
|
||||
anchor = header.toLowerCase().replace(/ /g, '-').trim();
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
<!-- IMPORT admin/settings/header.tpl -->
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
Contents
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<nav class="section-content">
|
||||
<ul></ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-2 settings-header">
|
||||
Site Settings
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
<div class="settings">
|
||||
<div class="settings">
|
||||
<h1 id="settings-title">General Settings</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
Contents
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<nav class="section-content">
|
||||
<ul></ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user