Skip to content

Commit

Permalink
Pass the whole href through to CcTable
Browse files Browse the repository at this point in the history
It's our standard to not do URL construction from parts inside the templates.
  • Loading branch information
bakert committed Oct 21, 2024
1 parent e2157d5 commit ab916bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions gatherling/Views/Components/CcTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function __construct(Deck $deck)
foreach ($convertedCosts as $cost => $amt) {
$this->castingCosts[] = [
'cost' => $cost,
'imgSrc' => "styles/images/mana{$cost}.png",
'amt' => $amt,
];
$total += $cost * $amt;
Expand Down
2 changes: 1 addition & 1 deletion gatherling/templates/partials/ccTable.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{#castingCosts}}
<tr>
<td align="right" width="75">
<img src="styles/images/mana{{cost}}.png" alt="{{cost}}">
<img src="{{imgSrc}}" alt="{{cost}}">
&nbsp;
</td>
<td width="75" align="left">x {{amt}}</td>
Expand Down

0 comments on commit ab916bc

Please sign in to comment.