Tags:
create new tag
, view all tags

FlexibleSkin: A flexible skin to TWiki.

This skin is not being maintained anymore, and thus it is deprecated. If you want to define a customized layout for your TWikiSite, consider using DakarRelease's VIEW_TEMPLATE feature (check TWiki.TWikiTemplates on your Dakar installation).

Goals

This project aims to build a flexible Skin to TWiki ...

  • making possible to change the look of a web simply by adding/removing/editing some special topics in the web, or changing the value of some special web-level variables;
  • making easier the task of translating the TWiki layout to other languages;

Comments about design, bugs and other implementation stuff about FlexibleSkin must be put in FlexibleSkinDev.

Variables

FlexibleSkin uses some variables (at global level -- -- for using FlexibleSkin globally, or at web level for using it on some web) to get some information for displaying. They are:

  • WEBTITLE : WEB's title(a name more descriptive that the web's name ...), that will be shown in the browser title bar, among other places ...
  • WEBBGCOLOR : TWiki predefined variable, will be used to "paint" the top and bottom bars in the default FlexibleSkin global layout. You can use it in your own layouts, to make possible to change the overall color for yout layout only changing this variable.

Special topics

These topics will serve as layout containers for the web: the content of each of them will be put at the final layout, each one in some predefined position. If the topic doesn't exist, no content will be put in that location of the layout.

When referencing the current topic being seen at the layout-part topic, remember to use the %INCLUDINGTOPIC% TWiki variable instead of %TOPIC%.

Let's see the defined special topics used by FlexibleSkin ...

FlexibleSkinStyleSheet

This topic will be printed at the HTML result of a page view, in the place reserved to that page's CSS stylesheet. It must contain a CSS stylesheet specification.

Is must begin and end with the verbatim tag (to prevent TWiki from putting HTML tags inside it), ant must have the STARTINCLUDE and the STOPINCLUDE directives, to prevent TWiki to put the verbatim tag in topics that are including FlexibleSkinStyleSheet .

Example of the desired content of the FlexibleSkinStyleSheet topic:

<verbatim>
%STARTINCLUDE%

/* CSS classes definition ... */

%STOPINCLUDE%
</verbatim>

FlexibleSkinLeftBar

This topic will be included at the left side of the layout, as a left-menu. To change font, colors and other stuff you must set a CSS class at the FlexibleSkinStyleSheet topic named TD.WebLeftBar .

FlexibleSkinRightBar

This topic will be included at the right side of the layout, as a right-menu. To change font, colors and other stuff you must set a CSS class at the FlexibleSkinStyleSheet topic named TD.WebRightBar .

FlexibleSkinTopBar

This topic will be included at the top of the layout, as a top-menu. To change font, colors and other stuff you must set a CSS class at the FlexibleSkinStyleSheet topic named TD.WebTopBar .

FlexibleSkinBottomBar

This topic will be included at the bottom of the layout, as a bottom-menu. To change font, colors and other stuff you must set a CSS class at the FlexibleSkinStyleSheet topic named TD.WebBottomBar .

FlexibleSkinTopicHeader

This topic will be included at the begin of the current topic's content, as a page header. It will use the same CSS style as the content of the topic, i.e., the CSS class TD.WebContent .

FlexibleSkinTopicFooter

This topic will be included at the end of the current topic's content, as a page footer. It will use the same CSS style as the content of the topic, i.e., the CSS class TD.WebContent .

FlexibleSkinPrintingHeader

