Skip to content

Commit

Permalink
Stubs for ribbit development
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxWilson committed Jan 22, 2024
1 parent 04cc883 commit e801722
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
<Compile Include="Core\Coroutine.fs" />
<Compile Include="Core\Packrat.fs" />
<Compile Include="Core\Menus.fs" />
<Compile Include="Ribbit\RibbitCore.fs" />
<Compile Include="Domain\ADND\PriestSpells.fs" />
<Compile Include="Domain\DFRPG\Chargen.Templates.fs" />
<Compile Include="UI\CommonUI.fs" />
<Compile Include="UI\LocalStorage.fs" />
<Compile Include="UI\DFRPG\Chargen.fs" />
<Compile Include="UI\DFRPG\ChargenView.fs" />
<Compile Include="UI\ADND\PriestSpellsView.fs" />
<Compile Include="UI\Ribbit\RibbitPlaygroundView.fs" />
<Compile Include="UI\Components.fs" />
<Compile Include="Main.fs" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let Router() =
let lookup = [
"priestSpells", "Priest Spells by Sphere", (fun () -> UI.ADND.PriestSpells.View.View())
"dfrpgChargen", "Create a character for Dungeon Fantasy RPG", (fun () -> UI.DFRPG.Chargen.View.View())
"playground", "Ribbit Playground (under construction)", (fun () -> UI.Ribbit.PlaygroundView.View())
]
let (|Segment|_|) segment =
lookup |> List.tryFind (fun (s, _, _) -> s = segment)
Expand Down
3 changes: 3 additions & 0 deletions src/Ribbit/RibbitCore.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[<AutoOpen>]
module Ribbit.Core

22 changes: 22 additions & 0 deletions src/UI/Ribbit/RibbitPlaygroundView.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module UI.Ribbit.PlaygroundView
open Ribbit
open Feliz
open Feliz.UseElmish

type DataKey = string
type Value = Text of string | Number of int
type DataBank = Map<DataKey, Value>
type TODO = Unit
type Model = { data: DataBank; definitions: TODO }
with
static member fresh = { data = Map.empty; definitions = () }

type Msg = TODO

let init _ = Model.fresh

let update msg model = model

let View() =
let model dispatch = React.useElmishSimple init update
Html.div "RibbitPlayground: placeholder"

0 comments on commit e801722

Please sign in to comment.