Skip to content

Demo #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 30, 2020
Merged

Demo #33

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion demo/WasmHost/App.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<LazyRouter AppAssembly="@typeof(Program).Assembly">
<Loading Context="moduleName">
<LayoutView Layout="@typeof(MainLayout)">
<p>Loading... please wait</p>
<div class="pureCenter full light">
<div class="loader light"></div>
</div>
</LayoutView>
</Loading>
<Found Context="routeData">
Expand Down
2 changes: 1 addition & 1 deletion demo/WasmHost/Pages/Counter.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

<Lazy Name="SimpleComponent">
<div>LOADING SIMPLECOMPONENT...</div>
<div class="loader light"></div>
</Lazy>

<Lazy Name="NamedComponent" />
Expand Down
4 changes: 0 additions & 4 deletions demo/WasmHost/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
</div>

<div class="main">
<div class="top-row px-4">
<a href="http://blazor.net" target="_blank" class="ml-md-auto">About</a>
</div>

<div class="content px-4">
@Body
</div>
Expand Down
12 changes: 6 additions & 6 deletions demo/WasmHost/Shared/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@

<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<ul class="nav flex-column">
<li class="nav-item px-3">
<li class="nav-item">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</li>
<li class="nav-item px-3">
<li class="nav-item">
<NavLink class="nav-link" href="counter">
<span class="oi oi-plus" aria-hidden="true"></span> Counter
</NavLink>
</li>
<li class="nav-item px-3">
<li class="nav-item">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch Data
</NavLink>
</li>
<li class="nav-item px-3">
<li class="nav-item">
<NavLink class="nav-link" href="simple-page">
<span class="oi oi-list-rich" aria-hidden="true"></span> (Lazy) Simple Page
</NavLink>
</li>
<li class="nav-item px-3">
<li class="nav-item">
<NavLink class="nav-link" href="page-with-param/hello">
<span class="oi oi-list-rich" aria-hidden="true"></span> (Lazy) Page with Param
</NavLink>
</li>
<li class="nav-item px-3">
<li class="nav-item">
<NavLink class="nav-link" href="@Guid.NewGuid()">
<span class="oi oi-list-rich" aria-hidden="true"></span> (404) Error Page
</NavLink>
Expand Down
9 changes: 4 additions & 5 deletions demo/WasmHost/wwwroot/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@

<body>
<app>
<div class="pureCenter">
<div class="loader"></div>
<div class="pureCenter overlay light">
<div class="loader light"></div>
</div>
</app>

<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />

<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>

<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />
<script src="_framework/blazor.webassembly.js"></script>
</body>

Expand Down
43 changes: 38 additions & 5 deletions demo/WasmHost/wwwroot/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,46 @@
}

.pureCenter {
width: 100vw;
height: 100vh;
position:relative;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #000000;
color: #ffffff;
}

.overlay {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
}

.overlay.dark {
background-color: black;
color: white;
}

.overlay.light {
background-color: white;
color: black;
}

.full {
position: absolute;
top:0; left:0;
width: 100%;
height: 100%;
position: absolute;
background-color: black;
color: white;
}

.full.dark {
background-color: black;
color: white;
}

.full.light {
background-color: white;
color: black;
}
12 changes: 10 additions & 2 deletions demo/WasmHost/wwwroot/css/loader.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
.loader {
border: 3px solid #ffffff;
border: 3px solid;
border-radius: 50%;
border-top: 1.5em solid white;
border-top: 1.5em solid;
width: 3em;
height: 3em;

-webkit-animation: spin 1.5s cubic-bezier(.68,-0.55,.27,1.55) infinite; /* Safari */
animation: spin 1.5s cubic-bezier(.68,-0.55,.27,1.55) infinite;
}

.loader.light {
color: black;
}

.loader.dark {
color: white;
}

/* Safari */
@-webkit-keyframes spin {
0% {
Expand Down
38 changes: 20 additions & 18 deletions demo/WasmHost/wwwroot/css/site.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-family: Roboto, sans-serif;
}

a, .btn-link {
Expand All @@ -21,17 +21,18 @@ app {
}

.top-row {
height: 3.5rem;
height: 5rem;
display: flex;
align-items: center;
}

.main {
flex: 1;
position: relative;
}

.main .top-row {
background-color: #f7f7f7;
background-color: rgb(109, 94, 172);
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
}
Expand All @@ -47,58 +48,59 @@ app {
}

.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
background-color: #3f4a59;
color: rgb(255, 255, 255);
}

.sidebar .top-row {
background-color: rgba(0,0,0,0.4);
background-color: #6d5eac;
}

.sidebar .navbar-brand {
font-size: 1.1rem;
font-size: 1.25rem;
}

.sidebar .oi {
width: 2rem;
font-size: 1.1rem;
vertical-align: text-top;
top: -2px;
margin-right: 1rem;
}

.sidebar .nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
}

.sidebar .nav-item:first-of-type {
/*.sidebar .nav-item:first-of-type {
padding-top: 1rem;
}

.sidebar .nav-item:last-of-type {
padding-bottom: 1rem;
}
}*/

.sidebar .nav-item a {
color: #d7d7d7;
border-radius: 4px;
height: 3rem;
color: rgb(255, 255, 255);
height: 4rem;
display: flex;
align-items: center;
line-height: 3rem;
}

.sidebar .nav-item a.active {
background-color: rgba(255,255,255,0.25);
color: white;
background-color: #239b8f;
}

.sidebar .nav-item a:hover {
background-color: rgba(255,255,255,0.1);
color: white;
background-color: rgba(0,0,0,0.1);
}

.sidebar .nav-item a.active:hover {
background-color: #239b8f;
}

.content {
padding-top: 1.1rem;
padding-top: 1.5rem;
}

.navbar-toggler {
Expand Down
4 changes: 2 additions & 2 deletions demo/WasmHost/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

<body>
<app>
<div class="pureCenter">
<div class="loader"></div>
<div class="pureCenter overlay light">
<div class="loader light"></div>
</div>
</app>

Expand Down