main header title + better logic

v1.18.x
psychobunny 10 years ago
parent 744a7d4210
commit c6282e289a

@ -6,6 +6,15 @@
margin-bottom: 50px; margin-bottom: 50px;
font-size: 16px; font-size: 16px;
#main-page-title {
position: absolute;
left: 48px;
bottom: 17px;
color: #aaa;
font-size: 47px;
font-weight: 300;
}
> ul { > ul {
list-style-type: none; list-style-type: none;
padding: 0px; padding: 0px;

@ -75,6 +75,8 @@
menu menu
.parent().addClass('active') .parent().addClass('active')
.parents('.menu-item').addClass('active'); .parents('.menu-item').addClass('active');
$('#main-page-title').text(menu.text() + (menu.parents('.menu-item').children('a').text() === 'Settings' ? ' Settings' : ''));
} }
}); });
} }

@ -9,11 +9,6 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
}; };
Settings.populateTOC = function() { 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() { $('.settings-header').each(function() {
var header = $(this).text(), var header = $(this).text(),
anchor = header.toLowerCase().replace(/ /g, '-').trim(); anchor = header.toLowerCase().replace(/ /g, '-').trim();

@ -1,4 +1,5 @@
<nav class="header"> <nav class="header">
<h1 id="main-page-title"></h1>
<ul id="main-menu"> <ul id="main-menu">
<li class="menu-item"> <li class="menu-item">
<a href="{relative_path}/admin/general/dashboard">Dashboard</a> <a href="{relative_path}/admin/general/dashboard">Dashboard</a>

@ -1,6 +1,4 @@
<div class="settings"> <div class="settings">
<h1 id="settings-title"></h1>
<div class="row"> <div class="row">
<div class="col-xs-2"> <div class="col-xs-2">
Contents Contents

Loading…
Cancel
Save