Spring til indhold

Skabelon:Godbog

Fra Wikibooks, den frie samling af lærebøger


This template is used to show a blurb of a book, with associated cover image and a link to a downloadable/printable version (if one is available). The arguments are:

box=<STYLE>
Where <STYLE> is the optional CSS style the blurb is in. For instance "box=float:right; width=250px;" would show the text blurb in a textbox on the right, 250px wide.
title=<TITLE>
Where <TITLE> is the title of the book
cover=<COVERIMAGE>
Where <COVERIMAGE> is the name of the book's cover image, if any. The cover image will be scaled to have a maximum size of 80px either horizontally or vertically, so any image that will not scale down this small should not be used. Also, images will be scaled by the browser, so images with large file sizes will cause slower downloading.
file=<FILE>
Where <FILE> is the name of the downloadable version of the book, if any.
desc=<DESCRIPTION>
Where <DESCRIPTION> is a short paragraph about the book, to be displayed alongside the cover image.
bgcolor=<BGCOLOR>
Where <BGCOLOR> is the background color to be used on the image


New Goodbook

[redigér]

This is the proceedure for creating a new goodbook template for a new featured book.

Say the wikibook on Basketweaving becomes featured one day. What you do is the following.

  1. Create a new template by going to Template:Goodbook/Basketweaving:
  2. Insert the following text and save the page (the subst keyword does some fancy copy+pasting; edit the page again to see what I mean):
{{subst:Goodbook/Blank|title=Basketweaving|cover=Pretty_baskets.png
 |desc=Learn to weave your own baskets in no time flat, using the [[Basketweaving]] wikibook}}
[redigér]

Insert the template into Wikibooks:Featured books/Templates, by pasting in

{{Goodbook/Basketweaving|edit=1}}

The edit=1 makes it easy for anybody visiting that list to edit the advertising blurb.

Putting it on a bookshelf

[redigér]

Insert the template into a bookshelf by visiting the appropriate bookshelf and pasting in the following text:

{{Goodbook/Basketweaving|box=width: 300px; float: right;}}

{{Goodbook/Curling for Fun and Profit|box=width: 300px; float: right;}}

Putting it on the front page

[redigér]

Insert the template into the front page rotation by pasting in the following:

{{Goodbook/Basketweaving}}