Banner Image on blog main page?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
halcyon

Banner Image on blog main page?

Post by halcyon »

I was just wondering how I would go about putting a banner image at the top of the blog - near the blog name up on the left. Can this be done?
jhermanns
Site Admin
Posts: 378
Joined: Tue Apr 01, 2003 11:28 pm
Location: Berlin, Germany
Contact:

Post by jhermanns »

yeah! which template are you using? if you're using the default template, you could patch templates/default/layout.php

let us know if it worked...
halcyon

Banner image

Post by halcyon »

I am using the slate-grey theme. Still possible?
romulus
Regular
Posts: 49
Joined: Fri Sep 24, 2004 4:31 pm
Contact:

Post by romulus »

its always possible with every theme.

Every theme has its own layout.php which does the whole layout on its own. If you want to display some weird content or images or whatever you have to change this file.
If you have some HTML knowledge it should be no problem to change this file to your liking. It is basically a HTML file with some minor php code here and there.
randybrown
Regular
Posts: 27
Joined: Sun Oct 10, 2004 10:05 pm

Post by randybrown »

Every theme has its own layout.php which does the whole layout on its own.
Just to clarify: only the "default" theme in the distribution has a

Code: Select all

layout.php
. All other themes makes use of that file. It can be copied into the directory of the theme you are working with and then mdofied there.

I started working yesterday on a theme and simply duplicated the entire "default" directory, as it seemed to have all of the files necessary
tadpole
Regular
Posts: 88
Joined: Fri Oct 08, 2004 6:20 am
Location: 33°6'4.079" North, 117°3'6.563" West
Contact:

Post by tadpole »

You shouldn't do that. Copy as little over from the default as possible--if s9y can't find a file in your theme directory it tries the default. By having it fall back wherever possible you are better able to take advantage of enhancements in s9y without modifying your own files every time you update.
randybrown
Regular
Posts: 27
Joined: Sun Oct 10, 2004 10:05 pm

Post by randybrown »

Copy as little over from the default as possible
I see your point. But if I want to make a significantly different theme than the ones which are available, I will need to modify most files, i.e.: layout.php, style.css, etc. Plus, I'll need to make changes to the images.

This is why I copied default, as it had all of the files in it.

It seems that all of the templates in the distribution use the default layout.php, which is why the templates look pretty much the same.
tadpole
Regular
Posts: 88
Joined: Fri Oct 08, 2004 6:20 am
Location: 33°6'4.079" North, 117°3'6.563" West
Contact:

Post by tadpole »

Significantly different probably doesn't involve every single little thing, so IMHO it would be best to just copy the stuff over as you need to. Your decision, though. With regards to every theme using the default layout.php:
[tadpole@localhost templates]$ find -name layout.php
./default/layout.php
./moz-modern/layout.php
./newspaper/layout.php
./s9y_thin/layout.php
./Orange/layout.php
./arztqua/layout.php
./blogger-death/layout.php
Kaustubh had a habit of copying over everything, hence its presense in thin and orange (both unnecessary). I think we've broken him of it, though.
JustinS
Regular
Posts: 17
Joined: Thu May 27, 2004 5:53 pm
Location: Tulsa, Oklahoma, USA
Contact:

Post by JustinS »

Also, note:

Some authors place the URL to the banner file within the css document itself..

Code: Select all

#serendipity_banner {
    font-family: Helvetica, Arial, sans-serif;
    color: #FFFFFF;
    background: #9CF url(http://www.justinshattuck.com/bgHeader.jpg);
    text-align: left;
    width: 652px;
    height: 280px;
    margin:auto;
	
}


Just an example...
Post Reply