Restyle calculator

This commit is contained in:
2023-08-22 13:14:56 +02:00
parent 7b95b69c7b
commit a82e75999b
3 changed files with 130 additions and 58 deletions
+90 -35
View File
@@ -11657,62 +11657,117 @@ var $author$project$Calculator$view = F2(
[
$elm$html$Html$text(' ÷ '),
A2(
$elm$html$Html$input,
$elm$html$Html$div,
_List_fromArray(
[
$elm$html$Html$Attributes$class('formula-input'),
$elm$html$Html$Attributes$disabled(true),
$elm$html$Html$Attributes$value(
$elm$core$String$fromFloat(1 + taxGroup.percentage))
$elm$html$Html$Attributes$class('form-input --inline')
]),
_List_Nil)
_List_fromArray(
[
A2(
$elm$html$Html$label,
_List_fromArray(
[
$elm$html$Html$Attributes$for('tax')
]),
_List_fromArray(
[
$elm$html$Html$text('Steuer')
])),
A2(
$elm$html$Html$input,
_List_fromArray(
[
$elm$html$Html$Attributes$value(
$elm$core$String$fromFloat(1 + taxGroup.percentage)),
$elm$html$Html$Attributes$id('tax'),
$elm$html$Html$Attributes$type_('number'),
$elm$html$Html$Attributes$step('0.01'),
$elm$html$Html$Attributes$disabled(true)
]),
_List_Nil)
]))
]);
var resultPart = _List_fromArray(
[
$elm$html$Html$text(' = '),
$elm$html$Html$text(
A2(
$elm$html$Html$input,
_List_fromArray(
[
$elm$html$Html$Attributes$class('formula-input'),
$elm$html$Html$Attributes$disabled(true),
$elm$html$Html$Attributes$value(
A2(
$elm$core$Maybe$withDefault,
'?',
A2(
$elm$core$Maybe$map,
$elm$core$String$fromFloat,
A2($author$project$Calculator$getResult, model, taxGroup))))
]),
_List_Nil)
$elm$core$Maybe$withDefault,
'?',
A2(
$elm$core$Maybe$map,
$elm$core$String$fromFloat,
A2($author$project$Calculator$getResult, model, taxGroup))))
]);
var mainPart = _List_fromArray(
[
$elm$html$Html$text('('),
A2(
$elm$html$Html$input,
$elm$html$Html$div,
_List_fromArray(
[
$elm$html$Html$Attributes$class('formula-input'),
$elm$html$Html$Attributes$placeholder('Gebindepreis'),
$elm$html$Html$Attributes$value(
$author$project$NumberInput$show(model.bundlePrice)),
$elm$html$Html$Events$onInput($author$project$Calculator$SetBundlePrice)
$elm$html$Html$Attributes$class('form-input --inline')
]),
_List_Nil),
_List_fromArray(
[
A2(
$elm$html$Html$label,
_List_fromArray(
[
$elm$html$Html$Attributes$for('bundle-price')
]),
_List_fromArray(
[
$elm$html$Html$text('Gebindepreis')
])),
A2(
$elm$html$Html$input,
_List_fromArray(
[
$elm$html$Html$Attributes$placeholder('Gebindepreis'),
$elm$html$Html$Attributes$value(
$author$project$NumberInput$show(model.bundlePrice)),
$elm$html$Html$Events$onInput($author$project$Calculator$SetBundlePrice),
$elm$html$Html$Attributes$id('bundle-price'),
$elm$html$Html$Attributes$type_('number'),
$elm$html$Html$Attributes$step('0.01')
]),
_List_Nil)
])),
$elm$html$Html$text(' ÷ '),
A2(
$elm$html$Html$input,
$elm$html$Html$div,
_List_fromArray(
[
$elm$html$Html$Attributes$class('formula-input'),
$elm$html$Html$Attributes$placeholder('Gebindegröße'),
$elm$html$Html$Attributes$value(
$author$project$NumberInput$show(model.bundleSize)),
$elm$html$Html$Events$onInput($author$project$Calculator$SetBundleSize)
$elm$html$Html$Attributes$class('form-input --inline')
]),
_List_Nil),
_List_fromArray(
[
A2(
$elm$html$Html$label,
_List_fromArray(
[
$elm$html$Html$Attributes$for('bundle-size')
]),
_List_fromArray(
[
$elm$html$Html$text('Gebindegröße')
])),
A2(
$elm$html$Html$input,
_List_fromArray(
[
$elm$html$Html$Attributes$placeholder('Gebindegröße'),
$elm$html$Html$Attributes$value(
$author$project$NumberInput$show(model.bundleSize)),
$elm$html$Html$Events$onInput($author$project$Calculator$SetBundleSize),
$elm$html$Html$Attributes$id('bundle-size'),
$elm$html$Html$Attributes$type_('number'),
$elm$html$Html$Attributes$step('1')
]),
_List_Nil)
])),
$elm$html$Html$text(') ')
]);
return A2(
+7 -2
View File
@@ -63,6 +63,11 @@ th {
.form-input > select {
display: block;
}
.formula-input {
width: 10em;
.form-input.--inline {
display: inline-block;
}
.form-input.--inline > input:not([type=radio]),
.form-input.--inline > select {
display: block;
width: 8em;
}