Skip to content

Commit

Permalink
Rename: old-websites -> time-machine
Browse files Browse the repository at this point in the history
Github pages takes precedence over my own routing apparently lol
  • Loading branch information
joshuanianji committed Jan 27, 2024
1 parent de35054 commit ea99b71
Show file tree
Hide file tree
Showing 9 changed files with 681 additions and 65 deletions.
4 changes: 2 additions & 2 deletions app/Route/Index.elm
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ footer =
]
, Html.p
[]
[ Html.text "Fun fact: This is the 5th iteration of my website! "
, Util.textLink "See other iterations" "/old-websites"
[ Html.text "Fun fact: This is the 6th iteration of my website! "
, Util.textLink "See other iterations" "/time-machine"
, Html.text "."
]
]
2 changes: 1 addition & 1 deletion app/Route/OldWebsites.elm → app/Route/TimeMachine.elm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Route.OldWebsites exposing (Model, Msg, RouteParams, route, Data, ActionData)
module Route.TimeMachine exposing (Model, Msg, RouteParams, route, Data, ActionData)

{-|
Expand Down
157 changes: 157 additions & 0 deletions codegen/Gen/Fetcher/AllProjects.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
module Gen.Fetcher.AllProjects exposing (call_, moduleName_, submit, values_)

{-|
@docs values_, call_, submit, moduleName_
-}


import Elm
import Elm.Annotation as Type


{-| The name of this module. -}
moduleName_ : List String
moduleName_ =
[ "Fetcher", "AllProjects" ]


{-| submit:
(Result Http.Error Route.AllProjects.ActionData -> msg)
-> { fields : List ( String, String ), headers : List ( String, String ) }
-> Pages.Fetcher.Fetcher msg
-}
submit :
(Elm.Expression -> Elm.Expression)
-> { fields : List Elm.Expression, headers : List Elm.Expression }
-> Elm.Expression
submit submitArg submitArg0 =
Elm.apply
(Elm.value
{ importFrom = [ "Fetcher", "AllProjects" ]
, name = "submit"
, annotation =
Just
(Type.function
[ Type.function
[ Type.namedWith
[]
"Result"
[ Type.namedWith [ "Http" ] "Error" []
, Type.namedWith
[ "Route", "AllProjects" ]
"ActionData"
[]
]
]
(Type.var "msg")
, Type.record
[ ( "fields"
, Type.list (Type.tuple Type.string Type.string)
)
, ( "headers"
, Type.list (Type.tuple Type.string Type.string)
)
]
]
(Type.namedWith
[ "Pages", "Fetcher" ]
"Fetcher"
[ Type.var "msg" ]
)
)
}
)
[ Elm.functionReduced "submitUnpack" submitArg
, Elm.record
[ Tuple.pair "fields" (Elm.list submitArg0.fields)
, Tuple.pair "headers" (Elm.list submitArg0.headers)
]
]


call_ : { submit : Elm.Expression -> Elm.Expression -> Elm.Expression }
call_ =
{ submit =
\submitArg submitArg0 ->
Elm.apply
(Elm.value
{ importFrom = [ "Fetcher", "AllProjects" ]
, name = "submit"
, annotation =
Just
(Type.function
[ Type.function
[ Type.namedWith
[]
"Result"
[ Type.namedWith [ "Http" ] "Error" []
, Type.namedWith
[ "Route", "AllProjects" ]
"ActionData"
[]
]
]
(Type.var "msg")
, Type.record
[ ( "fields"
, Type.list
(Type.tuple Type.string Type.string)
)
, ( "headers"
, Type.list
(Type.tuple Type.string Type.string)
)
]
]
(Type.namedWith
[ "Pages", "Fetcher" ]
"Fetcher"
[ Type.var "msg" ]
)
)
}
)
[ submitArg, submitArg0 ]
}


values_ : { submit : Elm.Expression }
values_ =
{ submit =
Elm.value
{ importFrom = [ "Fetcher", "AllProjects" ]
, name = "submit"
, annotation =
Just
(Type.function
[ Type.function
[ Type.namedWith
[]
"Result"
[ Type.namedWith [ "Http" ] "Error" []
, Type.namedWith
[ "Route", "AllProjects" ]
"ActionData"
[]
]
]
(Type.var "msg")
, Type.record
[ ( "fields"
, Type.list (Type.tuple Type.string Type.string)
)
, ( "headers"
, Type.list (Type.tuple Type.string Type.string)
)
]
]
(Type.namedWith
[ "Pages", "Fetcher" ]
"Fetcher"
[ Type.var "msg" ]
)
)
}
}


36 changes: 18 additions & 18 deletions codegen/Gen/Icosahedron.elm
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,22 @@ view viewArg =
[ viewArg ]


{-| init: Int -> Float -> Model -}
init : Int -> Float -> Elm.Expression
init initArg initArg0 =
{-| init: Config -> Model -}
init : Elm.Expression -> Elm.Expression
init initArg =
Elm.apply
(Elm.value
{ importFrom = [ "Icosahedron" ]
, name = "init"
, annotation =
Just
(Type.function
[ Type.int, Type.float ]
[ Type.namedWith [] "Config" [] ]
(Type.namedWith [] "Model" [])
)
}
)
[ Elm.int initArg, Elm.float initArg0 ]
[ initArg ]


annotation_ : { model : Type.Annotation, msg : Type.Annotation }
Expand All @@ -98,10 +98,10 @@ annotation_ =
"Model"
[]
(Type.record
[ ( "size", Type.int )
, ( "azimuth", Type.namedWith [] "Angle" [] )
[ ( "azimuth", Type.namedWith [] "Angle" [] )
, ( "elevation", Type.namedWith [] "Angle" [] )
, ( "mouse", Type.namedWith [] "Mouse" [] )
, ( "config", Type.namedWith [] "Config" [] )
]
)
, msg = Type.namedWith [ "Icosahedron" ] "Msg" []
Expand All @@ -110,10 +110,10 @@ annotation_ =

make_ :
{ model :
{ size : Elm.Expression
, azimuth : Elm.Expression
{ azimuth : Elm.Expression
, elevation : Elm.Expression
, mouse : Elm.Expression
, config : Elm.Expression
}
-> Elm.Expression
}
Expand All @@ -126,18 +126,18 @@ make_ =
"Model"
[]
(Type.record
[ ( "size", Type.int )
, ( "azimuth", Type.namedWith [] "Angle" [] )
[ ( "azimuth", Type.namedWith [] "Angle" [] )
, ( "elevation", Type.namedWith [] "Angle" [] )
, ( "mouse", Type.namedWith [] "Mouse" [] )
, ( "config", Type.namedWith [] "Config" [] )
]
)
)
(Elm.record
[ Tuple.pair "size" model_args.size
, Tuple.pair "azimuth" model_args.azimuth
[ Tuple.pair "azimuth" model_args.azimuth
, Tuple.pair "elevation" model_args.elevation
, Tuple.pair "mouse" model_args.mouse
, Tuple.pair "config" model_args.config
]
)
}
Expand All @@ -147,7 +147,7 @@ call_ :
{ subscriptions : Elm.Expression -> Elm.Expression
, update : Elm.Expression -> Elm.Expression -> Elm.Expression
, view : Elm.Expression -> Elm.Expression
, init : Elm.Expression -> Elm.Expression -> Elm.Expression
, init : Elm.Expression -> Elm.Expression
}
call_ =
{ subscriptions =
Expand Down Expand Up @@ -206,20 +206,20 @@ call_ =
)
[ viewArg ]
, init =
\initArg initArg0 ->
\initArg ->
Elm.apply
(Elm.value
{ importFrom = [ "Icosahedron" ]
, name = "init"
, annotation =
Just
(Type.function
[ Type.int, Type.float ]
[ Type.namedWith [] "Config" [] ]
(Type.namedWith [] "Model" [])
)
}
)
[ initArg, initArg0 ]
[ initArg ]
}


Expand Down Expand Up @@ -273,7 +273,7 @@ values_ =
, annotation =
Just
(Type.function
[ Type.int, Type.float ]
[ Type.namedWith [] "Config" [] ]
(Type.namedWith [] "Model" [])
)
}
Expand Down
Loading

0 comments on commit ea99b71

Please sign in to comment.