Skip to content

Commit

Permalink
ui: Better header and container alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Jun 12, 2024
1 parent 1f94bfb commit 19a2d1d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@using LinkDotNet.Blog.Domain
@inject IJSRuntime JSRuntime

<h3>@Title</h3>

<div class="container">
<h3 class="fw-bold">@Title</h3>
<EditForm Model="@model" OnValidSubmit="OnValidBlogPostCreatedAsync">
<DataAnnotationsValidator />
<div class="mb-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
@inject IRepository<BlogPost> BlogPostRepository
@inject IToastService ToastService

<CreateNewBlogPost Title="Create new BlogPost" OnBlogPostCreated="@(StoreBlogPostAsync)" ></CreateNewBlogPost>
<CreateNewBlogPost Title="Create New Blog Post" OnBlogPostCreated="@(StoreBlogPostAsync)" ></CreateNewBlogPost>

@code {
private async Task StoreBlogPostAsync(BlogPost blogPost)
{
await BlogPostRepository.StoreAsync(blogPost);
ToastService.ShowInfo($"Created BlogPost {blogPost.Title}");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@if (blogPostFromDb is not null)
{
<CreateNewBlogPost
Title="Update BlogPost"
Title="Update Blog Post"
BlogPost="@blogPostFromDb"
OnBlogPostCreated="@StoreBlogPostAsync"
ClearAfterCreated="false"></CreateNewBlogPost>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
@using LinkDotNet.Blog.Web.Features.Admin.Dashboard.Components
@attribute [Authorize]

<div class="container-fluid ms-3">
<h3>Dashboard</h3>
<div class="container">
<h3 class="fw-bold">Dashboard</h3>
<div class="container-fluid">
<div class="row mt-3">
<div class="col-12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
@attribute [Authorize]
@inject IRepository<BlogPost> BlogPostRepository

<h3>Draft Blog Posts</h3>
<div class="container">
<h3 class="fw-bold">Draft Blog Posts</h3>

<div class="content px-4">
@for (var i = 0; i < blogPosts.Count; i++)
{
<ShortBlogPost BlogPost="blogPosts[i]" UseAlternativeStyle="@(i % 2 != 0)"></ShortBlogPost>
}
<div class="content px-4">
@for (var i = 0; i < blogPosts.Count; i++)
{
<ShortBlogPost BlogPost="blogPosts[i]" UseAlternativeStyle="@(i % 2 != 0)"></ShortBlogPost>
}
</div>
</div>

@code {
Expand All @@ -22,4 +24,4 @@
blogPosts = await BlogPostRepository.GetAllAsync(p => !p.IsPublished, b => b.UpdatedDate);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
@inject IInstantJobRegistry InstantJobRegistry
@attribute [Authorize]

<div class="container-fluid ms-3">
<h3>Settings</h3>
<div class="container">
<h3 class="fw-bold">Settings</h3>
<table class="table table-responsive table-hover">
<thead>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions src/LinkDotNet.Blog.Web/Features/Archive/ArchivePage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<OgData Title="Archive" Description="Explore all blog posts."></OgData>

<div class="ps-2">
<h3 class="pb-3">Archive (@blogPostCount posts)</h3>
<div class="container">
<h3 class="pb-3 fw-bold">Archive (@blogPostCount posts)</h3>

@if (blogPostsPerYear is null)
{
Expand Down

0 comments on commit 19a2d1d

Please sign in to comment.