update frontend

This commit is contained in:
2022-10-12 17:37:31 -07:00
parent 66169cd629
commit dd5e74cb1a
5 changed files with 33 additions and 23 deletions

View File

@@ -15,15 +15,15 @@
<br>
<label for="i_darkcurrent">I_Darkcurrent</label>
<input type="number" name="i_darkcurrent" value="150.5"/>
<input type="number" name="i_darkcurrent" value="150.5" step="0.1"/>
<br>
<label for="exposure_time">Exposure Time <i>t</i></label>
<input type="number" name="exposure_time" value="0.5"/>
<input type="number" name="exposure_time" value="0.5" step="0.1"/>
<br>
<label for="f_stop">F-stop <i>f</i></label>
<input type="number" name="f_stop" value="2.4"/>
<input type="number" name="f_stop" value="2.4" step=0.1/>
<br>
<h4>Temperature Settings</h4>
@@ -36,6 +36,16 @@
<input type="number" name="max_temp" value="1200"/>
<br>
<h4>Output Settings</h4>
<label for="smoothing_radius">Smoothing Radius (px)</label>
<input type="number" name="smoothing_radius" value="2"/>
<br>
<label for="legend_entries">Legend Entries</label>
<input type="number" name="legend_entries" value="20"/>
<br>
<br>
<input type="submit" value="Generate Heatmap"/>
</form>

View File

@@ -10,12 +10,10 @@
{# Original image #}
<td class="img-table-cell" id="orig-cell">
<img class="img-out" src="data:image/png;base64,{{ img_orig_b64 }}" alt="original image">
{# <img class="img-out" src="{{ img_orig_path }}" alt="original image"> #}
</td>
{# Result image #}
<td class="img-table-cell" id="res-cell">
<img class="img-out" src="data:image/png;base64,{{ img_res_b64 }}" alt="result image">
{# <img class="img-out" src="{{ img_res_path }}" alt="resulting heatmap"> #}
</td>
</tr>
{# Legend #}
@@ -24,17 +22,16 @@
<td class="img-table-cell">
<table class="legend" id="legend">
<tr>
<th>Color</th>
<th>Temperature</th>
<th class="legend-heading">Color</th>
<th class="legend-heading">Temperature</th>
</tr>
{% for temp, color in legend.items() %}
<tr>
<td class="legend-cell"><div style="width:20px;height:20px;background-color:{{ color }};"></div></td>
<td class="legend-cell"><div style="width:30px;height:20px;background-color:{{ color }};"></div></td>
<td class="legend-cell">{{ temp }}°C</td>
</tr>
{% endfor %}
</table>
</td>
</tr>
</table>
@@ -52,8 +49,18 @@
width: 32rem;
}
.legend {
border-spacing: 0px;
border-collapse: collapse;
}
.legend-heading {
padding: 4px;
}
.legend-cell {
padding: 4px 30px;
border-width: 0px;
padding: 0px 20px;
}
</style>