Skip to content

Commit

Permalink
Add export page sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwilkes committed Aug 1, 2023
1 parent 8be0e3a commit 3b6f126
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 11 deletions.
18 changes: 18 additions & 0 deletions Library/Markdown/Help/Export Templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@ The remainder of this document details the various data types that the data is m
- `.Cast` (string)
- `.Maintain` (string)

### Margins

#### Margins Fields:

- `.Bottom` (string)
- `.Left` (string)
- `.Right` (string)
- `.Top` (string)

### MeleeWeapon

#### MeleeWeapon Fields:
Expand Down Expand Up @@ -255,6 +264,14 @@ numbers.
- Parameter: `value` (Number)
- `.Trunc` — Returns a value which has everything to the right of the decimal place truncated

### Page

#### Page Fields:

- `.Height` (string)
- `.Margins` (Margins)
- `.Width` (string)

### Points

#### Points Fields:
Expand Down Expand Up @@ -325,6 +342,7 @@ This is the object passed in to the template. All other data is derived from it.
- `.Name` (string)
- `.Notes` ([]Note)
- `.Organization` (string)
- `.Page` (Page)
- `.Player` (string)
- `.Points` (Points)
- `.RangedWeapons` ([]RangedWeapon)
Expand Down
31 changes: 20 additions & 11 deletions Library/Output Templates/HTML - PC.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

--font-size-14: 0.875rem;
--font-size-12: 0.75rem;
--font-size-11: 0.6875rem;
--font-size-11: 0.6375rem;

--color-background: 238, 238, 238;
--color-on-background: 0, 0, 0;
Expand Down Expand Up @@ -107,8 +107,11 @@
body {
background-color: rgb(var(--color-page));
color: rgb(var(--color-on-page));
margin: 0.25in;
margin-bottom: calc(0.25in - 1em);
width: {{.Page.Width}};
margin-top: {{.Page.Margins.Top}};
margin-left: {{.Page.Margins.Left}};
margin-bottom: {{.Page.Margins.Bottom}};
margin-right: {{.Page.Margins.Right}};
}

#sheet {
Expand Down Expand Up @@ -968,18 +971,21 @@
}

#footer .center {
font: var(--font-page-primary-footer);
text-align: center;
}

#footer .right {
text-align: right;
}

#footer .right a {
#footer .center a {
color: inherit;
text-decoration: inherit;
}

#footer .primary {
font: var(--font-page-primary-footer);
}

#footer .right {
text-align: right;
}
</style>
</head>

Expand Down Expand Up @@ -1498,8 +1504,11 @@
</div>
<div id="footer">
<div class="left">GCS is copyrighted &copy;1998-2023 by Richard A. Wilkes</div>
<div class="center">{{.Name}}</div>
<div class="right"><a href="https://gurpscharactersheet.com/">gurpscharactersheet.com</a></div>
<div class="center primary">{{.Name}}</div>
<div class="right">Modified {{.ModifiedOn}}</div>
<div class="left">All rights reserved</div>
<div class="center"><a href="https://gurpscharactersheet.com/">gurpscharactersheet.com</a></div>
<div class="right">Created {{.CreatedOn}}</div>
</div>
</div>
</body>
Expand Down

0 comments on commit 3b6f126

Please sign in to comment.