<commit_before>module Main exposing (..)

import BodyBuilder exposing (..)
import Elegant exposing (textCenter, padding, SizeUnit(..), fontSize)


theFontSize : number
theFontSize =
    15


view : a -> Node msg
view model =
    div [ style [ textCenter ] ]
        [ h1 [] [ text "I'm Elegantly styled by css" ]
        , p
            [ style [ fontSize (Px theFontSize) ]
            , hoverStyle [ fontSize (Px (theFontSize + 5)) ]
            ]
            [ text "Go Hover Me ! My style is set in my node, so it's parametrizable, but the result is a good old css node (look at the dom Luke)" ]
        ]


main : Program Basics.Never Int msg
main =
    program
        { init = ( 0, Cmd.none )
        , update = (\msg model -> ( model, Cmd.none ))
        , subscriptions = always Sub.none
        , view = view
        }<commit_msg>Refactor 02-Simple.elm<commit_after>module Main exposing (..)

import BodyBuilder exposing (Node)
import BodyBuilder.Attributes
import Elegant exposing (px, Style)
import Display
import Layout
import Typography
import Typography.Character as Character


theFontSize : number
theFontSize =
    15


view : a -> Node msg
view model =
    BodyBuilder.div
        [ BodyBuilder.Attributes.style
            [ Display.block
                [ Display.alignCenter ]
                []
                |> Elegant.style
            ]
        ]
        [ BodyBuilder.h1 []
            [ BodyBuilder.text "I'm Elegantly styled by css" ]
        , BodyBuilder.p
            [ BodyBuilder.Attributes.style
                [ Display.block []
                    [ Layout.typography
                        [ Typography.character
                            [ Character.size (px theFontSize) ]
                        ]
                    ]
                    |> Elegant.style
                , Display.block []
                    [ Layout.typography
                        [ Typography.character
                            [ Character.size (px (theFontSize + 5)) ]
                        ]
                    ]
                    |> Elegant.style
                    |> Elegant.setSuffix "hover"
                ]
            ]
            [ BodyBuilder.text "Go Hover Me ! My style is set in my node, so it's parametrizable, but the result is a good old css node (look at the dom Luke)" ]
        ]


main : Program Basics.Never Int msg
main =
    BodyBuilder.program
        { init = ( 0, Cmd.none )
        , update = (\msg model -> ( model, Cmd.none ))
        , subscriptions = always Sub.none
        , view = view
        }
{'fraction_non_alphanumeric': 0.08892355694227769, 'fraction_numerical': 0.0046801872074883, 'mean_word_length': 1.4428571428571428, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1502277', 'n_tokens_mistral': 716, 'n_tokens_neox': 667, 'n_words': 205}