<?php if (!defined('PmWiki')) exit();
/* *******************************************************************
** skin.php
**  Copyright 2005 V.Krishn (vkrishn@insteps.net)
**  This file is part of Notebook-nt Skin for PmWiki;
**  You can redistribute it and/or modify it under the terms of the 
**  GNU General Public License as published by the  Free Software 
**  Foundation; either version 2 of the License, or (at your option) 
**  any later version. See pmwiki.php for full details.
******************************************************************* */

## To handle (:noleft:) and (:noright:) directives on pages,
Markup('noleft', 'directives','/\\(:noleft:\\)/ei',"skin_notebook_nt_setNoSidebar('left')");
Markup('noright', 'directives','/\\(:noright:\\)/ei',"skin_notebook_nt_setNoSidebar('right')");
function skin_notebook_nt_setNoSidebar($side='left') {
  global $HTMLStylesFmt;
  if($side === 'left') {
    SetTmplDisplay('PageLeftFmt',0);
  }
  if($side === 'right') {
    SetTmplDisplay('PageRightFmt',0);
  }
  $HTMLStylesFmt['skin_notebook_nt_setNoSidebar'] = "\n /* with no sidebar */
    .with_sb_left,.with_sb_right { background-color: none; }
    .sidebar-left { float:none; border-right:0px solid #cccccc; }
    .sidebar-right { float:none; border-left:0px solid #cccccc; }
    .main-container-right { margin-left:0px; border-left:0px solid #cccccc; }
    .main-container-left { margin-right:0px; border-right:0px solid #cccccc; }
    \n
  ";
}
