rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: maverick on March 31, 2005, 01:00:43 PM

Title: Adding a Logo Question
Post by: maverick on March 31, 2005, 01:00:43 PM
.
I would like to put a logo (gif) on the top of all my pages. My site consists of a huge amount of menus and folders. The only way that I can think of to get the logo to show up on the top of all pages is to add the logo file to each menu and folder (virtual or real) in HFS and of course use <img scr="..."> in the tpl. This method works but it is a very slow task to do and doing it this way makes HFS request and re-load the logo file over and over again each time the page changes. Then if I make changes to these folders or add new ones or make a change to my logo, I have to add the logo file manually again and again.  There has got to be a better way to do this.

Can someone tell me if there is a html code that I could use in hfs.tpl that would automatically add the logo to the top of every page without me having to add the logo file to all the menus and folders? In otherwords, have HFS automatically read the logo file from the root for all requested pages and/or have the logo file cached in memory for all pages loaded similar to the way HFS handles icons.  In addition, is there a html code that will automatically shrink or stretch the logo to fit the user's screen width resolution?

Any help would be appreciated. Thanks.

maverick
Title: Adding a Logo Question
Post by: rejetto on March 31, 2005, 01:23:32 PM
put the logo only in the root
then, put <img src="/logo.gif"> in the template
Title: Adding a Logo Question
Post by: maverick on March 31, 2005, 02:11:49 PM
.
Thanks rejetto.  I knew it was a simple coding error but for the life of me I just didn't see it.  I forgot to put the "/" in the code. :#)

Do you have any idea how to automatically stretch or shrink the logo to fit the user's screen resolution?  Can this be done with html?

maverick
Title: Adding a Logo Question
Post by: ~GeeS~ on March 31, 2005, 07:08:11 PM
To adjust the size you can play with the width and heigth attribute in the img tag like:

<img style="width: 294px; height: 314px;" src="../abcd.jpg" alt="This is a logo and weights many bytes, use Opera and turn images off" align="middle" border="0" >

In order to reduce loading time you should minimize the size of the jpg by compressing (Irfanview is a nice free tool for that purpose).
When I started to redesign the standard template to my needs, i used nvu (free html tool) and found good info from www.w3.org on html, xml and css.

~GeeS~
Title: Adding a Logo Question
Post by: maverick on April 01, 2005, 02:43:34 AM
~GeeS~

Thanks, but no that's not what I mean.  Your example will give a fixed width output and will not look as expected at different screen resolutions.  I want it to look the same (full screen width) "automatically" at "any" screen resolution (like you see at the top of many forums).  I'm not concerned about the height at this point as that would remain the same.

I just figured it out -> width="100%" and it now works perfectly for my current needs at any screen resolution. :)

maverick