add iboxperson template

This commit is contained in:
alison wright 2020-01-01 04:36:29 -05:00
parent ed5c06b53a
commit 68f12eac3a
3 changed files with 117 additions and 6 deletions

BIN
images/noimage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -28,7 +28,13 @@ body {
td, th {
border-right: 1px solid;
border-top: 1px solid;
padding-right: 1em
padding-right: 2ex
}
.ibox td, .ibox th {
font-size: 0.75em
}
.ibox-img {
height: 150px
}
h1, h2, h3, h4, h5, h6 {
font-family: serif
@ -41,20 +47,29 @@ a {
}
blockquote {
border-left: 2px solid;
padding-left: 1em
padding-left: 2ex
}
.pageheader {
background: left / contain no-repeat url("/xevv/images/header.png");
image-rendering: crisp-edges
}
.ibox-head {
width: 100%;
text-align: center;
margin-top: 0.5em;
margin-bottom: 0.5em
}
.sidebar {
padding: 0ex 1ex;
}
a {color: #92ebf0}
body {background-color: #0a0a0a; color: #eaeaea}
h1, h2, h3, h4, h5, h6 {color: #9a9a9a}
h3>span {color: #7a7a7a}
td, th, fieldset, blockquote, .pageheader .actions ul, #pageinfo {border-color: #eaeaea}
small {color: #777}
div.recentchanges {background: #1a1a1a !important; color: #eee !important}
.recentchanges .changelog {background: #2a2a2a !important; color: #fff !important}
div.recentchanges, .sidebar {background-color: #1a1a1a !important; color: #eee !important}
.recentchanges .changelog {background-color: #2a2a2a !important; color: #fff !important}
@media(prefers-color-scheme: light) {
a {color: #2a7fe8}
body {background-color: #f5f5f5; color: #151515}
@ -62,6 +77,6 @@ div.recentchanges {background: #1a1a1a !important; color: #eee !important}
h3>span {color: #858585}
td, th, fieldset, blockquote, .pageheader .actions ul, #pageinfo {border-color: #151515}
small {color: #888}
div.recentchanges {background: #e5e5e5 !important; color: #111 !important}
.recentchanges .changelog {background: #d5d5d5 !important; color: #000 !important}
div.recentchanges, .sidebar {background-color: #e5e5e5 !important; color: #111 !important}
.recentchanges .changelog {background-color: #d5d5d5 !important; color: #000 !important}
}

96
templates/iboxperson.mdwn Normal file
View File

@ -0,0 +1,96 @@
[[!templatebody <<ENDBODY
<div class="ibox">
<h4 class="ibox-head">
[[!color
foreground=<TMPL_IF colorfg><TMPL_VAR raw_colorfg><TMPL_ELSE>black</TMPL_IF>
background=<TMPL_IF colorbg><TMPL_VAR raw_colorbg><TMPL_ELSE>white</TMPL_IF>
text="<TMPL_VAR raw_name>"]]
</h4>
<TMPL_IF image>
<img class="ibox-img" src="<TMPL_VAR image>"/>
</TMPL_IF>
<table class="ibox-table">
<tbody>
<TMPL_IF first>
<tr><td><b>First appearance</b></td><td><TMPL_VAR first></td></tr>
</TMPL_IF>
<TMPL_IF basedon>
<tr><td><b>Based on</b></td><td><TMPL_VAR basedon></td></tr>
</TMPL_IF>
<TMPL_IF nickname>
<tr><td><b>Nickname</b></td><td><TMPL_VAR nickname></td></tr>
</TMPL_IF>
<TMPL_IF nicknames>
<tr><td><b>Nicknames</b></td><td><TMPL_VAR nicknames></td></tr>
</TMPL_IF>
<TMPL_IF species>
<tr><td><b>Species</b></td><td><TMPL_VAR species></td></tr>
</TMPL_IF>
<TMPL_IF gender>
<tr><td><b>Gender</b></td><td><TMPL_VAR gender></td></tr>
</TMPL_IF>
<TMPL_IF class>
<tr><td><b>Class</b></td><td><TMPL_VAR class></td></tr>
</TMPL_IF>
<TMPL_IF affiliation>
<tr><td><b>Affiliation</b></td><td><TMPL_VAR affiliation></td></tr>
</TMPL_IF>
<TMPL_IF origin>
<tr><td><b>Origin</b></td><td><TMPL_VAR origin></td></tr>
</TMPL_IF>
<TMPL_IF born>
<tr><td><b>Born</b></td><td><TMPL_VAR born></td></tr>
</TMPL_IF>
<TMPL_IF height>
<tr><td><b>Height</b></td><td><TMPL_VAR height>dm</td></tr>
</TMPL_IF>
<TMPL_IF weight>
<tr><td><b>Weight</b></td><td><TMPL_VAR weight>kg</td></tr>
</TMPL_IF>
<TMPL_IF parent>
<tr><td><b>Parent</b></td><td><TMPL_VAR parent></td></tr>
</TMPL_IF>
<TMPL_IF parents>
<tr><td><b>Parents</b></td><td><TMPL_VAR parents></td></tr>
</TMPL_IF>
</tbody>
</table>
</div>
ENDBODY]]
This template is a simple info box for people or characters.
Parameters:
| Name | Description |
| ----------- | ----------- |
| name | Required. Name of the person. |
| colorfg | The foreground color for the name. Defaults to black. |
| colorbg | The background color for the name. Defaults to white. |
| image | Image to be displayed below the name. |
| first | Where the character first appeared. |
| basedon | What the character is based on. |
| nickname(s) | Nick name(s) of the person. |
| species | Species of the character. |
| gender | Gender of the person. |
| class | In games, what class the character is. |
| affiliation | Who the character is affiliated with. |
| origin | Origin point of the character. |
| born | When the character was born, and their original name, if any. |
| height | The height of the person, in decimeters. |
| weight | The weight of the person, in kilograms. |
| parent(s) | The parent(s) of the character. |
Example usage:
\[[!sidebar content="""
\[[!template
id=iboxperson
name="John Doe"
image="/xevv/images/noimage.png"
first="Spingy Bingus"
basedon="Jane Doe"
nickname=Joe
height=42
weight=800]]
"""]]