I'm thinking of a plugin that is a control panel that lets you adjust
the widths of the mainmenu, tiddler area, righthand sidebar, and the
header height. There would be boxes where you could enter new numbers,
then hit a refresh button and the stylesheets would be overridden.
Maybe also boxes to adjust the text size for the sitetitle, mainmenu,
tiddler text, and tiddler title.
Or maybe someone has already come up with this?
Dave Gifford
There's a plugin for that already: It's called StyleSheet... ;)
Seriously though, it could be done, but it'd be a bit tricky for some
elements with the current layout.
There's a discussion about such issues over on [twdev], but a problem is
backwards compatibility (as usual).
-- F.
FND: LOL. Yeah, but some of us who either don't know CSS (old me) or
are too lazy to memorize it or hunt down elements buried in the
StyleSheets would love a control panel a la SelectPaletteMacro to play
around a little bit.
if one makes the assumption that
> everyone will use the standard PageTemplate and StyleSheeet. But for those
> that are customizing their layout, it is impossible to know what id's they
> are using for the various elements,
Good point Saq.
I was more thinking of it as a tool for someone just starting their
styling but not familiar with stylesheets or too lazy to track down
the elements buried within the stylesheets in order to adjust them.
Later changes to the custom StyleSheet tiddler could override the
plugin, but the plugin would override the 3 default stylesheets. That
was kind of my idea.
Saq of course I remember your cool font resize plugin, but I was
thinking more along the lines of adjusting mainmenu, header, etc, to
account for changes in the width of the menus and the height of the
header.
Dave
In theory, this would be very easy (at least if you discount Saq's very
valid warning about non-standard themes):
document.getElementById("header").style.height = "50px";
document.getElementById("mainMenu").style.width = "15%";
document.getElementById("sidebar").style.width = "12em";
(Whereas the part after the equals sign is the user input - although
they'd still have choose from and thus know about px, em and % units.)
However, with TW's current default layout technique, the displayArea
(where the tiddlers are displayed) doesn't scale automatically when the
MainMenu and Sidebar columns are resized.
Those dependencies are probably calculable - but to be honest, I can't
be bothered to look into that.
Also, such a plugin for modifying only those four element would make
people demand enhanced functionality - basically a WYSIWYG CSS editor,
which is just a tiny bit hard to do...
-- F.
I'm sure there would be some backward compatibility problems, but
coming up with a set of those commonly changed setting and having them
in the default stylesheets (again, like the palette references in
StyleSheet Color) could make things a touch easier. Since the CSS
stuff is already parsed to pick up those slices, I don't think there
would be any coding needed in terms of a plugin (or, perish the
thought, core changes).
Just my $0.02USD worth...
-- BJ (TampaGeek)
That's a very good idea!
Obviously this wouldn't work for *all* values, but it's a nice idea for
the basic elements Dave had mentioned.
(From a developer's point of view, it might also make it a little easier
to ensure consistency, e.g. for similar elements' padding and margin.)
> I'm sure there would be some backward compatibility problems
Really? I can't think of anything that might break (though this is
usually the cue for Saq to shoot me down... ).
-- F.
;-)
Dave Gifford
Dave Gifford
On Sep 5, 3:24 pm, "Dave Gifford - http://www.giffmex.org/"
You really are the devil, my friend - I just couldn't let this go...
Here's a proof-of-concept implementation:
http://layoutslices.tiddlyspot.com/#LayoutDimensions%20StyleSheet
As you can see, it's not quite as easy as you might had hoped (though
there's no actual interface yet, other than the slices tiddler*).
For example, the header's height is dynamic (depending on padding,
font-size etc.), so it's not as easy as just setting the height value.
Tell me what you think.
> Oh, and if it's a plugin rather than a core item, who's concerned with
> backward compatibility? Just need to add "Requires version x or
> higher."
The problem is with getting a more flexible default StyleSheetLayout.
If you're interested in the details, take a look at this discussion over
on [twdev]:
http://tinyurl.com/24rkxp
(http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/b55011665c5e04d9)
-- F.
* it seems that you have to reload TiddlyWiki (or the StyleSheet)
after changing a slice's value for the changes to take effect
store.addNotification("LayoutDimensions",refreshColorPalette);of course the refreshColorPalette function drives me up a tree but thats a whole different story and not at all relevant.....
* it seems that you have to reload TiddlyWiki (or the StyleSheet)
after changing a slice's value for the changes to take effect
Dave
On Sep 6, 7:28 am, "Saq Imtiaz" <lew...@gmail.com> wrote:
> store.addNotification("LayoutDimensions",refreshColorPalette);
>
> of course the refreshColorPalette function drives me up a tree but thats a
> whole different story and not at all relevant.....
>
> > * it seems that you have to reload TiddlyWiki (or the StyleSheet)
> > after changing a slice's value for the changes to take effect
>
> --
> TiddlyThemes.com (http://tiddlythemes.com) : a gallery of TiddlyWiki
> themes.
> TiddlySnip (http://tiddlysnip.com) : a firefox extension that turns
> TiddlyWiki into a scrapbook!
> LewcidTW (http://tw.lewcid.org) : a repository of extensions for
> TiddlyWiki
> It's a done deal then. I want it on my desk by Friday afternoon.
You really are the devil, my friend - I just couldn't let this go...
Here's a proof-of-concept implementation:
http://layoutslices.tiddlyspot.com/#LayoutDimensions%20StyleSheet
Dave Giphistopheles
Actually, having discussed this with Saq, I'm not too sure about the
tiddler slices approach anymore.
In the StyleSheet, it's really more trouble than it's worth (for the
developer/designer at least).
It'd generally be easier to modify the respective values directly with
JavaScript (see below).
> How about throwing in some font sizes also.
> [...]
> And change the CSS class on those boring tables, too.
As I've said, it's only a proof-of-concept implementation, so I just
picked out a few things for demonstration purposes.
> Cool. Might be nice as a form with windows for the #s.
That would be the next step, yes. (The added benefit being that the
previously-discussed dependencies could be calculated automatically
then.)
However, I'm not gonna pursue this any further for now, as I don't see
it as a high-priority issue on my long list of TiddlyWikiToDos...
Nevertheless, this whole thing should be pretty easy to implement;
once you've got the interface (form fields) in a dedicated tiddler,
all you need is to read out their respective values and apply them
like this:
[element].style.[property] = [value];
Sounds like the perfect project for getting started with developing TW
plugins... ... ...
-- F.
http://www.webdesignfromscratch.com/web-2.0-design-style-guide.cfm
It is just another rose by another name - a fad, still... putting the
hype aside TiddleyWiki has always been capable of much more than even
the Web 2.0 affection-ados :) expect. Its rigidity in layout was one
of its strengths; allowing the user to get on with using it for
something useful while not having to worry about a multitude of
possibilities. But for those now starting to push its boundaries some
of the things Dave is envisioning should be looked at seriously.
There is no reason for any trade-offs. The simplicity can be
maintained for those who require it whilst still opening it up to
state-of-the-art visual design.
This is a challenge and a slight departure from the direction of
'muliti-wiki-harmonization' which seems to be its direction at the
moment. While it might be nice to go down the wiki track, the
excitement and charm of a flexible framework that can easily be used
for those wiki things, but still do anything from a college student's
blog/GTD to a state-of-the-art design web site for professionals will
make it accessible to a much wider market is tempting. As a
recalcitrant ex-DOS person I hate wysiwyg thingos, but if TiddlyWiki
is to reach its widest audience and user base it needs for its geekish
tools to get out of the way of a users passion to get their message
across.
I want my main menu to go diagonally across the top of the page from
port to starboard at a 45 degree angle, hide backstage underneath the
orchestra pit, have SideBarOptions disappear and reappear upon
command, and have more women's toilets so I don't have to wait so
long, and be afraid of being late for the next act :)
Morris
On Sep 5, 11:01 pm, "Dave Gifford - http://www.giffmex.org/"
Okay, so I lied; I couldn't help but create the basic framework:
http://layoutslices.tiddlyspot.com/#EasyLayoutPlugin
But this time, I really won't extend this any further (or at least I'll
try harder than before).
By the way: Ultimately it might be easier - and generally more useful -
to create a universal plugin which provides a GUI for editing tiddler
slices.
But I won't go there (see above)...
-- F.
http://www.TiddlyTools.com/#SliceGridPlugin
-e
*dang*
LOL
Nice!
I should have known about this - or at least I should have expected it...
Small(?) suggestion: It might be useful to have an alternative output
layout - one table per tiddler, one slice per row.
!Foo
|sliceName|sliceValue|
!Bar
|sliceName|sliceValue|
Not sure if it's worth the trouble though.
-- F.