data/TWiki/PatternSkinCssCookbookNoTopBar.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
colas@0
     1
%META:TOPICINFO{author="TWikiContributor" date="1130024123" format="1.1" version="3"}%
colas@0
     2
colas@0
     3
---+!! PatternSkinCssCookbook Recipe: Hide the top bar
colas@0
     4
colas@0
     5
*This recipe shows how to hide the top bar and to put the logo in the left bar.*
colas@0
     6
colas@0
     7
<div class="twikiHelp">
colas@0
     8
This line loads the extra style definition:
colas@0
     9
<verbatim>
colas@0
    10
   * Set USERSTYLEURL=%ATTACHURL%/notopbar.css
colas@0
    11
</verbatim>
colas@0
    12
You can write this line in %SYSTEMWEB%.TWikiPreferences, in WebPreferences, in your user topic or on a single page.
colas@0
    13
</div>
colas@0
    14
colas@0
    15
Add the dynamic variable link to the logo image to the topic text:
colas@0
    16
<verbatim>
colas@0
    17
<style type="text/css" media="all">
colas@0
    18
#patternLeftBar { background-image:url("%PUBURLPATH%/%WEB%/%WEBPREFSTOPIC%/logo.gif"); }
colas@0
    19
</style>
colas@0
    20
</verbatim>
colas@0
    21
<div class="twikiHelp">
colas@0
    22
%ICON{info}% If you don't write this overloading style in a template and use an external =.css= file, you need to set the image to the absolute url:
colas@0
    23
<pre>
colas@0
    24
&lt;style type="text/css" media="all">
colas@0
    25
#patternLeftBar { background-image:url("<nop>%PUBURLPATH%/<nop>%WEB%/<nop>%WEBPREFSTOPIC%/logo.gif"); }
colas@0
    26
&lt;/style>
colas@0
    27
</pre>
colas@0
    28
You can always write a =&lt;style>= in a topic - all current browsers support this - but the page won't validate as valid XHTML.
colas@0
    29
</div>
colas@0
    30
colas@0
    31
<style type="text/css" media="all">
colas@0
    32
#patternLeftBar { background-image:url("%PUBURLPATH%/%WEB%/%WEBPREFSTOPIC%/logo.gif"); }
colas@0
    33
</style>
colas@0
    34
colas@0
    35
colas@0
    36
%META:FILEATTACHMENT{name="notopbar.css" attachment="notopbar.css" attr="" comment="" date="1130024123" path="notopbar.css" size="395" stream="notopbar.css" user="TWikiContributor" version="1"}%