Difference between revisions of "Template:Diary"

From GodWiki
Jump to navigation Jump to search
m (changed a variable name)
m (little changes)
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
 
|violet  = border: 1px solid #CCCCCC; background-color: #FDF2FF; background: #F5F5F5 -webkit-linear-gradient(top, #EAD5FE, #D0AFF4 31px, #FCF8FF 31px, #FAF4FF); {{box-shadow|0px|0px|5px|#E1B4FF}}
 
|violet  = border: 1px solid #CCCCCC; background-color: #FDF2FF; background: #F5F5F5 -webkit-linear-gradient(top, #EAD5FE, #D0AFF4 31px, #FCF8FF 31px, #FAF4FF); {{box-shadow|0px|0px|5px|#E1B4FF}}
 
|divine  = border: 1px solid #CCCCCC; background-color: #F4F8FF; background: #F5F4FF -webkit-linear-gradient(top, #D8EDF9, #BFDAEF 31px, #F8FAFF 31px, #F4FDFF); {{box-shadow|0px|0px|5px|#DDDCDC}}
 
|divine  = border: 1px solid #CCCCCC; background-color: #F4F8FF; background: #F5F4FF -webkit-linear-gradient(top, #D8EDF9, #BFDAEF 31px, #F8FAFF 31px, #F4FDFF); {{box-shadow|0px|0px|5px|#DDDCDC}}
|custom = border: 1px solid {{{borderColor|#CCCCCC}}}; background-color: {{{bgColor|#FAFAFA}}}; background: #FAFAFA -webkit-linear-gradient(top, {{{titleColor1|#F6F8F9}}}, {{{titleColor2|#E7E7E7}}} 31px, {{{titleColor3|#F7F7F7}}} 31px, {{{titleColor4|#F9F9F9}}}); {{box-shadow|0px|0px|5px|{{{shadowColor|#CFCA7A}}}}}
+
|custom = border: 1px solid {{{borderColor|#CCCCCC}}}; background-color: #FAFAFA; background: #FAFAFA -webkit-linear-gradient(top, {{{titleColor1|#F6F8F9}}}, {{{titleColor2|#E7E7E7}}} 31px, {{{bgColor1|#F7F7F7}}} 31px, {{{bgColor2|#F9F9F9}}}); {{box-shadow|0px|0px|5px|{{{shadowColor|#CFCA7A}}} }}
 
}}  
 
}}  
 
font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 0.96em; line-height: 145%; padding: 4px; width:{{#switch: {{{width|}}}
 
font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 0.96em; line-height: 145%; padding: 4px; width:{{#switch: {{{width|}}}

Latest revision as of 14:10, 1 May 2021

!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.


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 of examples of each of these styles.
custom
borderColor = color of the border.
shadowColor = color of the shadow around the border.
titleColor1
titleColor2 = colors used in the gradient for the title part.
bgColor1
bgColor2 = colors used in the gradient for the text part.


css
Optional. Allows advanced users to insert inline CSS into the enclosing <div>...</div> element if needed.

Style Gallery

Style parameter Example
Unspecified (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.