From a7a98fa0d0262aded7ac01e1c4605e5d3b284320 Mon Sep 17 00:00:00 2001 From: DavidOnTop Date: Thu, 12 Jun 2025 14:37:09 +0200 Subject: [PATCH] basics setup --- .config/dotnet-tools.json | 7 ++ .editorconfig | 31 +++++++ DavidOnTop.fsproj | 2 + build.fsx | 18 ++-- fake.fsx | 27 ++++-- global.css | 8 +- index.html | 3 +- paket.dependencies | 5 +- paket.lock | 176 ++++++++++++++++++++++++++++++++++++-- src/Components/Nav.fs | 22 +++++ src/Pages/About.fs | 7 ++ src/Pages/Index.fs | 7 ++ src/Program.fs | 19 ++-- 13 files changed, 301 insertions(+), 31 deletions(-) create mode 100644 .editorconfig create mode 100644 src/Components/Nav.fs create mode 100644 src/Pages/About.fs create mode 100644 src/Pages/Index.fs diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 9959679..87c1450 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,6 +15,13 @@ "paket" ], "rollForward": false + }, + "fantomas": { + "version": "7.0.2", + "commands": [ + "fantomas" + ], + "rollForward": false } } } \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..20f7ecf --- /dev/null +++ b/.editorconfig @@ -0,0 +1,31 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +trim_trailing_whitespace = true +indent_size = 4 +tab_width = 4 +indent_style = tab +max_line_length = 1000 + +[*.cs] +csharp_new_line_before_open_brace = none +csharp_new_line_before_else = false +csharp_new_line_before_catch = false +csharp_new_line_before_finally = false +csharp_preserve_single_line_statements = true +csharp_preserve_single_line_blocks = true + +[*.{fs,fsx,fsi}] +fsharp_record_multiline_formatter = number_of_items +fsharp_max_array_or_list_number_of_items = 2 +fsharp_array_or_list_multiline_formatter = number_of_items +fsharp_multiline_bracket_style = stroustrup +fsharp_newline_before_multiline_computation_expression = true + +[*.{yml,yaml}] +indent_size = 2 +indent_style = space \ No newline at end of file diff --git a/DavidOnTop.fsproj b/DavidOnTop.fsproj index 0e17dd4..e224ca5 100644 --- a/DavidOnTop.fsproj +++ b/DavidOnTop.fsproj @@ -5,6 +5,8 @@ net9.0 + + diff --git a/build.fsx b/build.fsx index 899f8f2..3c9b54c 100755 --- a/build.fsx +++ b/build.fsx @@ -9,6 +9,7 @@ let run cmd args = p.StartInfo.UseShellExecute <- false p.Start() |> ignore p.WaitForExit() + if p.ExitCode <> 0 then failwithf "Command '%s %s' failed with exit code %d.\n" cmd args p.ExitCode @@ -23,9 +24,8 @@ if not (System.IO.File.Exists ".restored") then open Fake.Core -let args = - System.Environment.GetCommandLineArgs() - |> Array.skip 2 +let args = System.Environment.GetCommandLineArgs() |> Array.skip 2 + args |> Array.toList |> Context.FakeExecutionContext.Create false "build.fsx" @@ -36,13 +36,9 @@ args Target.create "list" (fun _ -> printfn "\n\n" - Target.listAvailable() - printfn "\n\n" -) + Target.listAvailable () + printfn "\n\n") -let cmd = - args - |> Array.tryItem 0 - |> Option.defaultValue "list" +let cmd = args |> Array.tryItem 0 |> Option.defaultValue "list" -Target.runOrDefaultWithArguments cmd \ No newline at end of file +Target.runOrDefaultWithArguments cmd diff --git a/fake.fsx b/fake.fsx index 1518023..2593d39 100644 --- a/fake.fsx +++ b/fake.fsx @@ -1,11 +1,26 @@ #load @".paket/load/net9.0/Build/build.group.fsx" open Fake.Core +open Fake.DotNet +open Fake.IO -Target.create "build" (fun _ -> - ignore 0 -) +Target.create "fmt" (fun _ -> ignore 0) -Target.create "run" (fun _ -> - Shell.Exec("dotnet", "fable -o out -s --watch -e .fs.jsx --run bun run dev") |> ignore -) +Target.create "build" (fun _ -> ignore 0) + +Target.create "run" (fun _ -> + Shell.Exec("dotnet", "fable -o out -s --watch -e .fs.jsx --run bun run dev") + |> ignore) + +Target.create "clean" (fun _ -> + DotNet.exec (fun o -> o) "fable" "clean -o out" |> ignore + DotNet.exec (fun o -> o) "clean" |> ignore + Directory.delete "node_modules" + Directory.delete "bin" + Directory.delete "out" + Directory.delete "dist" + Directory.delete "obj" + Directory.delete "packages" + Directory.delete "paket-files" + Directory.delete ".paket" + File.delete ".restored") diff --git a/global.css b/global.css index a461c50..6f33bc9 100644 --- a/global.css +++ b/global.css @@ -1 +1,7 @@ -@import "tailwindcss"; \ No newline at end of file +@import "tailwindcss"; + +@theme { + --color-bckg: #0f0f0f; + --color-bckgl: #242424; + --color-accent: var(--color-yellow-400); +} \ No newline at end of file diff --git a/index.html b/index.html index 40adf6d..d87ff41 100644 --- a/index.html +++ b/index.html @@ -1,10 +1,11 @@ - + DavidOnTop + diff --git a/paket.dependencies b/paket.dependencies index 41b0285..b74b2b2 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -10,4 +10,7 @@ nuget Fable.Core group Build generate_load_scripts: true source https://api.nuget.org/v3/index.json - nuget Fake.Core.Target \ No newline at end of file + + nuget Fake.Core.Target + nuget Fake.IO.FileSystem + nuget Fake.DotNet.Cli \ No newline at end of file diff --git a/paket.lock b/paket.lock index cee364f..d4381dc 100644 --- a/paket.lock +++ b/paket.lock @@ -40,6 +40,10 @@ GROUP Build GENERATE-LOAD-SCRIPTS: ON NUGET remote: https://api.nuget.org/v3/index.json + BlackFox.VsWhere (1.1) - restriction: >= netstandard2.0 + FSharp.Core (>= 4.0.0.1) - restriction: >= net45 + FSharp.Core (>= 4.2.3) - restriction: && (< net45) (>= netstandard2.0) + Microsoft.Win32.Registry (>= 4.7) - restriction: && (< net45) (>= netstandard2.0) Fake.Core.CommandLineParsing (6.1.3) - restriction: >= netstandard2.0 FParsec (>= 1.1.1) - restriction: >= netstandard2.0 FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 @@ -58,6 +62,8 @@ NUGET Fake.IO.FileSystem (>= 6.1.3) - restriction: >= netstandard2.0 FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 + Fake.Core.SemVer (6.1.3) - restriction: >= netstandard2.0 + FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 Fake.Core.String (6.1.3) - restriction: >= netstandard2.0 FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 Fake.Core.Target (6.1.3) @@ -70,12 +76,54 @@ NUGET Fake.Core.Trace (>= 6.1.3) - restriction: >= netstandard2.0 FSharp.Control.Reactive (>= 5.0.2) - restriction: >= netstandard2.0 FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 + Fake.Core.Tasks (6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 6.1.3) - restriction: >= netstandard2.0 + FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 Fake.Core.Trace (6.1.3) - restriction: >= netstandard2.0 Fake.Core.Environment (>= 6.1.3) - restriction: >= netstandard2.0 Fake.Core.FakeVar (>= 6.1.3) - restriction: >= netstandard2.0 FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Xml (6.1.3) - restriction: >= netstandard2.0 Fake.Core.String (>= 6.1.3) - restriction: >= netstandard2.0 + FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 + Fake.DotNet.Cli (6.1.3) + Fake.Core.Environment (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.String (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.DotNet.MSBuild (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.DotNet.NuGet (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 6.1.3) - restriction: >= netstandard2.0 + FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 + Mono.Posix.NETStandard (>= 1.0) - restriction: >= netstandard2.0 + Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 + Fake.DotNet.MSBuild (6.1.3) - restriction: >= netstandard2.0 + BlackFox.VsWhere (>= 1.1) - restriction: >= netstandard2.0 + Fake.Core.Environment (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.String (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 6.1.3) - restriction: >= netstandard2.0 + FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (>= 2.1.815) - restriction: >= netstandard2.0 + Fake.DotNet.NuGet (6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Environment (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Process (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.SemVer (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.String (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Tasks (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Xml (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Net.Http (>= 6.1.3) - restriction: >= netstandard2.0 + FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 + Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 + NuGet.Protocol (>= 6.10.1) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (6.1.3) + Fake.Core.String (>= 6.1.3) - restriction: >= netstandard2.0 + Fake.Core.Trace (>= 6.1.3) - restriction: >= netstandard2.0 + FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 + Fake.Net.Http (6.1.3) - restriction: >= netstandard2.0 Fake.Core.Trace (>= 6.1.3) - restriction: >= netstandard2.0 FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 FParsec (1.1.1) - restriction: >= netstandard2.0 @@ -85,18 +133,134 @@ NUGET FSharp.Core (>= 6.0.7) - restriction: >= netstandard2.0 System.Reactive (>= 6.0.1) - restriction: >= netstandard2.0 FSharp.Core (9.0.300) - restriction: >= netstandard2.0 - System.Buffers (4.6.1) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Bcl.AsyncInterfaces (9.0.6) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net8.0) (>= netstandard2.0)) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Bcl.Cryptography (9.0.6) - restriction: || (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= net462) (>= net8.0)) (&& (< net472) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net8.0) (< net9.0)) (&& (>= net8.0) (< netstandard2.1)) (&& (< net8.0) (>= netstandard2.1)) + System.Formats.Asn1 (>= 9.0.6) - restriction: || (>= net462) (&& (>= net8.0) (< net9.0)) (&& (< net8.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + Microsoft.Build.Framework (17.14.8) - restriction: >= netstandard2.0 + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net9.0) (>= netstandard2.0) + System.Diagnostics.DiagnosticSource (>= 9.0) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + System.Memory (>= 4.6) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net9.0) (>= netstandard2.0) + System.Text.Json (>= 9.0) - restriction: >= net472 + System.Threading.Tasks.Extensions (>= 4.6) - restriction: >= net472 + Microsoft.Build.Utilities.Core (17.14.8) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.14.8) - restriction: >= netstandard2.0 + Microsoft.IO.Redist (>= 6.1) - restriction: >= net472 + Microsoft.NET.StringTools (>= 17.14.8) - restriction: >= netstandard2.0 + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net9.0) (>= netstandard2.0) + System.Collections.Immutable (>= 9.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 9.0) - restriction: >= netstandard2.0 + System.Diagnostics.DiagnosticSource (>= 9.0) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + System.Diagnostics.EventLog (>= 9.0) - restriction: >= net9.0 + System.Memory (>= 4.6) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + System.Security.Cryptography.ProtectedData (>= 9.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net9.0) + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net9.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (>= 9.0) - restriction: && (< net472) (< net9.0) (>= netstandard2.0) + System.Text.Json (>= 9.0) - restriction: >= net472 + System.Threading.Tasks.Extensions (>= 4.6) - restriction: >= net472 + Microsoft.IO.Redist (6.1.3) - restriction: >= net472 + System.Buffers (>= 4.6.1) - restriction: >= net472 + System.Memory (>= 4.6.3) - restriction: >= net472 + Microsoft.NET.StringTools (17.14.8) - restriction: >= netstandard2.0 + System.Memory (>= 4.6) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (< monoandroid) (>= net8.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) + Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net9.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) + System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.2.472) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.6) - restriction: && (< net8.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.1) - restriction: && (< net8.0) (>= netstandard2.0) + Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 + NuGet.Common (6.14) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.14) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 + NuGet.Configuration (6.14) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.14) - restriction: >= netstandard2.0 + System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) + NuGet.Frameworks (6.14) - restriction: >= netstandard2.0 + NuGet.Packaging (6.14) - restriction: >= netstandard2.0 + Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.14) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.14) - restriction: >= netstandard2.0 + System.Formats.Asn1 (>= 8.0.1) - restriction: && (< net472) (< net8.0) (>= netstandard2.0) + System.Memory (>= 4.5.5) - restriction: >= net472 + System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net8.0) + System.Text.Json (>= 8.0.5) - restriction: || (>= net472) (&& (< net8.0) (>= netstandard2.0)) + NuGet.Protocol (6.14) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.14) - restriction: >= netstandard2.0 + System.Text.Json (>= 8.0.5) - restriction: || (>= net472) (&& (< net8.0) (>= netstandard2.0)) + NuGet.Versioning (6.14) - restriction: >= netstandard2.0 + System.Buffers (4.6.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net8.0) (< netstandard2.1)) (&& (< net8.0) (>= netstandard2.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Collections.Immutable (9.0.6) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) - System.Memory (4.6.3) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net8.0) (>= netstandard2.0)) + System.Configuration.ConfigurationManager (9.0.6) - restriction: >= netstandard2.0 + System.Diagnostics.EventLog (>= 9.0.6) - restriction: >= net8.0 + System.Security.Cryptography.ProtectedData (>= 9.0.6) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net8.0) + System.Diagnostics.DiagnosticSource (9.0.6) - restriction: || (>= net472) (&& (< net9.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Diagnostics.EventLog (9.0.6) - restriction: >= net8.0 + System.Formats.Asn1 (9.0.6) - restriction: || (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= net462) (>= net8.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net472) (< net8.0) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net8.0) (< net9.0)) (&& (>= net8.0) (< netstandard2.1)) (&& (< net8.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net8.0) (>= netstandard2.1)) (&& (>= netcoreapp3.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.ValueTuple (>= 4.5) - restriction: >= net462 + System.IO.Pipelines (9.0.6) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net8.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Memory (4.6.3) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net8.0) (< netstandard2.1)) (&& (< net8.0) (>= net9.0)) (&& (< net8.0) (>= netstandard2.0)) (&& (< net9.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Numerics.Vectors (>= 4.6.1) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Numerics.Vectors (4.6.1) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) System.Reactive (6.0.1) - restriction: >= netstandard2.0 System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net472) (&& (< net6.0) (>= netstandard2.0)) (>= uap10.1) - System.Runtime.CompilerServices.Unsafe (6.1.2) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net8.0) (>= netstandard2.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) - System.Threading.Tasks.Extensions (4.6.3) - restriction: || (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Runtime.CompilerServices.Unsafe (6.1.2) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net8.0) (< netstandard2.1)) (&& (< net8.0) (>= netstandard2.0)) (&& (< net8.0) (>= netstandard2.1)) (&& (< net9.0) (>= netstandard2.0)) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) + System.Security.AccessControl (6.0.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net8.0) (< netstandard2.1)) (&& (< net8.0) (>= netstandard2.1)) + Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) + System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Security.Cryptography.Pkcs (9.0.6) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net8.0) + Microsoft.Bcl.Cryptography (>= 9.0.6) - restriction: || (>= net462) (&& (>= net8.0) (< net9.0)) (&& (< net8.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) + System.Formats.Asn1 (>= 9.0.6) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net8.0) (< net9.0)) (&& (< net8.0) (>= netstandard2.1)) + System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net8.0) (>= netstandard2.1)) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net8.0) (>= netstandard2.1)) + System.Security.Cryptography.ProtectedData (9.0.6) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net8.0) + System.Memory (>= 4.5.5) - restriction: && (< net462) (< net8.0) (>= netstandard2.0) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (< net472) (< net9.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) + System.Text.Encoding.CodePages (9.0.6) - restriction: && (< net472) (< net9.0) (>= netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Text.Encodings.Web (9.0.6) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net8.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Text.Json (9.0.6) - restriction: || (>= net472) (&& (< net8.0) (>= netstandard2.0)) + Microsoft.Bcl.AsyncInterfaces (>= 9.0.6) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.IO.Pipelines (>= 9.0.6) - restriction: || (>= net462) (&& (>= net8.0) (< net9.0)) (&& (< net8.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.Text.Encodings.Web (>= 9.0.6) - restriction: || (>= net462) (&& (>= net8.0) (< net9.0)) (&& (< net8.0) (>= netstandard2.0)) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) + System.ValueTuple (>= 4.5) - restriction: >= net462 + System.Threading.Tasks.Extensions (4.6.3) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net8.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) (&& (>= netstandard2.0) (>= uap10.1)) System.Runtime.CompilerServices.Unsafe (>= 6.1.2) - restriction: || (>= net462) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) - System.ValueTuple (4.6.1) - restriction: && (>= net45) (>= netstandard2.0) + System.ValueTuple (4.6.1) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) diff --git a/src/Components/Nav.fs b/src/Components/Nav.fs new file mode 100644 index 0000000..058b674 --- /dev/null +++ b/src/Components/Nav.fs @@ -0,0 +1,22 @@ +module DavidOnTop.Components.Nav + +open Oxpecker.Solid +open Oxpecker.Solid.Tags + +[] +let Nav () = + nav (class' = "flex z-[5] justify-around items-center fixed top-0 h-12 w-full bg-bckgl") { + img (class' = "max-h-10", src = "https://pubfs.s3.davidon.top/logo-transparent.png") + + div () { + a (class' = "hover:bg-bckg min-h-8 h-1 px-3 py-1.5 rounded-sm mx-1 font-bold", href = "/") { "Home" } + a (class' = "hover:bg-bckg min-h-8 h-1 px-3 py-1.5 rounded-sm mx-1 font-bold", href = "/about") { "About" } + a (class' = "hover:bg-bckg min-h-8 h-1 px-3 py-1.5 rounded-sm mx-1 font-bold", href = "https://git.davidon.top/DavidOnTop") { "Projects" } + } + + div (class' = "group relative inline-block") { + div (class' = "group-hover:bg-bckg group-focus:bg-bckg min-h-8 h-1 px-3 py-1.5 rounded-sm mx-1 font-bold", tabindex = -1) { "Contact Me" } + + div (class' = "invisible group-hover:visible group-focus:visible pl-15 z-50 pb-15 fixed w-5", tabindex = -1) { a (class' = "absolute mt-3 px-3 py-1.5 z-50 bg-bckgl rounded-sm", href = "mailto:me@davidon.top", tabindex = -1) { "Mail" } } + } + } diff --git a/src/Pages/About.fs b/src/Pages/About.fs new file mode 100644 index 0000000..a8733ec --- /dev/null +++ b/src/Pages/About.fs @@ -0,0 +1,7 @@ +[] +module DavidOnTop.Pages.About + +open Oxpecker.Solid + +[] +let About () : HtmlElement = Fragment() { } diff --git a/src/Pages/Index.fs b/src/Pages/Index.fs new file mode 100644 index 0000000..ea95601 --- /dev/null +++ b/src/Pages/Index.fs @@ -0,0 +1,7 @@ +[] +module DavidOnTop.Pages.Index + +open Oxpecker.Solid + +[] +let Index () : HtmlElement = div () { "" } diff --git a/src/Program.fs b/src/Program.fs index f96cf70..8a6aea4 100644 --- a/src/Program.fs +++ b/src/Program.fs @@ -1,10 +1,19 @@ -open Oxpecker.Solid +module DavidOnTop.Program + +open Oxpecker.Solid open Browser +open Oxpecker.Solid.Router +open DavidOnTop.Components.Nav + +open DavidOnTop.Pages + +let routes: RootConfig[] = [| RootConfig("/", lazy' (fun _ -> promise { return Index() })) |] [] -let root() = - div() { - "Hello World from Solid fable" +let root () = + Fragment() { + Nav() + main () { Router() { yield routes } } } -render (root, document.getElementsByTagName("body")[0]) \ No newline at end of file +render (root, document.getElementsByTagName("body")[0])