Title now moves with sidebar
This commit is contained in:
parent
cb79e01880
commit
9dab7c4148
@ -46,7 +46,7 @@ hledgerLayout vd title content = do
|
||||
-- | Global toolbar/heading area.
|
||||
topbar :: ViewData -> HtmlUrl AppRoute
|
||||
topbar VD{..} = [hamlet|
|
||||
<div#spacer .col-md-4 .col-sm-4 .col-xs-2>
|
||||
<div#spacer .#{showsm} .#{showmd} .col-xs-2>
|
||||
<h1>
|
||||
<button .visible-xs .btn .btn-default type="button" data-toggle="offcanvas">
|
||||
<span .glyphicon .glyphicon-align-left .tgl-icon>
|
||||
@ -56,6 +56,8 @@ topbar VD{..} = [hamlet|
|
||||
|]
|
||||
where
|
||||
title = takeFileName $ journalFilePath j
|
||||
showmd = if showsidebar then "col-md-4" else "col-any-0" :: String
|
||||
showsm = if showsidebar then "col-sm-4" else "" :: String
|
||||
|
||||
-- | The sidebar used on most views.
|
||||
sidebar :: ViewData -> HtmlUrl AppRoute
|
||||
|
||||
@ -223,6 +223,7 @@ function addformDeletePosting() {
|
||||
function sidebarToggle() {
|
||||
$('#sidebar-menu').toggleClass('col-md-4 col-sm-4 col-any-0');
|
||||
$('#main-content').toggleClass('col-md-8 col-sm-8 col-md-12 col-sm-12');
|
||||
$('#spacer').toggleClass('col-md-4 col-sm-4 col-any-0');
|
||||
$.cookie('showsidebar', $('#sidebar-menu').hasClass('col-any-0') ? '0' : '1');
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user