Auto scaling of Images (Burgees) at top of results

A common issue users have is making the results look nice while having the images at the top. If these are not the same size the balance of the results becomes unbalanced

Lets look at an extreme example

As you can see the there is a small logo to the left the heading text is offset and the right image is too large

Now here we have an automatic solution the left image has been enlarged, the right image has been reduced and the text is now nicely in the middle. So let’s look at how this is done

Sailwave supports the ability to customise the header and this is controlled by header.txt. In the directory

C:\Users\Public\Documents\Sailwave\Templates we need to update the file Header.txt

Replace the file Header.txt with this one https://www.dropbox.com/s/5mle6pwi4pjroby/header.txt?dl=1

Now we will add a new item to the publish menu which we will call Results V2…

Download this file to the same location as the Header.txt we just downloaded https://www.dropbox.com/s/tarc6orkp60d96z/ResultsV2.htm?dl=1

That is it, now when you select the publish menu within Sailwave there is another option which is Results V2 if you use this one then the images will be scaled as the example above.

Feel free to experiment with editing the header.txt file to adjust the layout to your preferences. This sample has the image height set as 100 pixels but you can set it to whatever you wish.

Let us know what you think and if you have any ideas.

Jon

Hi Jon,

As I didn’t already have anything in My template directory I need to get a copy of Footer.txt.

So I coppied it from C:\Program Files (x86)\Sailwave\Templates

all Works well.

Hi Jon,

You may have dealt with this already. We have a club burgee. When I add it to the set up it as a venue burgee it moves the header text slightly off centre. Can it be centred above the header or in some way so it doesn’t offset the header text slightly to one side?
Nick

Hi Nick,

The short answer to your question is yes. By modifying the code in the file header.txt in the Templates folder you can achieve what you would like.

If you download the newest version of the Sailwave User Guide & Reference Manual from https://www.sailwave.com/help-reference/sailwave-user-guide, there is a whole section I wrote on modifying the header.txt & footer.txt files to change how the head and foot of the results appear.

Kind regards,
Huw

I’ll give it go. Thanks.
Bit beyond my current skill level but I’ll try.

Nick

Hi Nick,
If you find you have problems then get back to me and I will help you.

Kind regards,
Huw

Hi Huw,

Miracles will never cease! I’ve managed to get an image in the header using an image I put in the templates folder and a piece of code between the two headers. Couple of questions:

Does this only work with ResultsV2? Doesn’t seem to be there using the other Results …

For publishing to the web site do I need the image to be held on a html site? I presume it won’t work if it’s held on my personal laptop?

Thanks so far …
Nick

Hi Nick - I see Huw has been helping you and you have managed to get something working.
Yes your image needs to be on a web accessible URL. This could be anywhere on your website or you can use imgur.com which is free to host the images (do a search on these forums)

If you design your own header - you can do virtually anything you want. I’m however curious as to what the issue you originally had was.

Did you add just one image? If you publish using Results then if you have two images then if they are different sizes then it will offset the text but if they are the same size it should be balanced

ResultsV2 works on the principle that it tries to resize the images so that they are the same size

Jon

Hi Jon,

Yes, Huw pointed me the right direction. I’ve got the club logo at the top of the page which looks great. I’ve asked our webmaster to put it on a club url now. Failing that I’ll look at the imgur option. Getting the logo in the header didn’t work with Results… only ResultsV2. But, that’s fine.

I found with the venue burgee or event burgee option it was de-centering the header text to the left (for the burgee on the right, or to the right (with the burgee on the left). I didn’t want the same logo either side so I think I was just trying it with one image.

Nick

Hi Nick,

One quick and easy solution might be to create an image the same size as your logo but make the image blank e.g. just white. place this image on the opposite side
This would then make it balanced and the text would be centred

Jon