Skip to content

Commit

Permalink
fix: reformat and fix some sheet warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
xdy committed Jul 2, 2020
1 parent 2a682f5 commit 75f21a7
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 32 deletions.
51 changes: 30 additions & 21 deletions static/templates/actor/actor-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@

{{!-- Sheet Header --}}
<header class="sheet-header">
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"/>
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"
alt="actor image"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
</div>
{{!-- The grid classes are defined in scss/global/_grid.scss. To use,
use both the "grid" and "grid-Ncol" class where "N" can be any number
from 1 to 12 and will create that number of columns. --}}
<div class="characteristics grid grid-3col">
<h1 class="charname">
<label>
<input name="name" type="text" value="{{actor.name}}" placeholder="Name"/>
</label></h1>
</div>
{{!-- The grid classes are defined in styles/global/_grid.scss. To use,
use both the "grid" and "grid-Ncol" class where "N" can be any number
from 1 to 12 and will create that number of columns. --}}
<div class="characteristics grid grid-3col">
{{#each data.characteristics as |characteristic key|}}
<div class="characteristic flexrow flex-group-center">
<div class="characteristic flexrow flex-group-center">
<label for="data.characteristics.{{key}}.value" class="resource-label">data.characteristics.{{key}}.short</label>
<input type="text" name="data.characteristics.{{key}}.value" value="{{characteristic.value}}" data-dtype="Number"/>
<span class="characteristic-mod rollable" data-roll="2d6+@characteristics.{{key}}.mod" data-label="{{key}}">{{numberFormat characteristic.mod decimals=0 sign=true}}</span>
</div>
<input id="data.characteristics.{{key}}.value" type="text" name="data.characteristics.{{key}}.value"
value="{{characteristic.value}}" data-dtype="Number"/>
<span class="characteristic-mod rollable" data-roll="2d6+@characteristics.{{key}}.mod"
data-label="{{key}}">{{numberFormat characteristic.mod decimals=0 sign=true}}</span>
</div>
{{/each}}
</div>
</div>
</header>

Expand All @@ -32,29 +37,33 @@ <h1 class="charname"><input name="name" type="text" value="{{actor.name}}" place

{{!-- Description Tab --}}
<div class="tab description" data-group="primary" data-tab="description">
{{editor content=data.details.description target="data.details.description" button=true owner=owner editable=editable}}
{{editor content=data.details.description target="data.details.description" button=true owner=owner
editable=editable}}
</div>

{{!-- Owned Items Tab --}}
<div class="tab items" data-group="primary" data-tab="items">
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-image"></div>
<div class="item-name">Name</div>
<div class="item-controls">
<a class="item-control item-create" title="Create item" data-type="item"><i class="fas fa-plus"></i> Add item</a>
</div>
<div class="item-image"></div>
<div class="item-name">Name</div>
<div class="item-controls">
<a class="item-control item-create" title="Create item" data-type="item"><i
class="fas fa-plus"></i> Add item</a>
</div>
</li>
{{#each actor.items as |item id|}}
{{#each actor.items as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<div class="item-image">
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" alt="item name"/>
</div>
<h4 class="item-name">{{item.name}}</h4>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
{{/each}}
</ol>
</div>

Expand Down
23 changes: 13 additions & 10 deletions static/templates/item/item-sheet.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" alt="item image"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
<h1 class="charname">
<label for="item.name" class="resource-label">Quantity</label>
<input id="item.name" name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
<div class="grid grid-2col">
<div class="resource">
<label class="resource-label">Quantity</label>
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
</div>
<div class="resource">
<label class="resource-label">Weight</label>
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
</div>
<div class="resource">
<label for="data.quantity" class="resource-label">Quantity</label>
<input id="data.quantity" type="text" name="data.quantity" value="{{data.quantity}}"
data-dtype="Number"/>
</div>
<div class="resource">
<label for="data.weight" class="resource-label">Weight</label>
<input id="data.weight" type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
</div>
</div>
</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = (env, argv) => {
),
new WriteFilePlugin(),
new MiniCssExtractPlugin({
filename: 'src/scss/twodsix.scss'
filename: 'src/styles/twodsix.scss'
})
],
resolve: {
Expand Down

0 comments on commit 75f21a7

Please sign in to comment.