Changes
5 changed files (+36/-15)
-
-
@@ -26,6 +26,7 @@ pub fn build(b: *std.Build) !void {compile.addMainElmSourceFile(b.path("src/Main.elm")); compile.addElmSourceFile(b.path("src/Html/LivingStandard.elm")); compile.addElmSourceFile(b.path("src/Length.elm")); compile.addElmSourceFile(b.path("src/Parameters.elm")); compile.addElmSourceFile(b.path("src/Parameters/Constraints.elm"));
-
-
-
@@ -0,0 +1,18 @@-- Copyright 2026 Shota FUJI -- -- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at https://mozilla.org/MPL/2.0/. -- -- SPDX-License-Identifier: MPL-2.0 module Html.LivingStandard exposing (..) import Html exposing (Attribute) import Html.Attributes exposing (attribute) slot : String -> Attribute msg slot name = attribute "slot" name
-
-
-
@@ -12,7 +12,7 @@ module Main exposing (main)import Browser import Browser.Navigation exposing (Key) import Html exposing (hr, node, p) import Html.Attributes exposing (attribute) import Html.LivingStandard exposing (..) import Json.Decode import Parameters exposing (Parameters) import Parameters.Form
-
@@ -123,10 +123,10 @@ view model =[ node "x-app-layout" [] [ node "x-preview" [ attribute "slot" "preview" ] [ slot "preview" ] [ template model.parameters [] ] , node "x-panel" [ attribute "slot" "parameters" ] [ slot "parameters" ] [ node "x-parameters" [] ((Parameters.Form.view
-
-
-
@@ -13,6 +13,7 @@ import Dict exposing (Dict)import Html exposing (hr, input, label, node, p, span, text) import Html.Attributes exposing (..) import Html.Events exposing (onInput) import Html.LivingStandard exposing (..) import Length exposing (Length, toMM) import Parameters exposing (Parameters) import Parameters.Constraints exposing (NumberConstraints, constraints)
-
@@ -317,9 +318,9 @@ field : Model -> FieldProps InternalMsg -> Html.Html InternalMsgfield model { key, title, description, attrs, unit } = node "x-field" [] [ label [ for (Key.toString key), attribute "slot" "title" ] title [ label [ for (Key.toString key), slot "title" ] title , p [ id (descriptionId key), attribute "slot" "description" ] [ id (descriptionId key), slot "description" ] description , node "x-number-input" []
-
@@ -334,13 +335,13 @@ field model { key, title, description, attrs, unit } =[] , case unit of Just u -> span [ attribute "slot" "unit" ] [ text u ] span [ slot "unit" ] [ text u ] Nothing -> text "" ] , p [ id (errorId key), attribute "slot" "error" ] [ id (errorId key), slot "error" ] (Dict.get (Key.toString key) model.errors |> Maybe.map errorText |> Maybe.withDefault []
-
@@ -358,8 +359,8 @@ group : GroupProps InternalMsg -> List (Html.Html InternalMsg) -> Html.Html Integroup { title, description } children = node "x-field-group" [] (p [ attribute "slot" "title" ] title :: (description |> Maybe.map (p [ attribute "slot" "description" ]) |> Maybe.withDefault (text "")) (p [ slot "title" ] title :: (description |> Maybe.map (p [ slot "description" ]) |> Maybe.withDefault (text "")) :: children )
-
-
-
@@ -12,6 +12,7 @@ port module Preferences.App exposing (Model, Msg, init, panelItems, update)import Html exposing (..) import Html.Attributes exposing (..) import Html.Events import Html.LivingStandard exposing (..) import Json.Decode as Decode import Json.Encode as Encode import Preferences exposing (Preferences, PreviewTheme(..))
-
@@ -110,8 +111,8 @@ radioBox { label, description, name, value, checked, onCheck } attrs =else class "" ] [ Html.label [ for id, attribute "slot" "label" ] label , Html.p [ Html.Attributes.id (descriptionId id), attribute "slot" "description" ] description [ Html.label [ for id, slot "label" ] label , Html.p [ Html.Attributes.id (descriptionId id), slot "description" ] description , input (type_ "radio" :: Html.Attributes.id id
-
@@ -129,13 +130,13 @@ panelItems : Model -> List (Html Msg)panelItems model = [ node "x-field-group" [] [ p [ attribute "slot" "title" ] [ text "Preferences" ] , p [ attribute "slot" "description" ] [ text "These parameters are saved to this browser, and will not be shared." ] [ p [ slot "title" ] [ text "Preferences" ] , p [ slot "description" ] [ text "These parameters are saved to this browser, and will not be shared." ] , node "x-field" [] [ span [ attribute "slot" "title" ] [ text "Preview Color Theme" ] [ span [ slot "title" ] [ text "Preview Color Theme" ] , p [ attribute "slot" "description" [ slot "description" , id (descriptionId previewThemeId) ] [ text "This does not affect print output." ]
-