l.setAttribute("href","http://.../niftyCorners.css"); and save it. TMPL:DEF{"templatescript"} (using your attachment web/topic names):
<script type="text/javascript" src="%PUBURLPATH%/%MAINWEB%/RoundedCorners/niftycube.js"></script>Add also the location of the css file inside
TMPL:DEF{"twikistyle"}, after the other definitions beginning with @import url(.... Again, dont forget to change the web/topic name. The line to insert is @import url('%PUBURLPATH%/%MAINWEB%/RoundedCorners/niftyCorners.css');
function NiftyCubeInit() {
Nifty("H2");
Nifty("div.twikiAttachments");
}
addLoadEvent(NiftyCubeInit);
(You can add your preferred to-be-rounded element here later, lets go with these first to ensure we have a working setup)style.css file from twiki/pub/TWiki/QuickMenuSkin folder
twiki.quickmenuskin.tmpl, add the elements to the list (after function NiftyCubeInit () {) as displayed in the example above
function NiftyCubeInit() {
Nifty("div.MenuBar","small transparent bottom");
Nifty("div.TopicAction");
Nifty("div.twikiAttachments","big");
}

@import in TMPL:DEF{"twikistyle"}. Updated the docs.
Of course, if there is any better solutions, great :). That´s one of the reasons I´m posting here.
-- MikkoLaakso - 13 Mar 2007
I am talking about seeing the effect applied on the page as the page loads. Because onload will be called after all elements have been loaded, you will see unstyled elements first before they are rounded.
-- ArthurClemens - 13 Mar 2007
Excuse me, I was too concerned with the performance :). It would be good to provide both alternatives. But it seems that niftycube.js needs to wait until the page is loaded, to correctly round corners. So I guess the only thing left to do is to delay the display of the page. I´ll do some research...
-- MikkoLaakso - 14 Mar 2007
This could be achieved with a script that sets all the css-elements invisible at the start, and then visible at the end. But is this really a good solution, if you think about a page that loads 8 seconds, you could normally start seeing the text contents in ~4s, now you would need to wait for the (possible) large images to load etc. Normally the rounding operation is so fast that with small pages like this one here, nobody would even notice the operation.
-- MikkoLaakso - 15 Mar 2007
The rounding does not work properly with elements that have inline style and class element (applies to all browsers other than Firefox). Examples are div.topicAction and div.topicAttachments.
-- MikkoLaakso - 04 Apr 2007
oh, bugger. Sorry, I keep forgetting to add SnazzyRoundedCornersContrib - a CSS only rounded corner mini-TWikiApp
%!INCLUDE{
"Plugins.SnazzyRoundedCornersContrib"
TOPICTOSHOW="WebTopicList"
BORDERCOLOR="%WEBBGCOLOR%"
BGCOLOR="lightblue"
FLOAT="center"
WIDTH="300px"
HEIGHT="300px"
IDSHOW="unique"
}%
comes out like (bottom cut off because the INCLUDEe topic is larger than the 300px allowed)
|
|||||||||||||||


Search extensions
Search by tags