Template:Diary

From GodWiki
Jump to navigation Jump to 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. The width may be set to a standard CSS length (in 'px', 'em', or other supported units), or it can be set to one of the standard sizes on the hero main page (on desktop). Setting |width= to any of the keywords main, central, center, or centre will set it to the default width of the central column on desktop; setting it to the keyword side will set the default width of the side columns on desktop. The default behaviour is to automatically size the diary box to the 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).
title-size
Optional. This is the size of the title text in em unit. It is recommanded to keep the default size which is 1em.
collapsed
Optional. Set this parameter to yes or any yes-like (y, true, 1, etc) value to make the diary collapsed when page opens.
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 retro, sunny, emerald, violet, divine, hint and custom. See the table below for examples of each of these styles.
custom style parameters
Optionals. The 6 parameters below are exclusively used for the custom style.
borderColor
Color of the border. (Default: #CCCCCC)
shadowColor
Color of the shadow around the border. (Default: #CFCA7A)
titleColor1
First color used in title's gradient. (Default: #F6F8F9)
titleColor2
Second color used in title's gradient. (Default: #E7E7E7)
bgColor1
First color used in text-background's gradient. (Default: #F7F7F7)
bgColor2
Second color used in text-background's gradient. (Default: #F9F9F9)
css
Optional. Allows advanced users to insert inline CSS into the enclosing <div>...</div> element if needed.

Related Templates

Style Gallery

  • Default (unspecified) style (or |style=superhero)
!Hero's Diary
This is the superhero style

  • |style=retro
!Hero's Diary
This is the retro style

  • |style=hero
Hero's Diary ▼
This is the hero style

  • |style=sunny
!Hero's Diary
This is the sunny style

  • |style=emerald
!Hero's Diary
This is the emerald style

  • |style=violet
!Hero's Diary
This is the violet style

  • |style=divine
!Hero's Diary
This is the divine style

  • |style=hint
!Hooray!
This is the hint style

  • |style=custom
!Hero's Diary
This is a custom colored diary template.

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 | 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 | 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 | 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 |  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 | 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 | Check out the [https://godvillegame.com/blog news] in the blog. }}
Results in
!Hooray!
Check out the news in the blog.

This
{{diary | width = central | This matches the default width of the main column of the superhero page on desktop. }}
Results in
!Hero's Diary
This matches the default width of the main column of the superhero page on desktop.

This
{{diary | width = side | This matches the default width of the side column of the superhero page on desktop. }}
Results in
!Hero's Diary
This matches the default width of the side column of the superhero page on desktop.

This
{{diary | style=custom | width=50% | borderColor=#CCCCCC | shadowColor=#B2B2FF | titleColor1=#B2B2FF | titleColor2=#C2C2FF | bgColor1=#EFEFFF | bgColor2=#EFEFFF | This is a custom colored diary template. }}
Results in
!Hero's Diary
This is a custom colored diary template.

Inserts a Hero's Diary box decoration very similar to the real thing, as seen on the desktop version of Godville.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Diary texttext 1

The text that will appear in the Hero's Diary box.

Example
Lorem ipsum dolor sit amet.
Stringrequired
Diary titletitle

A title to display at the top of the box, instead of "Hero's Diary"

Lineoptional
Box widthwidth

The width of the diary box on the page. This can be set to the keyword "central" to match the width of the column of the Godville desktop page, or to any standard CSS length value (e.g., "200px", "40em", etc)

Example
central
Lineoptional
Diary stylestyle

One of a variety of styles availble for the diary box. Currently supported styles are: retro, sunny, emerald, violet, divine, hint, hero

Lineoptional
Collapsedcollapsed

If set to "yes", the diary box will be collapsed when the page loads, with its contents hidden. The user will have to tap the box header to expand it before it can be read.

Default
no
Booleanoptional