Skip to content

Instantly share code, notes, and snippets.

View object's full-sized avatar

Vagif Abilov object

View GitHub Profile
@object
object / Shared.fs
Created June 27, 2024 18:16
Fable workshop (2024). Step 7. Shared.fs
namespace Shared
open System
module Route =
let hello = "/api/hello"
let files = "/api/files"
module Dto =
@object
object / index.html
Created June 27, 2024 18:12
Fable workshop (2024). Step 6. index.html
<!doctype html>
<html>
<head>
<title>SAFE Template</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.0/css/bulma.min.css"/>
<script src="https://kit.fontawesome.com/409fb4cc7a.js" crossorigin="anonymous"></script>
</head>
<body>
@object
object / View.fs
Created June 27, 2024 18:05
Fable workshop (2024). Step 6. View.fs
module View
open Feliz
open Feliz.Bulma
open System
open Model
open Messages
let view (state : Model) dispatch =
@object
object / Update.fs
Last active October 18, 2024 09:12
Fable workshop (2024). Step 6. Update.fs
module Update
open System
open Elmish
open Fable.SimpleHttp
open Model
open Messages
let tryParseWith (tryParseFunc: string -> bool * _) = tryParseFunc >> function
@object
object / Model.fs
Created June 27, 2024 18:03
Fable workshop (2024). Step 6. Model.fs
module Model
[<RequireQualifiedAccess>]
type EventSet =
| Small
| Large
type Model =
{ EventSet: EventSet
PlaybackDelay : int
@object
object / View.fs
Last active June 27, 2024 17:50
Fable workshop (2024). Step 5. View.fs
module View
open Feliz
open System
open Model
open Messages
let view (state : Model) dispatch =
@object
object / App.fs
Created June 27, 2024 17:34
Fable workshop (2024). Step 4. App.fs
module App
open Elmish
open Elmish.React
open Update
open View
Program.mkProgram init update view
|> Program.withReactSynchronous "elmish-app"
@object
object / App.fs
Last active June 27, 2024 15:56
Fable workshop (2024). Step 4. App.fs
module App
open Elmish
open Elmish.React
#if DEBUG
open Elmish.Debug
open Elmish.HMR
#endif
@object
object / Index.fs
Created June 27, 2024 12:17
Fable workshop (2024). Step 3. Index.fs
module Index
open Elmish
open Fable.SimpleHttp
type Model = {
Filename: string
Events : string
Error : string }
@object
object / App.fs
Last active June 27, 2024 12:11
Fable workshop (2024). Step 3. App.fs
module App
open Elmish
open Elmish.React
Program.mkProgram Index.init Index.update Index.view
|> Program.withReactSynchronous "elmish-app"
|> Program.run