Update styling

This commit is contained in:
Joop Schilder 2021-05-10 23:32:04 +02:00
parent 362bc58c1f
commit 9c46725c8c

View File

@ -31,9 +31,6 @@ if ($form_submitted) {
.narrow {
width: 80%;
}
.off-the-wall {
margin-left: 3em;
}
.with-breating-room {
margin: 1.5em 1em;
}
@ -126,30 +123,32 @@ if ($form_submitted) {
</form>
</div>
<?php if ($form_submitted): ?>
<table class="bordered narrow off-the-wall">
<tr><th class="width-padded height-padded bordered" colspan="100%">
Component table for <?php printf("%.3g Ω ", $tweeter_impedance) ?> tweeter
and <?php printf("%.3g Ω", $woofer_impedance) ?> woofer
</th></tr>
<tr>
<th class="width-padded height-padded bordered">Crossover Frequency (Hz)</th>
<th class="width-padded height-padded bordered">Tweeter Capacitor (μF)</th>
<th class="width-padded height-padded bordered">Woofer Inductor (mH)</th>
</tr>
<?php for ($f = FREQ_MIN; $f <= FREQ_MAX; $f += FREQ_MIN): ?>
<div class="with-breathing-room height-padded width-padded">
<table class="bordered narrow">
<tr><th class="width-padded height-padded bordered" colspan="100%">
Component table for <?php printf("%.3g Ω ", $tweeter_impedance) ?> tweeter
and <?php printf("%.3g Ω", $woofer_impedance) ?> woofer
</th></tr>
<tr>
<td class="width-padded height-padded bordered monospace">
<?php printf("%g", $f); ?>
</td>
<td class="width-padded height-padded bordered monospace">
<?php printf("%.4g", 1000_000. * (1. / (TWO_PI * $f * $tweeter_impedance))); ?>
</td>
<td class="width-padded height-padded bordered monospace">
<?php printf("%.4g", 1000. * ($woofer_impedance / (TWO_PI * $f))); ?>
</td>
<th class="width-padded height-padded bordered">Crossover Frequency (Hz)</th>
<th class="width-padded height-padded bordered">Tweeter Capacitor (μF)</th>
<th class="width-padded height-padded bordered">Woofer Inductor (mH)</th>
</tr>
<?php endfor ?>
</table>
<?php for ($f = FREQ_MIN; $f <= FREQ_MAX; $f += FREQ_MIN): ?>
<tr>
<td class="width-padded height-padded bordered monospace">
<?php printf("%g", $f); ?>
</td>
<td class="width-padded height-padded bordered monospace">
<?php printf("%.4g", 1000_000. * (1. / (TWO_PI * $f * $tweeter_impedance))); ?>
</td>
<td class="width-padded height-padded bordered monospace">
<?php printf("%.4g", 1000. * ($woofer_impedance / (TWO_PI * $f))); ?>
</td>
</tr>
<?php endfor ?>
</table>
</div>
<?php endif ?>
</body>
</html>