This topic will be included at the end of the current topic's content, as a page footer, when it is shown with the FlexibleSkin's 'printable' skin(add a ?skin=globalFlexibleprint to the topic's URL if using FlexibleSkin globally, or ?skin=flexibleprint if using locally on some web). It will use the same CSS style as the content of the topic, i.e., the CSS class TD.WebContent .

FlexibleSkinPrintingFooter

This topic will be included at the end of the current topic's content, as a page footer, when it is shown with the FlexibleSkin's 'printable' skin(add a ?skin=globalFlexibleprint to the topic's URL if using FlexibleSkin globally, or ?skin=flexibleprint if using locally on some web). It will use the same CSS style as the content of the topic, i.e., the CSS class TD.WebContent .

Installing FlexibleSkin

Using Flexible Skin

Using FlexibleSkin globally with TWiki

If you want a flexible layout for your TWiki installation, and want it to be applied to all your webs, you can use this feature to do that. The instructions to do this setup are below.

Choosing this option will make FlexibleSkin get the layout topics and the variables used by it from the TWiki web. FlexibleSkin provides default layout topics in the TWiki web, trying to mimic the default TWiki skin, but you can change them -- add the other possible layout topics -- if you want. The default topics are:

Using FlexibleSkin locally on one web

This choice will apply FlexibleSkin to one specific, overriding the global SKIN variable and global layout topics. FlexibleSkin will get the layout topics and variables used by it from the web where you use this option.

Setting FlexibleSkin up

  1. First of all, think about the layout you want wink ;
  2. Set the variables used by FlexibleSkin, except the SKIN variable ...
    • ... in TWiki.TWikiPreferences, for using FlexibleSkin globally, or
    • ... in WebPreferences, for using FlexibleSkin locally on some web.
  3. Create/Edit the special topics that compose FlexibleSkin ...
    • ... in the TWiki web, for using FlexibleSkin globally, or
    • ... in your web, for using FlexibleSkin locally on some web.
  4. Test some topic to see if your layout is getting nice (perhaps the WebHome topic), appending to it's URL ...
  5. When it looks pretty, change the SKIN variable ...

Remarks:

  • FlexibleSkin doesn't include the topic controls(Edit, Attach, etc.) by default. Then, you must add the controls by yourself(or not, if you don't want them) to one of your special topics.
  • When upgrading from version 1 of FlexibleSkin, basically you must only rename yout CSS classes for the special topics, that dropped the "FlexibleSkin" prefix, and got and "Web" prefix.

Avaliable Translated Messages

There will be avaliable translated messages file versions, look for them at the attchments list at the end of this topic.

To translate FlexibleSkin, download the translated messages file, rename it to messages.flexible.tmpl, and put it in the place of that one in templates/ subdirectory of your TWiki installation directory.

CSS Example

These examples are for who needs a starting point on how to set CSS with FlexibleSkin. Some classes may appear a little redundant with all those element names, but experience with different browsers show that it's a good practice to do it, because CSS interpreting is not standard across the web browsers.

As a recommended reading, see the CSS 2 recomendation, at http//www.w3c.org/TR/CSS2. Also, there are an enormous ammount of material about CSS in the internet, you can easily find a lot of tutorials on CSS.

If you want to suggest some CSS example, please do it in FlexibleSkinDev.

Green links, nice font


/* Define the default font: */
BODY, TD, FONT, A, SPAN, P, LI, UL, BR, HR, TD, TH
  {
     font-family: Verdana, Helvetica, sans-serif, Arial;
     font-size:12px;
  }

/* make the hyperlinks appear in green ... */
A:link, A:visited
  {
    color: green;
  }

/* ... and become red when the mouse is over them: */
A:hover[href]
  {
    color: red;
  }

Skin Info

Description: Define new layouts for TWiki without shell access do the server and handle layout elements as colaborative content.
Screenshot: Click for full screen imageClick for full screen imageClick for full screen image
Base Name: flexible
Skin Author: TWiki:Main/AntonioTerceiro
Skin Version: 25 Sep 2004 (v2.3)
Change History:  
30 Nov 2004 fix to work with CairoRelease %INCLUDE% style (added warn="<nop/>") to INCLUDE's. Use FlexibeSkin-02Sep2004.zip
25 Sep 2004 adapted to new Skin template for work with 01Sep2004 and TWikiSkinBrowser, and added this Skin Info section
Dependencies:  
Skin Home: http://TWiki.org/cgi-bin/view/Plugins/FlexibleSkin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/FlexibleSkinDev

Note: The Description, Screenshot and Base Name rows are needed by the TWikiSkinBrowser

Related topic: TWikiSkins, TWikiSkinBrowser

-- AntonioTerceiro - 25 Sep 2004

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip FlexibleSkin-02Sep2004.zip r1 manage 22.6 K 2004-11-30 - 21:51 AntonioTerceiro fixed to use with CairoRelease (02Sep2004)
Compressed Zip archivezip FlexibleSkin-2.2.zip r1 manage 22.5 K 2003-10-02 - 16:04 AntonioTerceiro FlexibleSkin - version 2.2 (fixed default Top Bar)
Compressed Zip archivezip FlexibleSkin-2.3.zip r1 manage 701.7 K 2004-09-25 - 23:10 AntonioTerceiro FlexibleSkin - version 2.3
PNGpng fullscreen1.png r1 manage 116.9 K 2004-09-25 - 22:59 AntonioTerceiro Full screen 1 -- http://gavri.im.ufba.br
PNGpng fullscreen2.png r1 manage 117.2 K 2004-09-25 - 23:01 AntonioTerceiro Full screen 2 -- http://www.enec.org.br
PNGpng fullscreen3.png r1 manage 102.1 K 2004-09-25 - 23:01 AntonioTerceiro Full screen 3 -- http://dacomp.im.ufba.br
Unknown file formatfr messages.flexible.tmpl.fr r1 manage 1.3 K 2004-03-01 - 09:35 FrancoisGranger Message file translated to French (version 2.2)
Unknown file formatpt_BR messages.flexible.tmpl.pt_BR r1 manage 1.4 K 2002-09-19 - 20:32 AntonioTerceiro messages file, translated to brazilian portuguese
PNGpng screenshot1.png r1 manage 4.0 K 2004-09-25 - 22:57 AntonioTerceiro Screenshot 1 -- http://gavri.im.ufba.br
PNGpng screenshot2.png r1 manage 3.2 K 2004-09-25 - 22:58 AntonioTerceiro Screenshot 2 -- http://www.enec.org.br
PNGpng screenshot3.png r1 manage 5.6 K 2004-09-25 - 22:58 AntonioTerceiro Screenshot 3 -- http://dacomp.im.ufba.br
Edit | Attach | Watch | Print version | History: r18 < r17 < r16 < r15 < r14 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r18 - 2006-03-17 - AntonioTerceiro
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.