[Pmwiki-users] wikistyles and a general remark to subject
Knut Alboldt
alboldt
Thu Jun 10 07:39:50 CDT 2004
first to the subject::
I mostly find the subject "Re: Pmwiki new version" (with any kind of Re:'s :-)
It would be nice to add some more info on that line.
second to the wikistyle-implementation:
I played arround the last time with the wiki-styles and had to define a lot
of them. It was rather much things to do:
- defining a $WikiStyleTag-entry
- defining a $WikiStyle-Entry
- and - because I use them in junction with skins - defining a
corresponding class.
So I thought of a maybe better implementation of the wikistyles for Version 2:
All wikistyles are just names of style-classes, the major can be defined in
stdlayout.css, e.g.
%red% is corresponding to the style ws_red which is defined as
.ws_red { color:red;}
in the stdlayout.css.
%define=wikistyle class-attributes% will add another line to the global
variable $WikiStyleClasses like
.ws_wikistyle { class-attributes}
$WikiStyleClasses will be added in the template (surrounded by the
<style>-tags if $WikiStyleClasses is not emtpy
%define=ws1,ws2,ws3 {class-attributes } could be even parsed as
.ws1,.ws2,.ws3 { class-attributes} so multiple %defines for one wikistyle
could be possible would be possible (as accumulating definitions)
This way you could
- define your own styles like before (%define=)
- make wikistyle changable by skins
- reduce the "overhead" of defining each wikistyle and wikistyletag (most
of the wikistlyes could be defined as css-classes, exception %newwin%, see
below)
right now %wikistyle%text%% is parsed as
<span style="wikistyleattributes">text</span>
I would suggest:
%wikistyle%text%%
is parsed as
<span class="wikistyle">text</span>
and
%wikistyle%
text
%%
and
%wikistyle% \\
text \\
%% \\
will be parsed as
<div class="wikistyle">
text
</div>
i.e.:
- %wikistyle% and %% as single tags or folled by a \\ in a line will be
parsed as <div...> / </div>
- %wikistyle% and %% as tags with leading or embedded or following text in
a line will be parsed as <span...> / </span>
This way nested wikistyles (in span and div as well) can be implemented.
Ok, I've got no other solution for the %newwin%-wikistyle, maybe this one
can be reduced to add the target=_blank to the <a>-tag generally like it
does right now.
Knut
More information about the pmwiki-users
mailing list