Skip to content

Commit

Permalink
feat: add buyable to guns
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Apr 1, 2024
1 parent 46930b2 commit 5627c36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions darkstat/front/guns.templ
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ templ GunsT(guns []configs_export.Gun, mode GunTabMode) {
<th style="width:50px;">Type</th>
<th style="width:50px;">Technology</th>
<th style="width:50px;">Price</th>
<th style="width:50px;">Buyable</th>
<th style="width:50px;">Hull Dmg</th>
<th style="width:50px;">Shield Dmg</th>
<th style="width:50px;">Power Usage</th>
Expand Down Expand Up @@ -85,6 +86,7 @@ templ GunsT(guns []configs_export.Gun, mode GunTabMode) {
<td>{ gun.Type }</td>
<td>{ gun.DamageType }</td>
<td>{ strconv.Itoa(gun.Price) } </td>
<td>{ strconv.FormatBool(len(gun.Bases) > 0) }</td>
<td>{ strconv.Itoa(gun.HullDamage) }</td>
<td>{ strconv.Itoa(gun.ShieldDamage) }</td>
<td>{ fmt.Sprintf("%.2f", gun.PowerUsage) }</td>
Expand Down
10 changes: 7 additions & 3 deletions darkstat/front/shared.templ
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ templ TabContent() {
{ children... }
</div>
<style>
th, td {
body {
background-color: #EFEFEF;
font-weight: 500;
}
th, td {
padding-left: 5px;
padding-bottom: 2px;
padding-top: 2px;
Expand All @@ -30,7 +34,7 @@ templ TabContent() {

cursor: pointer;
&:hover {
background-color: #DDD;
background-color: #CCC;
}
}
td {
Expand All @@ -40,7 +44,7 @@ templ TabContent() {
& tr {
cursor: pointer;
&:hover {
background-color: #EEE;
background-color: #CCC;
}
}
}
Expand Down

0 comments on commit 5627c36

Please sign in to comment.