Skip to content

Commit

Permalink
Resize sheet elements for Russian localization.
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickburk1988 committed Feb 9, 2024
1 parent 0610bd7 commit 903b8df
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## v1.2.2

- Uncentered artifact sheet name field.
- Resized sheet elements for Russian localization.

## v1.2.1

Expand Down
3 changes: 3 additions & 0 deletions module/unknown-armies.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ Hooks.once("init", async function() {
Handlebars.registerHelper("isGM", function() {
return game.user.isGM;
});
Handlebars.registerHelper("lang", function() {
return game.i18n.lang;
});
Handlebars.registerHelper("not", function (arg) {
return !arg;
});
Expand Down
53 changes: 45 additions & 8 deletions style/unknown-armies.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
content:url(../image/pause.png);
}

.unknownarmies.sheet.artifact input[type=text]:nth-child(10){
text-align:center;
}
.unknownarmies.sheet.artifact input[type=text][value="?"]{
font-size:20px;
font-size:1.25rem;
Expand All @@ -12,6 +15,9 @@
font-size:30px;
font-size:1.875rem;
}
.unknownarmies.sheet.artifact .main-form.editable.ru .label:nth-of-type(3){
white-space:break-spaces;
}
.unknownarmies.sheet.artifact .upper-content__section{
grid-template-columns:repeat(2, min-content) 1fr repeat(5, min-content);
}
Expand Down Expand Up @@ -75,17 +81,30 @@
.unknownarmies.sheet.character [data-action=reset-failed-notches]:focus,.unknownarmies.sheet.character [data-action=reset-failed-notches]:hover{
text-shadow:0 0 .3125rem #dfff00;
}
.unknownarmies.sheet.character .upper-content{
grid-template-columns:max-content 1fr min-content;
.unknownarmies.sheet.character .main-form.editable.ru .obsession-passions input[type=checkbox]{
margin:0;
}
.unknownarmies.sheet.character .upper-content__section:first-of-type{
grid-template-columns:min-content 1fr repeat(2, min-content) max-content;
.unknownarmies.sheet.character .main-form.editable.ru .obsession-passions .label:last-of-type{
white-space:pre-wrap;
}
.unknownarmies.sheet.character .upper-content__section--wound-threshold-only{
grid-template-columns:min-content;
.unknownarmies.sheet.character .main-form.editable.ru .shock-meter [data-action=roll]{
width:5.25rem;
}
.unknownarmies.sheet.character .name{
grid-column:2 / 6;
.unknownarmies.sheet.character .main-form.editable.ru .shock-meter h3{
font-size:14px;
font-size:.875rem;
}
.unknownarmies.sheet.character .main-form.editable.ru .shock-meter__abilities-hardened-notches:before{
transform:translateX(calc(50% - .25rem)) translateY(2.25rem);
}
.unknownarmies.sheet.character .main-form.editable.ru .shock-meter__failed-notches-ongoing-madness:before{
transform:translateX(calc(50% + 1.125rem)) translateY(.375rem);
}
.unknownarmies.sheet.character .main-form.editable.ru .shock-meter .label--wrap{
word-break:break-word;
}
.unknownarmies.sheet.character .main-form.editable.ru .item-list--rituals .item-list__header,.unknownarmies.sheet.character .main-form.editable.ru .item-list--rituals .item-list__item,.unknownarmies.sheet.character .main-form.editable.ru .item-list--spells .item-list__header,.unknownarmies.sheet.character .main-form.editable.ru .item-list--spells .item-list__item{
grid-template-columns:3fr 1.5fr 6rem;
}
.unknownarmies.sheet.character .status{
display:flex;
Expand All @@ -102,6 +121,21 @@
padding:.3125rem .5rem;
white-space:nowrap;
}
.unknownarmies.sheet.character .upper-content{
grid-template-columns:max-content 1fr min-content;
}
.unknownarmies.sheet.character .upper-content__section:first-of-type{
grid-template-columns:min-content 1fr repeat(2, min-content) max-content;
}
.unknownarmies.sheet.character .upper-content__section--wound-threshold-only{
grid-template-columns:min-content;
}
.unknownarmies.sheet.character .name{
grid-column:2 / 6;
}
.unknownarmies.sheet.character .cabal{
max-width:7.8125rem;
}
.unknownarmies.sheet.character .tab-buttons{
grid-template-columns:repeat(6, 1fr);
}
Expand Down Expand Up @@ -319,6 +353,9 @@
font-weight:400;
}

.unknownarmies.sheet.identity .main-form.editable.ru .stats-features__details{
line-height:.5625rem;
}
.unknownarmies.sheet.identity .upper-content__section{
grid-template-columns:repeat(2, min-content) 1fr repeat(5, min-content);
}
Expand Down
8 changes: 4 additions & 4 deletions template/actor/character-sheet.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form class="main-form {{cssClass}}">
<form class="main-form {{cssClass}} {{lang}}">
<div class="status">{{#if actor.system.isBurnedOut}}
<span>{{localize 'UA.BurnedOut'}}</span>{{/if}}{{#if actor.system.wounds.severity}}
<span>{{localize (concat 'UA.' (replace actor.system.wounds.severity ' ' ''))}}</span>{{/if}}
Expand All @@ -14,7 +14,7 @@
<span class="label">{{localize 'UA.Concept'}}:</span>
<input type="text" name="system.concept" data-dtype="String" value="{{actor.system.concept}}">
<span class="label">{{localize 'UA.Cabal'}}:</span>
<select name="system.cabal">{{#select actor.system.cabal}}
<select class="cabal" name="system.cabal">{{#select actor.system.cabal}}
<option value=""></option>{{#each cabals as |cabal x|}}
<option value="{{cabal.id}}">{{cabal.name}}</option>{{/each}}
{{/select}}</select>
Expand Down Expand Up @@ -141,9 +141,9 @@
{{#if (equals item.system.type 'Mundane')}}{{#if item.system.mundane.ofCourseICan}}<span class="label">{{localize 'UA.OfCourseICan'}}:</span>
<span>{{stripHTML item.system.mundane.ofCourseICan}}</span>{{/if}}
{{#if item.system.mundane.substitutesFor}}<span class="label">{{localize 'UA.SubstitutesFor'}}:</span>
<span>{{item.system.mundane.substitutesFor}} ({{localize 'UA.SubstitutesForAbility_Details'}})</span>{{/if}}{{/if}}
<span>{{localize (concat 'UA.' item.system.mundane.substitutesFor)}} ({{localize 'UA.SubstitutesForAbility_Details'}})</span>{{/if}}{{/if}}
{{#if (equals item.system.type 'Supernatural')}}{{#if item.system.supernatural.ability}}<span class="label">{{localize 'UA.SupernaturalAbility'}}:</span>
<span>{{item.system.supernatural.ability}} ({{#if (includes item.system.supernatural.ability 'Alter')}}{{localize 'UA.AlterPassion_Details'}}{{/if}}{{#if (equals item.system.supernatural.ability 'Influence')}}{{localize 'UA.Influence_Details'}}{{/if}}{{#if (includes item.system.supernatural.ability 'Harm')}}{{localize 'UA.Harm_Details'}}{{/if}}{{#if (includes item.system.supernatural.ability 'Information')}}{{localize 'UA.Information_Details'}}{{/if}}{{#if (includes item.system.supernatural.ability 'Protection')}}{{localize 'UA.Protection_Details'}}{{/if}}{{#if (includes item.system.supernatural.ability 'Terrorize')}}{{localize 'UA.TerrorizeMeter_Details'}}{{/if}}{{#if (equals item.system.supernatural.ability 'Versatility')}}{{localize 'UA.Versatility_Details'}}{{/if}})</span></span>{{/if}}{{/if}}
<span>{{localize (concat 'UA.' (replaceAll item.system.supernatural.ability ' ' ''))}} ({{#if (includes item.system.supernatural.ability 'Alter')}}{{localize 'UA.AlterPassion_Details'}}{{/if}}{{#if (equals item.system.supernatural.ability 'Influence')}}{{localize 'UA.Influence_Details'}}{{/if}}{{#if (includes item.system.supernatural.ability 'Harm')}}{{localize 'UA.Harm_Details'}}{{/if}}{{#if (includes item.system.supernatural.ability 'Information')}}{{localize 'UA.Information_Details'}}{{/if}}{{#if (includes item.system.supernatural.ability 'Protection')}}{{localize 'UA.Protection_Details'}}{{/if}}{{#if (includes item.system.supernatural.ability 'Terrorize')}}{{localize 'UA.TerrorizeMeter_Details'}}{{/if}}{{#if (equals item.system.supernatural.ability 'Versatility')}}{{localize 'UA.Versatility_Details'}}{{/if}})</span></span>{{/if}}{{/if}}
{{#if (equals item.system.type 'Avatar')}}{{#if item.system.avatar.attributes}}<span class="label">{{localize 'UA.Attributes'}}:</span>
<span>{{stripHTML item.system.avatar.attributes}}</span>{{/if}}
{{#if item.system.avatar.symbols}}<span class="label">{{localize 'UA.Symbols'}}:</span>
Expand Down
2 changes: 1 addition & 1 deletion template/item/artifact-sheet.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form class="main-form {{cssClass}}">
<form class="main-form {{cssClass}} {{lang}}">
<div class="upper-content">
<div class="portrait">
<img data-edit="img" alt="{{item.name}} portrait" src="{{item.img}}">
Expand Down
2 changes: 1 addition & 1 deletion template/item/identity-sheet.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form class="main-form {{cssClass}}">
<form class="main-form {{cssClass}} {{lang}}">
<div class="upper-content">
<div class="portrait">
<img data-edit="img" alt="{{item.name}} portrait" src="{{item.img}}">
Expand Down

0 comments on commit 903b8df

Please sign in to comment.