Image size in Export Template

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
User avatar
Rui Guerreiro
Captain
Captain
Posts: 22
Joined: Sat Oct 21, 2006 6:39 am
Location: Algarve/Portugal
Contact:

Image size in Export Template

Post by Rui Guerreiro »

Hey everyone,

I'm kinda stuck with this... I'm configuring the dfProHTML-v2 template to my own needs, and I already got rid of the cover-image-flash-bit that I don't like that much, simply by using the bit of code from the original dfProHTML template. So now, my book covers all show imediately (anyone using the template knows what I'm talking about)! Now for the next step I would like them to show with their own format... I mean, most books have larger heigth than width, but some don't, and when a "squared-like" book shows up, it looks kind of weird, stretched, to fit some fixed size that I don't seem to find anywhere... or how to change it :)
Can anyone help me on this one? I'd love to see my squared books to look as good as the usual rectangular ones!

Thanks a lot.
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: Image size in Export Template

Post by Nora »

In the "head" part of the template you'll see a bunch of "meta name" tags, among them

Code: Select all

<meta name="image-width">
and

Code: Select all

<meta-name="image-height">
. Those are the ones you want to play with for the image size. (You can also assign just one of the tags and leave the other one out completely.)
User avatar
Rui Guerreiro
Captain
Captain
Posts: 22
Joined: Sat Oct 21, 2006 6:39 am
Location: Algarve/Portugal
Contact:

Re: Image size in Export Template

Post by Rui Guerreiro »

Hey Nora,

I'm not sure I did it the rigth way, but it's not working :( I have changed the values a few times with no luck, I even tried using only width or heigth alone as you said, and even without any of them and still, the covers will always be the same size when exporting!
I have no clue what to try next...
Can you give me a hand?

Thanks a lot.

Best,
Rui
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Image size in Export Template

Post by Conor »

The changes you made are for how the image is exported. To change the display size of the image you need to modify the CSS for the template. You will find this CSS file inside the images folder of the template in ~/Library/Application Support/Templates/Images/DFProHTMLImages/screen.css. Open this file in a text editor and look for:

Code: Select all

.cover {
	float: left;
	display: block;
	width: 120px;
	height: 170px;
	margin: 0px 15px 0px 0px;
}
That is the height and width you want to change. You most likely want to remove both lines, so that the image takes it's natural size. Since the template was written by Dan I am not sure what happens then, but it is worth a try.
User avatar
Rui Guerreiro
Captain
Captain
Posts: 22
Joined: Sat Oct 21, 2006 6:39 am
Location: Algarve/Portugal
Contact:

Re: Image size in Export Template

Post by Rui Guerreiro »

Perfect! Done and working :)

Thank you soooo much.
Post Reply