├── demo1
├── Pages
│ ├── _ViewImports.cshtml
│ ├── Index.cshtml
│ ├── Counter.cshtml
│ └── FetchData.cshtml
├── global.json
├── wwwroot
│ ├── css
│ │ ├── open-iconic
│ │ │ ├── font
│ │ │ │ ├── fonts
│ │ │ │ │ ├── open-iconic.eot
│ │ │ │ │ ├── open-iconic.otf
│ │ │ │ │ ├── open-iconic.ttf
│ │ │ │ │ ├── open-iconic.woff
│ │ │ │ │ └── open-iconic.svg
│ │ │ │ └── css
│ │ │ │ │ └── open-iconic-bootstrap.min.css
│ │ │ ├── ICON-LICENSE
│ │ │ ├── README.md
│ │ │ └── FONT-LICENSE
│ │ ├── site.css
│ │ └── bootstrap
│ │ │ └── bootstrap.min.css
│ ├── index.html
│ └── sample-data
│ │ └── weather.json
├── _ViewImports.cshtml
├── App.cshtml
├── Shared
│ ├── MainLayout.cshtml
│ ├── SurveyPrompt.cshtml
│ └── NavMenu.cshtml
├── Program.cs
├── demo1.csproj
├── Properties
│ └── launchSettings.json
└── .gitignore
└── README.md
/demo1/Pages/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @layout MainLayout
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Web Assembly, Blazor and the Future of Web Development
--------------------------------------------------------------------------------
/demo1/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "2.1.300"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/demo1/Pages/Index.cshtml:
--------------------------------------------------------------------------------
1 | @page "/"
2 |
3 |
Hello, world!
4 |
5 | Welcome to your new app.
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo1/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/BlazorDemo/master/demo1/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/demo1/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/BlazorDemo/master/demo1/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/demo1/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/BlazorDemo/master/demo1/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/demo1/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/BlazorDemo/master/demo1/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/demo1/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Blazor.Layouts
3 | @using Microsoft.AspNetCore.Blazor.Routing
4 | @using demo1
5 | @using demo1.Shared
6 |
--------------------------------------------------------------------------------
/demo1/App.cshtml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
--------------------------------------------------------------------------------
/demo1/Pages/Counter.cshtml:
--------------------------------------------------------------------------------
1 | @page "/counter"
2 |
3 | Counter
4 |
5 | Current count: @currentCount
6 |
7 |
8 |
9 | @functions {
10 | int currentCount = 0;
11 |
12 | void IncrementCount()
13 | {
14 | currentCount++;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/demo1/Shared/MainLayout.cshtml:
--------------------------------------------------------------------------------
1 | @inherits BlazorLayoutComponent
2 |
3 |
6 |
7 |
8 |
11 |
12 |
13 | @Body
14 |
15 |
16 |
--------------------------------------------------------------------------------
/demo1/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | demo1
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/demo1/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Blazor.Browser.Rendering;
2 | using Microsoft.AspNetCore.Blazor.Browser.Services;
3 | using Microsoft.Extensions.DependencyInjection;
4 | using System;
5 |
6 | namespace demo1
7 | {
8 | public class Program
9 | {
10 | static void Main(string[] args)
11 | {
12 | var serviceProvider = new BrowserServiceProvider(services =>
13 | {
14 | // Add any custom services here
15 | });
16 |
17 | new BrowserRenderer(serviceProvider).AddComponent("app");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/demo1/Shared/SurveyPrompt.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
@Title
4 |
5 |
6 | Please take our
7 |
8 | brief survey
9 |
10 |
11 | and tell us what you think.
12 |
13 |
14 | @functions {
15 | [Parameter]
16 | string Title { get; set; } // Demonstrates how a parent component can supply parameters
17 | }
18 |
--------------------------------------------------------------------------------
/demo1/demo1.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | dotnet
6 | blazor serve
7 | 7.3
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/demo1/wwwroot/sample-data/weather.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "date": "2018-05-06",
4 | "temperatureC": 1,
5 | "summary": "Freezing",
6 | "temperatureF": 33
7 | },
8 | {
9 | "date": "2018-05-07",
10 | "temperatureC": 14,
11 | "summary": "Bracing",
12 | "temperatureF": 57
13 | },
14 | {
15 | "date": "2018-05-08",
16 | "temperatureC": -13,
17 | "summary": "Freezing",
18 | "temperatureF": 9
19 | },
20 | {
21 | "date": "2018-05-09",
22 | "temperatureC": -16,
23 | "summary": "Balmy",
24 | "temperatureF": 4
25 | },
26 | {
27 | "date": "2018-05-10",
28 | "temperatureC": -2,
29 | "summary": "Chilly",
30 | "temperatureF": 29
31 | }
32 | ]
33 |
--------------------------------------------------------------------------------
/demo1/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:6861/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "demo1": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:6862/"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/demo1/wwwroot/css/open-iconic/ICON-LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Waybury
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/demo1/Shared/NavMenu.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
demo1
3 |
6 |
7 |
8 |
27 |
28 | @functions {
29 | bool collapseNavMenu = true;
30 |
31 | void ToggleNavMenu()
32 | {
33 | collapseNavMenu = !collapseNavMenu;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/demo1/Pages/FetchData.cshtml:
--------------------------------------------------------------------------------
1 | @page "/fetchdata"
2 | @inject HttpClient Http
3 |
4 | Weather forecast
5 |
6 | This component demonstrates fetching data from the server.
7 |
8 | @if (forecasts == null)
9 | {
10 | Loading...
11 | }
12 | else
13 | {
14 |
15 |
16 |
17 | | Date |
18 | Temp. (C) |
19 | Temp. (F) |
20 | Summary |
21 |
22 |
23 |
24 | @foreach (var forecast in forecasts)
25 | {
26 |
27 | | @forecast.Date.ToShortDateString() |
28 | @forecast.TemperatureC |
29 | @forecast.TemperatureF |
30 | @forecast.Summary |
31 |
32 | }
33 |
34 |
35 | }
36 |
37 | @functions {
38 | WeatherForecast[] forecasts;
39 |
40 | protected override async Task OnInitAsync()
41 | {
42 | forecasts = await Http.GetJsonAsync("sample-data/weather.json");
43 | }
44 |
45 | class WeatherForecast
46 | {
47 | public DateTime Date { get; set; }
48 | public int TemperatureC { get; set; }
49 | public int TemperatureF { get; set; }
50 | public string Summary { get; set; }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/demo1/wwwroot/css/site.css:
--------------------------------------------------------------------------------
1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
2 |
3 | html, body {
4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
5 | }
6 |
7 | app {
8 | position: relative;
9 | display: flex;
10 | flex-direction: column;
11 | }
12 |
13 | .top-row {
14 | height: 3.5rem;
15 | display: flex;
16 | align-items: center;
17 | }
18 |
19 | .main {
20 | flex: 1;
21 | }
22 |
23 | .main .top-row {
24 | background-color: #e6e6e6;
25 | border-bottom: 1px solid #d6d5d5;
26 | }
27 |
28 | .sidebar {
29 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
30 | }
31 |
32 | .sidebar .top-row {
33 | background-color: rgba(0,0,0,0.4);
34 | }
35 |
36 | .sidebar .navbar-brand {
37 | font-size: 1.1rem;
38 | }
39 |
40 | .sidebar .oi {
41 | width: 2rem;
42 | font-size: 1.1rem;
43 | vertical-align: text-top;
44 | top: -2px;
45 | }
46 |
47 | .nav-item {
48 | font-size: 0.9rem;
49 | padding-bottom: 0.5rem;
50 | }
51 |
52 | .nav-item:first-of-type {
53 | padding-top: 1rem;
54 | }
55 |
56 | .nav-item:last-of-type {
57 | padding-bottom: 1rem;
58 | }
59 |
60 | .nav-item a {
61 | color: #d7d7d7;
62 | border-radius: 4px;
63 | height: 3rem;
64 | display: flex;
65 | align-items: center;
66 | line-height: 3rem;
67 | }
68 |
69 | .nav-item a.active {
70 | background-color: rgba(255,255,255,0.25);
71 | color: white;
72 | }
73 |
74 | .nav-item a:hover {
75 | background-color: rgba(255,255,255,0.1);
76 | color: white;
77 | }
78 |
79 | .content {
80 | padding-top: 1.1rem;
81 | }
82 |
83 | .navbar-toggler {
84 | background-color: rgba(255, 255, 255, 0.1);
85 | }
86 |
87 | @media (max-width: 767.98px) {
88 | .main .top-row {
89 | display: none;
90 | }
91 | }
92 |
93 | @media (min-width: 768px) {
94 | app {
95 | flex-direction: row;
96 | }
97 |
98 | .sidebar {
99 | width: 250px;
100 | height: 100vh;
101 | position: sticky;
102 | top: 0;
103 | }
104 |
105 | .main .top-row {
106 | position: sticky;
107 | top: 0;
108 | }
109 |
110 | .main > div {
111 | padding-left: 2rem !important;
112 | padding-right: 1.5rem !important;
113 | }
114 |
115 | .navbar-toggler {
116 | display: none;
117 | }
118 |
119 | .sidebar .collapse {
120 | /* Never collapse the sidebar for wide screens */
121 | display: block;
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/demo1/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 | .vs
9 | .idea/
10 |
11 | # Build results
12 |
13 | [Dd]ebug/
14 | [Rr]elease/
15 | x64/
16 | build/
17 | dist/
18 | [Bb]in/
19 | [Oo]bj/
20 | #dist/
21 | influxdb/
22 | influxdb/*
23 | postgres-data/
24 |
25 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
26 | !packages/*/build/
27 |
28 | # MSTest test Results
29 | [Tt]est[Rr]esult*/
30 | [Bb]uild[Ll]og.*
31 |
32 | *_i.c
33 | *_p.c
34 | *.ilk
35 | *.meta
36 | *.obj
37 | *.pch
38 | *.pdb
39 | *.pgc
40 | *.pgd
41 | *.rsp
42 | *.sbr
43 | *.tlb
44 | *.tli
45 | *.tlh
46 | *.tmp
47 | *.tmp_proj
48 | *.log
49 | *.vspscc
50 | *.vssscc
51 | .builds
52 | *.pidb
53 | *.log
54 | *.scc
55 |
56 | # Visual C++ cache files
57 | ipch/
58 | *.aps
59 | *.ncb
60 | *.opensdf
61 | *.sdf
62 | *.cachefile
63 |
64 | # Visual Studio profiler
65 | *.psess
66 | *.vsp
67 | *.vspx
68 |
69 | # Guidance Automation Toolkit
70 | *.gpState
71 |
72 | # ReSharper is a .NET coding add-in
73 | _ReSharper*/
74 | *.[Rr]e[Ss]harper
75 |
76 | # TeamCity is a build add-in
77 | _TeamCity*
78 |
79 | # DotCover is a Code Coverage Tool
80 | *.dotCover
81 |
82 | # NCrunch
83 | *.ncrunch*
84 | .*crunch*.local.xml
85 |
86 | # Installshield output folder
87 | [Ee]xpress/
88 |
89 | # DocProject is a documentation generator add-in
90 | DocProject/buildhelp/
91 | DocProject/Help/*.HxT
92 | DocProject/Help/*.HxC
93 | DocProject/Help/*.hhc
94 | DocProject/Help/*.hhk
95 | DocProject/Help/*.hhp
96 | DocProject/Help/Html2
97 | DocProject/Help/html
98 |
99 | # Click-Once directory
100 | publish/
101 |
102 | # Publish Web Output
103 | *.Publish.xml
104 |
105 | # NuGet Packages Directory
106 | packages/
107 | !packages/repositories.config
108 |
109 | # Windows Azure Build Output
110 | csx
111 | *.build.csdef
112 |
113 | # Windows Store app package directory
114 | AppPackages/
115 |
116 | # Others
117 | sql/
118 | *.Cache
119 | ClientBin/
120 | [Ss]tyle[Cc]op.*
121 | ~$*
122 | *~
123 | *.dbmdl
124 | *.[Pp]ublish.xml
125 | *.pfx
126 | *.publishsettings
127 | node_modules/
128 | bower_components/
129 | tmp/
130 |
131 | # RIA/Silverlight projects
132 | Generated_Code/
133 |
134 | # Backup & report files from converting an old project file to a newer
135 | # Visual Studio version. Backup files are not needed, because we have git ;-)
136 | _UpgradeReport_Files/
137 | Backup*/
138 | UpgradeLog*.XML
139 | UpgradeLog*.htm
140 |
141 | # SQL Server files
142 | App_Data/*.mdf
143 | App_Data/*.ldf
144 |
145 |
146 | #LightSwitch generated files
147 | GeneratedArtifacts/
148 | _Pvt_Extensions/
149 | ModelManifest.xml
150 |
151 | # =========================
152 | # Windows detritus
153 | # =========================
154 |
155 | # Windows image file caches
156 | Thumbs.db
157 | ehthumbs.db
158 |
159 | # Folder config file
160 | Desktop.ini
161 |
162 | # Recycle Bin used on file shares
163 | $RECYCLE.BIN/
164 |
165 | # Mac desktop service store files
166 | .DS_Store
167 |
168 | bower_components/
169 | node_modules/
170 | **/wwwroot/lib/
171 | **/wwwroot/img/media/
172 | .settings
173 | **/PublishProfiles/
174 | **/PublishScripts/
175 |
176 | # Angular 2
177 | # compiled output
178 | AdminApp/dist
179 | AdminApp/tmp
180 |
181 | # dependencies
182 | AdminApp/node_modules
183 | AdminApp/bower_components
184 |
185 | # IDEs and editors
186 | AdminApp/.idea
187 |
188 | # misc
189 | AdminApp/.sass-cache
190 | AdminApp/connect.lock
191 | AdminApp/coverage/*
192 | AdminApp/libpeerconnection.log
193 | AdminApp/AdminApp/npm-debug.log
194 | AdminApp/testem.log
195 | AdminApp/typings
196 |
197 | # e2e
198 | AdminApp/e2e/*.js
199 | AdminApp/e2e/*.map
200 |
201 | #System Files
202 | .DS_Store
203 | Thumbs.db
--------------------------------------------------------------------------------
/demo1/wwwroot/css/open-iconic/README.md:
--------------------------------------------------------------------------------
1 | [Open Iconic v1.1.1](http://useiconic.com/open)
2 | ===========
3 |
4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons)
5 |
6 |
7 |
8 | ## What's in Open Iconic?
9 |
10 | * 223 icons designed to be legible down to 8 pixels
11 | * Super-light SVG files - 61.8 for the entire set
12 | * SVG sprite—the modern replacement for icon fonts
13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats
14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats
15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px.
16 |
17 |
18 | ## Getting Started
19 |
20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections.
21 |
22 | ### General Usage
23 |
24 | #### Using Open Iconic's SVGs
25 |
26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute).
27 |
28 | ```
29 |
30 | ```
31 |
32 | #### Using Open Iconic's SVG Sprite
33 |
34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack.
35 |
36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `