Skip to content

Commit

Permalink
Improve spacing of district inputs
Browse files Browse the repository at this point in the history
This makes them more uniform and (combined with v1.7 of the scorer)
helps ensure the input placeholders are visible.
  • Loading branch information
PeterJCLaw committed Nov 17, 2024
1 parent 48be34a commit 7cf8b05
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions scoring/update.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "_update.html" %}

{% macro input_highest(x, y, name) %}
<foreignObject x="{{ x + 5 }}" y="{{ y }}" width="90" height="30">
<foreignObject x="{{ x + 5 }}" y="{{ y }}" width="95" height="30">
<input
class="highest tokens"
placeholder="Highest"
Expand All @@ -16,10 +16,10 @@
{% endmacro %}

{% macro input_pallets(x, y, name) %}
<foreignObject x="{{ x + 5 }}" y="{{ y }}" width="90" height="30">
<foreignObject x="{{ x + 5 }}" y="{{ y }}" width="100" height="30">
<input
class="pallets tokens"
placeholder="Pallets"
placeholder="All Pallets"
type="text"
id="district_{{ name }}_pallets"
name="district_{{ name }}_pallets"
Expand All @@ -32,9 +32,9 @@

{% macro district(name, x, y) %}
<g id="district-{{ corner }}">
<rect height="100" width="100" stroke="#000" x="{{ x }}" y="{{ y }}" stroke-width="2" fill="#fff"/>
{{ input_highest(x, y + 10, name) }}
{{ input_pallets(x, y + 50, name) }}
<rect height="110" width="110" stroke="#000" x="{{ x }}" y="{{ y }}" stroke-width="2" fill="#fff"/>
{{ input_highest(x + 2.5, y + 15, name) }}
{{ input_pallets(x, y + 65, name) }}
</g>
{% endmacro %}

Expand All @@ -59,16 +59,16 @@
{{ zone(3, 10, 805) }}
</g>

<g id="districts" transform="translate(0 175)">
{{ district('outer_nw', 50, 50) }}
{{ district('outer_ne', 450, 50) }}
{{ district('outer_se', 450, 450) }}
{{ district('outer_sw', 50, 450) }}
{{ district('inner_nw', 150, 150) }}
{{ district('inner_ne', 350, 150) }}
{{ district('inner_se', 350, 350) }}
{{ district('inner_sw', 150, 350) }}
{{ district('central', 250, 250) }}
<g id="districts" transform="translate(0 165) translate(25 25)">
{{ district('outer_nw', 0, 0) }}
{{ district('outer_ne', 440, 0) }}
{{ district('outer_se', 440, 440) }}
{{ district('outer_sw', 0, 440) }}
{{ district('inner_nw', 110, 110) }}
{{ district('inner_ne', 330, 110) }}
{{ district('inner_se', 330, 330) }}
{{ district('inner_sw', 110, 330) }}
{{ district('central', 220, 220) }}
</g>
</svg>
{% endblock %}

0 comments on commit 7cf8b05

Please sign in to comment.