logo

A fond farewell to a Page of history

Remember the first time you saw Pages when R5 was released? What a godsend they were! I can't even remember how I stored JavaScript and CSS in Notes before that. Not that I think Pages were the perfect tool for storing code of course. Au contraire, I don't like using Pages to store code. All they did was make it easy. As of this site's last redesign I don't use them at all. They're just too messy and it's impossible to keep them formatted. That's why I like the new JavaScript Libraries I mentioned yesterday. Not only can we store JavaScript, but we have a new feature for storing CSS - called Style Sheet Resources. There's no need to use Pages at all now. Is Domino 6 as much of an improvement on R5 as R5 was on R4? Originally I thought not but I am starting to think otherwise.

Domino 6 Style Sheets

As I am bound to say - the Style Sheets feature of Domino 6 could be better. As they are, they require an external editor such as TopStyle or Dreamweaver (or a simple text editor for the brave). How hard would it be to have an embedded CSS editor in Domino Designer? Maybe a feature for Domino 7?? For the time being I have kept the original file in a folder, edited it with TopStyle and then used the Refresh button to re-import the file. I don't trust the "Open With.." button for some reason.

I have an article under way that discusses using CSS in Domino 6 that you should all like. Give me a week to get it finished. While I do I want you all to go and brush up on your CSS selectors at the Selectutorial and digest the best-practices from Mezzoblue. If you need inspiration, look at what you can do with CSS. Finally, bookmark the CSS Vault. If you haven't paid attention to CSS before, you need to start now!

Comments

  1. I just wish I could correct the mime type for style sheets served by domino for the R6.x Style Sheet elements. If you check the headers (or just watch the Mozilla Javascript console) you'll see what I mean.

    I can't help but wonder why Lotus always misses this stuff?

    • avatar
    • Jake
    • Wed 12 Feb 2003 06:34

    Are you sure David? I've done some under-the-hood spying and it looks like they have a content-type of "text/css" to me. Maybe it's been fixed. I am running Domino 6.02CF1.

  2. Jake,

    I don't think an embedded CSS editor could win from a topstyle, or dreamweaver dedicated css editor. That's why I use Webdav for some of my favorite client programs, this includes Photoshop 7 and Dreamweaver. With webdav, I can simply edit, check out, check in, and save design elements such as image resources and style sheets directly in the Notes database, without the hassles of (re)attaching after each edit. I love this feature. It's explained in the newest e-promag and the Domino 6 help file. If you still need any help setting it up just mail me.

    Another thing slightly off-subject that's interesting about pages. I was experimenting with a web site in a Domino 6 database. It consisted of two pages, one for the html, one for the css. Both were set to type (none). In IE, opening the html page looked fine. in Mozilla, it didn't. After a while I found out that it wasn't some dumb css error i made, it was the fact that IE doesn't seem to check for the mime of the css page, whilst Mozilla does. Setting the page type to text/css fixed the problem.

    Just wanted to share that.

    Ferdy

    • avatar
    • Jake
    • Wed 12 Feb 2003 07:54

    You're right Ferdy. IE is a lot more forgiving of things like that. Whether or not Mozilla does it decided by which mode it's in {Link}

    Shall get in touch with you about WebDAV.

  3. We were going to use webdav for our client applications (my side-business/hosting company) but it requires a M$ Windows server to work - YUK!

    As for the CSS editor, I'd much rather use TopStyle than something IBM would put together. "You could use a wrench to bang in a nail, but I'd rather use a hammer" is pretty much my feeling there. TopStyle is an awesome tool and something that I use almost every day. I'll open notepad every once and a while but simply like the formatting and the libraries.

    Oh, btw, the Open With... hasn't caused me any problems as of yet. It runs as a temp file which can very easily be refreshed for quick edits (comes in handy when doing pixel work on your images).

    -Chris

  4. I don't know if you were the one to point out Eric Meyer's site to me, but I thought it was worth mentioning here.

    {Link}

    Of special interest if you want a quick demo on whats possible: click on the various "Presentation" links. My favorite is the default look "Eos", but "void(style);" is a css-free look.

    Eric's css/edge site is pretty interesting too for those who want to push CSS to its limits.

    Also, if you like frustrated anticipation, check out the SelectOracle

    {Link}

    to find out selectors you never knew you needed, but can't use yet in major browsers. Hahaha.. I just told you it would be frustrating, and yet you can't keep yourself from clicking and looking, can ya? 'cause now you've gotta know. Mwahahaha! >:-]

    • avatar
    • Ake
    • Wed 12 Feb 2003 14:29

    There don't seem to be any way of specifying media-type for a stylesheet resource (i.e. media="print") which means I can't do a "Insert Resouce..." in the HTML Head Content. Instead it's back to the old way of manually typing in the link rel's. Or am I missing something?

    • avatar
    • Jake
    • Wed 12 Feb 2003 14:49

    You're right Ake. I had never thought about that. Although, personally I prefer to create the link myself. Again, my mantra: never trust Domino to do anything you can do yourself just as easily.

  5. Why would you want to put this stuff in the HTML Head Content section? I prefer a $$HTMLHead shared field or $$HTMLHead field in a subform so I can make an update in one location and have it blanket across my entire application.

    That's just me though.... lazy ;-)

    -Chris

  6. The "Insert Resource" is for cross-client coding, mostly, although it does get around the base href problem for forms vs. documents for those unable to code their own. Cross-client code is probably never going to be great, though. If they fix Notes CD to obey the rules of the web, I can imagine it breaking just about everything that's been done before on the Notes client. Then, this whole Domino online community is full of people who realised long ago that "Notes on the web" is not the aim or the limit of Domino development.

    • avatar
    • Josef
    • Wed 12 Mar 2003 02:39

    Hi,

    I use to put a computed field in HTML head to select the proper CSS stylesheet. It is based on DB profile document location based on DB location. Very useful for setting different DB replicas for different clients.

  7. I've done something like that with @GetHTTPHeader("Host") and computing things like CSS. I had a customer that had two seperate domains that catered to the same business but under different sub-companies. The person wanted a look and feel for their website to be specific per domain. Instead of running two seperate sites, we simply loaded the css that made the changes that we were looking for based on the domain.

    ie:

    domain := @GetHTTPHeader("Host");

    @If(domain = "www.domain1.com"; "domain1.css"; domain = "www.domain2.com"; domain2.css; "general.css")

    Now, instead of managing two sites, you're managing one CSS per site in the same container - cost benefitial for hosting and time saving for administration/maintenance!

    -Chris

    • avatar
    • Simon
    • Wed 12 Mar 2003 17:12

    Going back to the point about the "Open With" feature for CSS files and the like... what I fail to understand is how come you can right click an attachment, click edit, Notes opens the appropriate program (i.e. Excel), you make changes and click "Save" in that application, close the app and the attachment in the Notes document is updated with the change. So why the heck can't it be that way for design elements? Why is it necessary to remember to hit "refresh"?

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Tue 2 Dec 2003

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content