Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...
View   r3  >  r2  ...
PatternSkinCustomization 3 - 28 Aug 2004 - Main.ArthurClemens
Line: 1 to 1
 

Customization of PatternSkin

This page describes ways to change the layout, fonts and colors of PatternSkin.

Added:
>
>

Your own TWiki look

You can easily create your own TWiki look by attaching modified css files to your home page:

  • If you want to change the layout of the page, download layout.css from PatternSkin
  • If you want to change the spacing or colors, download style.css from PatternSkin
  • modify the CSS in either style sheet, using tips from this page
  • attach your modified layout.css and/or style.css to your home page
  • as shown below, add the USERLAYOUTURL and USERSTYLEURL settings to your home page
   * Personal TWiki.PatternSkin CSS settings
      * Set USERLAYOUTURL = %PUBURL%/%MAINWEB%/%WIKINAME%/layout.css
      * Set USERSTYLEURL = %PUBURL%/%MAINWEB%/%WIKINAME%/style.css
 

Screen parts

The PatternSkin view template uses four screen parts:

Line: 40 to 54
 The personal left bar block is formatted like the rest of the left bar.
Added:
>
>

Putting the left bar at the right

If you have a low screen resolution of say, 640 by 480 pixels, it can be useful to put the left bar "out of the way", at the right side of the page - at the cost of a horizontal scroll bar to access the left (now right) bar. This CSS does this:

Add this to layout.css:
<-- /* -->
.twikiMain {
   margin-left:0px;
}
.twikiLeftBar {
   margin-left:100%;
}
.twikiBottomBar {
   margin-left:1em;
   margin-right:0;
   padding:0;
}
<-- */ -->
Add this to style.css:
<-- /* -->
.twikiMain {
   padding-left:1em;
   padding-right:1em;
}
.twikiBottomBarContents {
   padding-left:0em;
}
<-- */ -->

This CSS is also attached to this topic, LowRes.css. To use this style, add this to your home page:

   * Personal TWiki.PatternSkin CSS settings
      * Set USERLAYOUTURL = %PUBURL%/%SYSTEMWEB%/PatternSkinCustomization/LowRes.css
 

Bottom bar

The bottom bar contains the copyright disclaimer, but may contain other information, perhaps a web list.

Line: 108 to 163
 
<-- */ -->
Changed:
<
<
-- TWiki:Main.ArthurClemens - 15 Aug 2004
>
>

Colors

                                                

To create a customised palette of colors, see PatternSkinPalette? .

Tables

Tables in topic text

If you have TablePlugin installed, tables in topics take on the properties from TABLEATTRIBUTES. Without TablePlugin (if not installed, or disabled in TWikiPreferences under DISABLEDPLUGINS), the tables have a default appearance that is hardcoded in Render.pm. Styles of topic text tables are not set in a style sheet. If you want to have control over the design of tables, for instance if you work with a style guide, you should add table styles under .twikiTopic. See for an example below.

Topic text table example

This is an example css to give tables in topic text a similar appearance. This will override settings in TablePlugin. This code should be added below the other .twikiTopic code in style.css:

<-- /* -->
.twikiTopic table {
   border-collapse:collapse;
   padding:0px;
   border-spacing:0px;
   empty-cells:show;
   border:0px;
}
.twikiTopic table th {
   background-color:#ccc;
   padding:0.5em 1em;
}
.twikiTopic table td {
   border:1px solid #eee;
}
/* override hardcoded font color */
.twikiTopic table font {
   color:#1e5bbd;
}
.twikiTopic table th a:link,
.twikiTopic table th a:visited {
   color:#1e5bbd;
   text-decoration:none;
}
/* don't show hover background color because we have a table header background */
.twikiTopic table th a:hover {
   background-color:transparent;
   text-decoration:underline;
   border-width:1px;
}
/* no underline if a sort indicator (line) is displayed */
.twikiTopic table th.twikiSortedDescendingCol a:hover,
.twikiTopic table th.twikiSortedAscendingCol a:hover {
   text-decoration:none;
}
/* hide sort icons */
.twikiTopic table th img,
.twikiTopic table th a:link img,
.twikiTopic table th a:visited img {
   display:none;
}
<-- */ -->

Attachment table, Form table

The appearance of the form table and the attachment table are set in style.css under .twikiForm and .twikiAttachments. Text in these tables is set to wrap, so often the dates are wrapped to two lines. If you prefer to have text on one line and are not disturbed by an extra wide attachment table (or when you screen resolution is big enough), add this code to .twikiAttachments td, .twikiForm td {:

<-- /* -->
   white-space:nowrap;
<-- */ -->

Other templates

Other templates than view use the style .twikiVersatileTable for, as the name says, tables with versatile functions. Versatile tables appear a little diffent in each template page (differences are created using multiple classes). Versatile tables are mostly used to format forms to highlight important parts and to dim less important parts. See style.css for specific settings for each template.

-- TWiki:Main.ArthurClemens - 28 Aug 2004

 
Added:
>
>
META FILEATTACHMENT attr="" comment="CSS to put the left bar at the right, with horizontal scroll bar" date="1093734017" name="LowRes.css" path="LowRes.css" size="287" user="ArthurClemens" version="1.1"

Revision 3r3 - 28 Aug 2004 - 22:59:17 - ArthurClemens?
Revision 2r2 - 17 Aug 2004 - 04:44:48 - PeterThoeny?
This site is powered by the TWiki collaboration platform.
All material on this collaboration platform is the property of the contributing authors.
All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4.
Syndicate this site RSSATOM