[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[THREDDS #SQO-318763]: THREDDS - Using CSS or XSLT to make the catalog look different



Hi Katherine,

Thanks, those all sound like easy changes to make. I'll add them to my list. I 
should be able to get the stylesheet into an external file quickly (I'm 
actually surprised we don't already do that). The others may take a little 
longer but they seem pretty basic so I'll try to get them all into the next 
release.

Ethan

> Ethan
> 
> Print statements are fine and I imagine would be fairly trivial to change.
> 
> The bare minimum which would help a ton would be ather than hardcoding in
> the style at the top of the page, hard code in a link to a stylesheet in the
> header, putting the stylesheet somewhere it won't be overwritten with
> thredds updates. Then pull the hardcoded styling you now have and put it in
> a default_css.css file, and link to it like this
> <head>
> <link href="custom/default_css.css" rel="stylesheet" type="text/css"
> media="screen" />
> 
> Also a link to a custom javascript file in the header would be great. That
> way we could add use that javascript file to include ajax calls etc which
> would be really cool!
> 
> <script type="text/javascript" language="javascript"
> src="custom/default.js"></script>
> </head>
> 
> That way at least we could change the table look
> 
> Then the next helpful and simplest thing to do would to be to add print
> statements which add classes or IDs to the table row and column html.
> So the table would look like, for example,
> 
> <table width="100%" cellspacing="0" cellpadding="5" align="center"
> id="mytable">
> <thead>
> <tr class="header_row">
> <th class=header_field_l">Dataset</th>
> <th class=header_field_c">Size</th>
> <th class=header_field_r">Last Modified</th>
> </tr>
> </thead>
> <tbody>
> <tr class="level_1_row">
> <td class="level_1_field_l"><img src='/thredds/folder.gif' alt='folder'
> class="level_1_folder">Data Catalogs</td>
> <td class="level_1_field_c"></td>
> <td class="level_1_field_r"></td>
> </tr>
> <tr class="even_row">
> <td class="even_field_l"><img src='/thredds/folder.gif' alt='folder'
> class="level_2_folder"><a href="data.html">My 1 Data</a></td>
> <td class="even_field_c"></td>
> <td class="even_field_r"></td>
> </tr>
> <tr class="odd_row">
> <td class="odd_field_l"><img src='/thredds/folder.gif' alt='folder'
> class="level_2_folder"><a href="data.html">My 2 Data</a></td>
> <td class="odd_field_c"></td>
> <td class="odd_field_r"></td>
> </tr>
> <tr class="level_2_row">
> <td class="level_2_field_l"><img src='/thredds/folder.gif' alt='folder'
> class="level_1_folder">Sub Data Catalogs</td>
> <td class="level_2_field_c"></td>
> <td class="level_2_field_r"></td>
> </tr>
> <tr class="even_row">
> <td class="even_field_l"><img src='/thredds/folder.gif' alt='folder'
> class="level_2_folder"><a href="data.html">My sub 1 Data</a></td>
> <td class="even_field_c"></td>
> <td class="even_field_r"></td>
> </tr></tbody>
> </table>
> 
> 
> This would allow individuals to style the table, the odd/even rows (zebra
> striping for example) sub levels etc...
> 
> 
> Anyway, just a thought.
> 
> Best thing of course would be to move away from tables altogether and into
> divs.  I'd be happy to whip up an example if you wish...
> 
> Katherine
> 
> 
> > -----Original Message-----
> > From: Unidata THREDDS Support
> > [mailto:address@hidden]
> > Sent: Wednesday, August 15, 2007 5:33 PM
> > To: address@hidden
> > Cc: address@hidden
> > Subject: [THREDDS #SQO-318763]: THREDDS - Using CSS or XSLT
> > to make the catalog look different
> >
> >
> > Hi Katherine,
> >
> > > Got my catalog up and running fairly easily.
> > > I have looked through the archives, with not much success,
> > to see how
> > > I might make the pages created by datasetScan look
> > different than the
> > > standard given. Seems like tables and hardcoded css styles
> > are used.
> > > Can I change this? If so where? Maybe using divs/spans rather than
> > > tables so I can do more clever things with css/ajax etc?
> >
> > I'm afraid we have very little experience making flexible or
> > good looking web pages. A number of people have asked about
> > this and we are open to the idea but don't have the expertise
> > or time to devote.
> >
> > If you have some specific changes you would like to see, we
> > could try to make them. One problem is that our HTML is
> > generated with print statements in our Java code. Yuck! But
> > that's were we are at the moment.
> >
> > Hmm, perhaps we should send out an email to the thredds list
> > and see if there is enough interest to get a conversation
> > going about how to move towards more user controllable style
> > in the TDS HTML pages. Thanks,
> >
> > Ethan
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: SQO-318763
> > Department: Support THREDDS
> > Priority: Normal
> > Status: Open
> >
> 
> 


Ticket Details
===================
Ticket ID: SQO-318763
Department: Support THREDDS
Priority: High
Status: Open