This repository has been archived by the owner on Sep 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63f1123
commit 1a2217f
Showing
23 changed files
with
1,025 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web;Microsoft.NET.Sdk.Razor/2.1.0-preview2-30230"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<RunCommand>dotnet</RunCommand> | ||
<RunArguments>blazor serve</RunArguments> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Flatware" Version="0.0.1" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.0-preview2-30230" PrivateAssets="all" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Browser" Version="0.1.0" PrivateAssets="all" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.1.0" /> | ||
<DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.1.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\FlatwareLib\FlatwareLib.fsproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Microsoft.AspNetCore.Blazor.Browser.Rendering; | ||
using Microsoft.AspNetCore.Blazor.Browser.Services; | ||
using System; | ||
using Flatware; | ||
using Library1; | ||
|
||
namespace BlazorApp1 | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
var serviceProvider = new BrowserServiceProvider(configure => | ||
{ | ||
// Add any custom services here | ||
configure.AddFlatware<MyMsg, MyMdl>(MyMdl.Init); | ||
}); | ||
|
||
new BrowserRenderer(serviceProvider).AddComponent<App>("app"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"sdk": { | ||
"version": "2.1.300-preview1-008174" | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
sample/flatware-standalone/FlatwareApp/wwwroot/css/bootstrap/bootstrap-native.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
sample/flatware-standalone/FlatwareApp/wwwroot/css/bootstrap/bootstrap.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
sample/flatware-standalone/FlatwareApp/wwwroot/css/bootstrap/bootstrap.min.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+19.7 KB
sample/flatware-standalone/FlatwareApp/wwwroot/css/fonts/glyphicons-halflings-regular.eot
Binary file not shown.
288 changes: 288 additions & 0 deletions
288
...tware-standalone/FlatwareApp/wwwroot/css/fonts/glyphicons-halflings-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.3 KB
sample/flatware-standalone/FlatwareApp/wwwroot/css/fonts/glyphicons-halflings-regular.ttf
Binary file not shown.
Binary file added
BIN
+22.9 KB
sample/flatware-standalone/FlatwareApp/wwwroot/css/fonts/glyphicons-halflings-regular.woff
Binary file not shown.
Binary file added
BIN
+17.6 KB
sample/flatware-standalone/FlatwareApp/wwwroot/css/fonts/glyphicons-halflings-regular.woff2
Binary file not shown.
96 changes: 96 additions & 0 deletions
96
sample/flatware-standalone/FlatwareApp/wwwroot/css/site.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
.main-nav li .glyphicon { | ||
margin-right: 10px; | ||
} | ||
|
||
/* Highlighting rules for nav menu items */ | ||
.main-nav li a.active, | ||
.main-nav li a.active:hover, | ||
.main-nav li a.active:focus { | ||
background-color: #4189C7; | ||
color: white; | ||
} | ||
|
||
/* Keep the nav menu independent of scrolling and on top of other items */ | ||
.main-nav { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
z-index: 1; | ||
} | ||
|
||
@media (max-width: 767px) { | ||
/* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */ | ||
body { | ||
padding-top: 50px; | ||
} | ||
} | ||
|
||
@media (min-width: 768px) { | ||
/* On small screens, convert the nav menu to a vertical sidebar */ | ||
.main-nav { | ||
height: 100%; | ||
width: calc(25% - 20px); | ||
} | ||
.main-nav .navbar { | ||
border-radius: 0px; | ||
border-width: 0px; | ||
height: 100%; | ||
} | ||
.main-nav .navbar-header { | ||
float: none; | ||
} | ||
.main-nav .navbar-collapse { | ||
border-top: 1px solid #444; | ||
padding: 0px; | ||
} | ||
.main-nav .navbar ul { | ||
float: none; | ||
} | ||
.main-nav .navbar li { | ||
float: none; | ||
font-size: 15px; | ||
margin: 6px; | ||
} | ||
.main-nav .navbar li a { | ||
padding: 10px 16px; | ||
border-radius: 4px; | ||
} | ||
.main-nav .navbar a { | ||
/* If a menu item's text is too long, truncate it */ | ||
width: 100%; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
} | ||
|
||
/* | ||
Temporary workaround due to the <blazor-component> wrapper element. The wrapper element | ||
will be eliminated in a future update, making this workaround unnecessary. | ||
*/ | ||
.navbar-nav > li a { | ||
color: #9d9d9d; | ||
line-height: 20px; | ||
position: relative; | ||
display: block; | ||
} | ||
.navbar-nav > li a:hover { | ||
color: #fff; | ||
background-color: transparent; | ||
text-decoration: none; | ||
} | ||
.navbar-nav > li a:focus { | ||
text-decoration: none; | ||
} | ||
|
||
.alert-survey { | ||
color: #6a6969; | ||
background-color: #e8e8e8; | ||
border-color: #d3d3d3; | ||
margin-top: 25px; | ||
} | ||
|
||
.alert-survey a { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>BlazorApp1</title> | ||
<base href="/" /> | ||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" /> | ||
<link href="css/site.css" rel="stylesheet" /> | ||
</head> | ||
<body> | ||
<app>Loading...</app> | ||
|
||
<script src="css/bootstrap/bootstrap-native.min.js"></script> | ||
<script type="blazor-boot"></script> | ||
</body> | ||
</html> |
32 changes: 32 additions & 0 deletions
32
sample/flatware-standalone/FlatwareApp/wwwroot/sample-data/weather.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[ | ||
{ | ||
"Date": "2018-05-06", | ||
"TemperatureC": 1, | ||
"Summary": "Freezing", | ||
"TemperatureF": 33 | ||
}, | ||
{ | ||
"Date": "2018-05-07", | ||
"TemperatureC": 14, | ||
"Summary": "Bracing", | ||
"TemperatureF": 57 | ||
}, | ||
{ | ||
"Date": "2018-05-08", | ||
"TemperatureC": -13, | ||
"Summary": "Freezing", | ||
"TemperatureF": 9 | ||
}, | ||
{ | ||
"Date": "2018-05-09", | ||
"TemperatureC": -16, | ||
"Summary": "Balmy", | ||
"TemperatureF": 4 | ||
}, | ||
{ | ||
"Date": "2018-05-10", | ||
"TemperatureC": -2, | ||
"Summary": "Chilly", | ||
"TemperatureF": 29 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
namespace BlazorApp1 | ||
|
||
open System | ||
open System.Collections.Generic | ||
open System.Linq | ||
open System.Threading.Tasks | ||
open System.Net.Http | ||
open Microsoft.AspNetCore.Blazor | ||
open Microsoft.AspNetCore.Blazor.Browser.Rendering | ||
open Microsoft.AspNetCore.Blazor.Browser.Services | ||
open Microsoft.AspNetCore.Blazor.Components | ||
open Microsoft.AspNetCore.Blazor.Layouts | ||
open Microsoft.AspNetCore.Blazor.Routing | ||
open Trail | ||
open BlazorApp1 | ||
open BlazorApp1.Shared | ||
open Library1 | ||
|
||
type Marker = class end | ||
|
||
type App() = | ||
inherit MyAppComponent() | ||
|
||
override __.Render() = | ||
Dom.comp<Router> [Dom.BlazorObjAttribute("AppAssembly", box typeof<Marker>.Assembly)] [] | ||
|
||
override this.OnInitAsync() = | ||
this.DispatchAsync(MyMsg.LoadWeather) :> Task | ||
|
||
(* | ||
// TODO: can we go ALL the way? | ||
module Program = | ||
[<EntryPoint>] | ||
let main _ = | ||
let serviceProvider = new BrowserServiceProvider(fun configure -> | ||
// Add any custom services here | ||
() | ||
) | ||
(new BrowserRenderer(serviceProvider)).AddComponent<App>("app") | ||
0 | ||
*) |
Oops, something went wrong.