Button Button
recent changes (000001)

From yuri at sims.berkeley.edu Tue Dec 30 14:56:30 2008 From: yuri at sims.berkeley.edu (Yuri Takhteyev) Date: Tue Dec 30 14:04:27 2008 Subject: [Sputnik-list] recent changes Message-ID: fa4efbc00812300856y7963fbb2x2fe6deab028771b0@mail.gmail.com

A long list of things from the last few weeks. Here is a brief outline, so you can decide what to read:

  1. Updates to "Sightings"
  2. A new vertical menu done with jquery
  3. YUI vs. Blueprint
  4. Storing templates in the node
  5. Redesigned edit forms
  6. Markitup integration

First, eLua project is now using Sputnik. See eluaproject.org. As you can see, it has a somewhat different design, with a vertical navigation bar on the side, animated with jquery, instead of Sputnik's default tabs. This started with me wanting to help the eLua team to reproduce elements of the old eLua website design, which had a vertical javascript menu on the side. The original javascript menu had some issues, however, so I replaced it with an accordion menu done in 6 lines of jquery. Speaking of different designs, I added screenshots of some of the existing sputnik installations to http://sputnik.freewisdom.org/en/Sightings. If you have something to add to this, send me a link. (Links to sputnik sites that use default look and feel are also welcome, at the bottom.)

After adding the vertical menu to eluaproject.org, I decided to add it to the default sputnik code. This change is now in the source tree. It's a little less smooth than the version on eLuaproject.org, but the plus side is that it uses the exact same HTML as the horizontal menu (though it needs to be inserted in a different place). I've been divided on which menu to use by default. The current code in git defaults to the new vertical menu, but it's easy to switch back to the original horizontal one. But we could go back to the tabs as the default. You can see a demo of the current default at http://sputnik.freewisdom.org/admin-demo/.

While making this change I looked at some alternatives to YUI (our CSS framework). I ended up deciding to stick with YUI. The main reason is that it looks like only Blueprint has equal following at the moment. And between Blueprint and YUI, I decided that Blueprint would alienate too many of the people who feel strongly about fixed-width layout and the occasional horizontal scroll bars that it entails. YUI is also tiny (4K for the version that we are using, smaller than Blueprint) and fully free (BSD).

I also decided that the older approach of storing all templates in a separate node ("sputnik/templates") linked via a parameter in the node ("templates") was too complicated for simple changes. So, I moved some of the templates to the node itself and gave each of them a separate edit box. I also finally integrated a change to the edit forms that Jim has done a while back. This change makes it possible to organize the fields into collapsible sections, so you don't get as overwhelmed. To see an example of this in action, go to http://sputnik.freewisdom.org/admin-demo/ and login as "admin" with password "admin". Then see http://sputnik.freewisdom.org/admin-demo/@Root.edit. (Don't save changes to @Root, use some other node if you want to experiment.) To change the appearance you would need to login as Admin, then go to @Root.edit, open "HTML Fields" section, and edit the fields in it.

To move the side bar or hide it, you would need to edit the class of

doc3 on the first line of "body". The default is "yui-t1", which

gives you a thin side bar on the left. yui-t2, yui-t3, etc. give you different width, still on the left. t4-t6 give you a side bar on the right. "yui-t0" hides the side bar. Alternatively, you could leave the sidebar but remove the menu from it: just remove "$menu" from the "sidebar" field. If you want to add the menu at the top, put $menu in side #menu_bar div in "header" instead of "



".

Finally, I tentatively integrated markitup. If you link the "sputnik-markitup" rock into your rock directory, then edit forms will use markitup. Basically, you still use markup, but you get a tool bar to help you out a little. See http://sputnik.freewisdom.org/en/Sandbox.edit. I haven't quite decided how much of a default to make it. Right now it's a separate rock, but I am tempted to include it by default.

Any thoughts on any of those changes?

  • yuri

-- http://sputnik.freewisdom.org/