Template:Diary

From GodWiki
Revision as of 13:48, 30 December 2019 by Djonni (talk | contribs) (So... the semantics and/or logic of the width parameter were broken for some reason -- it was setting max-width instead...? So, now max-width=100%, min-width=18em, and width={{{width|auto}}} except for hint, where width={{{width|50em}}})
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
!Hero's Diary
23:59  Found a very good template
99:99  Divided by Zero
[view] [edit] [history] [refresh]
📚 Documentation

Inserts a Hero's Diary graphic very similar to the real thing.

Parameters

Unnamed parameter, or
text
Required. The diary entry. Include the time before it. You can see the default text above. If you want another diary entry after it, to place the next one on the line below separate each diary entry with a <br /> as this is the code for a line break.
width
Optional. Must be a standard length (in 'px', 'em', or other supported units). Auto by default (sized to the diary entry contents), but with a minimum width that matches the quest boxes from {{Diaryquest}}. It is better to leave it as default in most cases (i.e omitting this parameter, or leaving it blank) unless you need extra width for some reason.
title
Optional. This is the title text. The default is 'Hero's Diary' (the same as the real thing).
style
Optional. If this parameter is omitted or set to default, the template will use a modern style which closely resembles the current Godville web interface. (That same style can be explicitly selected by setting the parameter to superhero.) The previous default style is available by specifying |style=hero. Other available styles are |style=retro and |style=hint, which mimics the yellow hint/dev blog announcement popup at the top of the superhero page. A few old, deprecated styles in different color schemes are no longer available.

Examples of Use

This
{{diary|What is wrong with all these monsters? Why does my pain give them such delight?!}}
Results in
!Hero's Diary
What is wrong with all these monsters? Why does my pain give them such delight?!
This
{{diary | title = The Scroll of Spode | width = 40em | text = 22:22  This is an entry of great width}}
Results in
!The Scroll of Spode
22:22 This is an entry of great width
This
{{diary | style=superhero | text = 22:22  This is also an entry of great (automatic) width, but with the default title (if you leave it unspecified) and the "superhero" style.}}
Results in
!Hero's Diary
22:22 This is also an entry of great (automatic) width, but with the default title (if you leave it unspecified) and the "superhero" style.
This
{{diary | style=superhero | text = 10:15 An auto-sized diary!<br />10:14 With two entries!}}
Results in
!Hero's Diary
10:15 An auto-sized diary!
10:14 With two entries!
This
{{diary | style=retro| title = The Scroll of Spode |  text = 10:15 Look at this retro diary entry!}}
Results in
!The Scroll of Spode
10:15 Look at this retro diary entry!
This
{{diary | style=hero | text = 10:15 Look at this hero diary entry!}}
Results in
Hero's Diary ▼
10:15 Look at this hero diary entry!
This
{{diary | style = hint | text = Check out the [https://godvillegame.com/blog news] in the blog. }}
Results in
!Hooray!
Check out the news in the blog.