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.
|
-- | Global toolbar/heading area.
|
||||||
topbar :: ViewData -> HtmlUrl AppRoute
|
topbar :: ViewData -> HtmlUrl AppRoute
|
||||||
topbar VD{..} = [hamlet|
|
topbar VD{..} = [hamlet|
|
||||||
<div#spacer .col-md-4 .col-sm-4 .col-xs-2>
|
<div#spacer .#{showsm} .#{showmd} .col-xs-2>
|
||||||
<h1>
|
<h1>
|
||||||
<button .visible-xs .btn .btn-default type="button" data-toggle="offcanvas">
|
<button .visible-xs .btn .btn-default type="button" data-toggle="offcanvas">
|
||||||
<span .glyphicon .glyphicon-align-left .tgl-icon>
|
<span .glyphicon .glyphicon-align-left .tgl-icon>
|
||||||
@ -56,6 +56,8 @@ topbar VD{..} = [hamlet|
|
|||||||
|]
|
|]
|
||||||
where
|
where
|
||||||
title = takeFileName $ journalFilePath j
|
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.
|
-- | The sidebar used on most views.
|
||||||
sidebar :: ViewData -> HtmlUrl AppRoute
|
sidebar :: ViewData -> HtmlUrl AppRoute
|
||||||
|
|||||||
@ -223,6 +223,7 @@ function addformDeletePosting() {
|
|||||||
function sidebarToggle() {
|
function sidebarToggle() {
|
||||||
$('#sidebar-menu').toggleClass('col-md-4 col-sm-4 col-any-0');
|
$('#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');
|
$('#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');
|
$.cookie('showsidebar', $('#sidebar-menu').hasClass('col-any-0') ? '0' : '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user