Skip to content
Merged
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
18 changes: 0 additions & 18 deletions src/Blazor.Demo/Pages/Counter.razor

This file was deleted.

57 changes: 0 additions & 57 deletions src/Blazor.Demo/Pages/FetchData.razor

This file was deleted.

12 changes: 7 additions & 5 deletions src/Blazor.Demo/Pages/Index.razor
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
ο»Ώ@page "/"
@using Component.Core

<PageTitle>JSON Viewer Demo</PageTitle>
<PageTitle>JSON Viewer Component - Demo</PageTitle>

<div class="container-fluid mt-4">
<div class="row">
<div class="col-12">
<h1 class="text-center mb-4">
πŸš€ JSON Viewer Component Demo
πŸš€ JSON Viewer Component
</h1>
<p class="text-center text-muted mb-4">
A powerful JSON viewer for Blazor with search, statistics, and more!
</p>
</div>
</div>

<JsonViewer JsonData="@sampleJson"
IsEditable="true" />
<div class="row">
<div class="col-12">
<JsonViewer JsonData="@sampleJson" IsEditable="true" />
</div>
</div>

<div class="row mt-4">
<div class="col-12">
Expand Down
8 changes: 0 additions & 8 deletions src/Blazor.Demo/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
ο»Ώ@inherits LayoutComponentBase

<div class="page">
<div class="sidebar">
<NavMenu />
</div>

<main>
<div class="top-row px-4">
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
</div>

<article class="content px-4">
@Body
</article>
Expand Down
72 changes: 2 additions & 70 deletions src/Blazor.Demo/Shared/MainLayout.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,74 +8,6 @@ main {
flex: 1;
}

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

.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}

.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}

.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}

.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}

@media (max-width: 640.98px) {
.top-row:not(.auth) {
display: none;
}

.top-row.auth {
justify-content: space-between;
}

.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}

@media (min-width: 641px) {
.page {
flex-direction: row;
}

.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}

.top-row {
position: sticky;
top: 0;
z-index: 1;
}

.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}

.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
.content {
padding-top: 1.1rem;
}
36 changes: 1 addition & 35 deletions src/Blazor.Demo/Shared/NavMenu.razor
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
ο»Ώ<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">Blazor.Demo</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="/">JSON Viewer Component</a>
</div>
</div>

<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="oi oi-plus" aria-hidden="true"></span> Counter
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
</NavLink>
</div>
</nav>
</div>

@code {
private bool collapseNavMenu = true;

private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;

private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}
67 changes: 7 additions & 60 deletions src/Blazor.Demo/Shared/NavMenu.razor.css
Original file line number Diff line number Diff line change
@@ -1,68 +1,15 @@
.navbar-toggler {
background-color: rgba(255, 255, 255, 0.1);
}

.top-row {
height: 3.5rem;
background-color: rgba(0,0,0,0.4);
}

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

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

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

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

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

.nav-item ::deep a {
color: #d7d7d7;
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
}

.nav-item ::deep a.active {
background-color: rgba(255,255,255,0.25);
font-weight: 600;
color: white;
text-decoration: none;
}

.nav-item ::deep a:hover {
background-color: rgba(255,255,255,0.1);
color: white;
.navbar-brand:hover {
color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 641px) {
.navbar-toggler {
display: none;
}

.collapse {
/* Never collapse the sidebar for wide screens */
display: block;
}

.nav-scrollable {
/* Allow sidebar to scroll for tall menus */
height: calc(100vh - 3.5rem);
overflow-y: auto;
}
.navbar-dark {
background-color: rgba(0, 0, 0, 0.4);
padding: 1rem;
}
16 changes: 0 additions & 16 deletions src/Blazor.Demo/Shared/SurveyPrompt.razor

This file was deleted.

1 change: 1 addition & 0 deletions src/Blazor.Demo/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
@using Microsoft.JSInterop
@using Blazor.Demo
@using Blazor.Demo.Shared
@using Component.Core
2 changes: 1 addition & 1 deletion src/Blazor.Demo/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<base href="/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" />
<link href="JsonViewerComponent.Demo.styles.css" rel="stylesheet" />
<link href="Blazor.Demo.styles.css" rel="stylesheet" />

<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
Expand Down
27 changes: 0 additions & 27 deletions src/Blazor.Demo/wwwroot/sample-data/weather.json

This file was deleted.

Loading
Loading