Skip to content

Commit 073b5c6

Browse files
committed
Changed item header font, minor style changes
1 parent 9d8ce80 commit 073b5c6

File tree

8 files changed

+59
-39
lines changed

8 files changed

+59
-39
lines changed

src/fonts/Athelas.ttc

-2.2 MB
Binary file not shown.
294 KB
Binary file not shown.

src/module/item/sheets/base-item-sheet.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,17 @@ export default class DLBaseItemSheet extends ItemSheet {
119119
const autoresize = (el) => {
120120
const jEl = $(el)
121121
if (jEl.prop("tagName") === 'INPUT') {
122-
const getSize = () => Math.max(1, (el.value?.length || el.placeholder?.length))
123-
el.size = getSize()
124-
el.oninput = () => {
125-
el.size = getSize()
122+
const setSize = () => {
123+
let size = Math.max(1, (el.value?.length || el.placeholder?.length))
124+
let ff = jEl.css('font-family')
125+
if (ff.includes('Libertine')) {
126+
el.style.width = (size + 4)+ 'ch'
127+
} else {
128+
el.size = size
129+
}
126130
}
131+
setSize()
132+
el.oninput = setSize
127133
} else if (jEl.prop("tagName") === 'TEXTAREA') {
128134
const getHeight = () => Math.max(0, el?.scrollHeight)
129135
jEl.height(0)

src/styles/newrules/item-sheet.scss

+10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@
3434
font-weight: bold !important;
3535
padding: 0 16px;
3636

37+
&.flex {
38+
display: flex;
39+
align-content: center;
40+
justify-content: flex-end;
41+
align-items: center;
42+
& > div:first-child {
43+
margin-right: auto;
44+
}
45+
}
46+
3747
&.center {
3848
text-align: center;
3949
}

src/styles/newrules/sheet-components.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
.dl-item-info {
6969
padding-bottom: 4px;
70-
padding-top: 4px;
70+
padding-top: 8px;
7171
line-height: 1.3;
7272

7373
hr {

src/styles/utils/_typography.scss

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@
1818
}
1919

2020
@font-face {
21-
font-family: 'Poison Hope';
22-
src: url('../fonts/PoisonHope-Regular.ttf') format('truetype');
21+
font-family: 'Linux Libertine Capitals';
22+
font-style: normal;
23+
font-weight: normal;
24+
size-adjust: 150%;
25+
src: local('Linux Libertine Capitals'), url('../fonts/LinLibertineC_Re-4.0_.1_.woff') format('woff');
2326
}
2427

2528
$font-primary: 'Arial', sans-serif;
2629
$font-secondary: 'Shadows Into Light', sans-serif;
2730
$font-header: 'IM Fell English SC', serif;
2831
$font-actor-sheet-inputs: 'Nodesto', 'Signika', 'Palatino Linotype', serif;
29-
$font-pm: 'Portmanteau', 'IM Fell English SC', serif;
30-
$font-ph: 'Poison Hope', 'IM Fell English SC', serif;
32+
$font-pm: 'Linux Libertine Capitals', 'IM Fell English SC', serif;
3133
$base-font-size: 12px;
3234

3335
//@font-face {

src/templates/item/item-spell-sheet.html

+16-17
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,25 @@
2323
<div class="tab attributes" data-group="primary" data-tab="attributes">
2424

2525
<!-- Header -->
26-
<div class="dl-item-section-header row">
27-
<div class="col-4" style="margin-top: 4px">
26+
<div class="dl-item-section-header flex">
27+
<div>
2828
<b>{{item.name}}</b>
2929
</div>
30-
<div class="col-8 dl-container-right-align">
31-
<input name="data.tradition" value="{{data.tradition}}" placeholder="{{localize 'DL.MagicTradition'}}"
32-
autosize/>
33-
<div class="select-wrapper">
34-
<select name="data.spelltype" style="height: 28px;" autosize>
35-
{{#select data.spelltype}}
36-
<option value=""></option>
37-
<option value="Attack">{{localize "DL.SpellTypeAttack"}}</option>
38-
<option value="Utility">{{localize "DL.SpellTypeUtility"}}</option>
39-
{{/select}}
40-
</select>
41-
</div>
42-
<input name="data.rank" type="number" value="{{data.rank}}" placeholder="{{localize 'DL.SpellRank'}}"
43-
style="padding: 4px"
44-
autosize/>
30+
31+
<input name="data.tradition" value="{{data.tradition}}" placeholder="{{localize 'DL.MagicTradition'}}"
32+
autosize/>
33+
<div class="select-wrapper">
34+
<select name="data.spelltype" style="height: 28px; padding-top: 2px">
35+
{{#select data.spelltype}}
36+
<option value=""></option>
37+
<option value="Attack">{{localize "DL.SpellTypeAttack"}}</option>
38+
<option value="Utility">{{localize "DL.SpellTypeUtility"}}</option>
39+
{{/select}}
40+
</select>
4541
</div>
42+
<input name="data.rank" type="number" value="{{data.rank}}" placeholder="{{localize 'DL.SpellRank'}}"
43+
style="padding: 4px" data-tippy-content="{{localize "DL.SpellRank"}}"
44+
autosize/>
4645
</div>
4746

4847
<hr>

src/templates/item/item-talent-sheet.html

+16-13
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,29 @@
2323
<div class="tab weapons" data-group="primary" data-tab="attributes">
2424
{{!-- Groupname - Uses - Max Uses --}}
2525
<!-- Header -->
26-
<div class="dl-item-section-header row">
27-
<div class="col-4" style="margin-top: 4px">
26+
<div class="dl-item-section-header flex">
27+
<div>
2828
<b>{{item.name}}</b>
2929
</div>
30-
<div class="col-8 dl-container-right-align">
31-
<input name="data.groupname" value="{{data.groupname}}" placeholder="{{localize 'DL.TalentGroupname'}}"
32-
autosize/>
33-
<div class="dl-new-project-2 nohover uses">
34-
<input type="number" name="data.uses.value" value="{{data.uses.value}}"
35-
data-tippy-content="{{localize "DL.TalentUses"}}" placeholder="-" min="0" autosize/>
36-
<span class="sep"></span>
37-
<input type="number" name="data.uses.max" value="{{data.uses.max}}"
38-
data-tippy-content="{{localize "DL.TalentUsesMax"}}" placeholder="-" min="0" autosize/>
39-
</div>
40-
</div>
30+
<input name="data.groupname" value="{{data.groupname}}" placeholder="{{localize 'DL.TalentGroupname'}}"
31+
autosize/>
4132
</div>
4233

4334
<hr>
4435

4536
<div class="dl-item-section-section margin">
37+
<div>
38+
<b>{{localize "DL.TalentUses"}}</b>
39+
<div>
40+
<div class="dl-new-project-2 nohover uses">
41+
<input type="number" name="data.uses.value" value="{{data.uses.value}}"
42+
data-tippy-content="{{localize "DL.TalentUses"}}" placeholder="-" min="0" autosize/>
43+
<span class="sep"></span>
44+
<input type="number" name="data.uses.max" value="{{data.uses.max}}"
45+
data-tippy-content="{{localize "DL.TalentUsesMax"}}" placeholder="-" min="0" autosize/>
46+
</div>
47+
</div>
48+
</div>
4649
<div>
4750
<b>{{localize "DL.ChallengeRollBonus"}}</b>
4851
<div>

0 commit comments

Comments
 (0)