Skip to content

Commit 5e3dbf0

Browse files
committed
assign new bootstrap theme
1 parent 1df6ed4 commit 5e3dbf0

File tree

19 files changed

+8847
-75
lines changed

19 files changed

+8847
-75
lines changed

Blog/Blog/Views/AboutMe/AboutMeForm.cshtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ViewData["Title"] = Model.Id == 0 ? "Create Post" : "Edit Post";
55
}
66

7-
<h1>About Me</h1>
7+
<h1 class="mb-4 text-center">About Me</h1>
88
@if (Model.Id == 0)
99
{
1010
<h3>Create</h3>
@@ -35,7 +35,7 @@ else
3535
<span asp-validation-for="@Model.Description" class="text-danger"></span>
3636
</div>
3737

38-
<h3>Contacts</h3>
38+
<h3 class="mt-5">Contacts</h3>
3939
<hr />
4040
<div class="form-group">
4141
<label asp-for="@Model.Contacts.Phone" class="control-label"></label>
@@ -64,7 +64,7 @@ else
6464
<span asp-validation-for="@Model.Contacts.PostAddress" class="text-danger"></span>
6565
</div>
6666

67-
<h3>Websites</h3>
67+
<h3 class="mt-5">Websites</h3>
6868
<hr />
6969
<div class="form-group">
7070
<label asp-for="@Model.Websites.Website" class="control-label"></label>
@@ -107,7 +107,7 @@ else
107107
<span asp-validation-for="@Model.Websites.Vkontakte" class="text-danger"></span>
108108
</div>
109109

110-
<h3>Image</h3>
110+
<h3 class="mt-5">Image</h3>
111111
<hr />
112112
<div class="form-group">
113113
<label asp-for="ImagePath" class="control-label"></label>

Blog/Blog/Views/AboutMe/Details.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@model Blog.Models.AboutMe
22

33
@{
4-
ViewData["Title"] = "Details";
4+
ViewData["Title"] = "About Me Details";
55
}
66

77
<h1>Details</h1>

Blog/Blog/Views/AboutMe/Index.cshtml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
@model Blog.Models.AboutMe
22

33
@{
4-
ViewData["Title"] = "Index";
4+
ViewData["Title"] = Model.Title;
55
}
66

7-
<section id="about-me">
7+
<section id="about-me" class="mb-4">
88
<div class="container col-md-12">
99
<div class="text-center">
1010
@if (!string.IsNullOrEmpty(@Model.ImagePath))
1111
{
1212
<div class="about-me-img" style="background-image:url('/content/img/@Model.ImagePath');"></div>
1313
}
14-
<div class="row col-md-5 mx-auto justify-content-between">
14+
<div class="row col-md-5 mx-auto justify-content-between mb-3">
1515
@if (!string.IsNullOrEmpty(Model.Websites.Website))
1616
{
1717
<a class="social-link text-dark" href="@Model.Websites.Website"><i class="fas fa-newspaper"></i></a>
@@ -51,9 +51,6 @@
5151
</div>
5252
</section>
5353

54-
55-
56-
5754
<div class="float-right">
5855
@if (Model != null)
5956
{

Blog/Blog/Views/Home/Details.cshtml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
@{
44
ViewBag.Title = Model.Title;
5-
ViewBag.Description = Model.Excerpt;
6-
ViewBag.Keywords = Model.Tags;
5+
ViewBag.Description = Model?.Excerpt;
6+
ViewBag.Keywords = $"{ Model.Tags?.Replace(",", "") } { Model.Title }";
77
}
88

99
<section class="post">
1010
<div class="container my-3">
1111
<div class="card col-md-12 border-0 py-3 mb-3">
1212
@if (!string.IsNullOrEmpty(@Model.ImagePath))
1313
{
14-
<div class="g-item-news-details" style="background-image:url('/content/img/@Model.ImagePath');"></div>
14+
<div class="g-item-news-details mb-3" style="background-image:url('/content/img/@Model.ImagePath');"></div>
1515
}
1616
<div class="card-body">
17-
<h2 class="card-title">@Model.Title</h2>
17+
<h2 class="card-title text-center mb-3">@Model.Title</h2>
1818
<p class="card-text">@Html.Raw(Model.Content)</p>
1919

2020
<div class="col-md-3 col-lg-8 text-right ml-auto">
@@ -23,20 +23,21 @@
2323
</div>
2424
</div>
2525
</div>
26+
<div class="d-flex justify-content-center justify-content-md-end">
27+
<a asp-controller="Posts" asp-action="Details" asp-route-id="@Model.Id" class="btn btn-primary my-1"><i class="fas fa-eye"></i> Details</a>
28+
<a asp-controller="Posts" asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-warning my-1"><i class="fas fa-edit"></i> Edit</a>
29+
<a asp-controller="Posts" asp-action="Delete" asp-route-id="@Model.Id" class="btn btn-danger my-1"
30+
onclick="return confirm('Are you sure to delete this?');">
31+
<i class="fas fa-trash"></i> Delete
32+
</a>
33+
</div>
2634
<hr />
27-
<div class="col-md-4">
35+
<div class="col-sm-12 col-md-3">
2836
<h4>Share</h4>
2937
<partial name="_PostShareButtons" model="@Model" />
3038
</div>
3139
</div>
32-
<div class="col-sm-12 col-md-4 ml-auto">
33-
<a asp-controller="Posts" asp-action="Details" asp-route-id="@Model.Id" class="btn btn-primary my-1"><i class="fas fa-eye"></i> Details</a>
34-
<a asp-controller="Posts" asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-warning my-1"><i class="fas fa-edit"></i> Edit</a>
35-
<a asp-controller="Posts" asp-action="Delete" asp-route-id="@Model.Id" class="btn btn-danger my-1"
36-
onclick="return confirm('Are you sure to delete this?');">
37-
<i class="fas fa-trash"></i> Delete
38-
</a>
39-
</div>
40+
4041
</section>
4142

4243

Blog/Blog/Views/Home/Index.cshtml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@await Component.InvokeAsync("TagCloud")
3232

3333
<p>
34-
<a asp-controller="Posts" asp-action="Create" class="btn btn-primary btn-block">New Post</a>
34+
<a asp-controller="Posts" asp-action="Create" class="btn btn-danger btn-block">New Post</a>
3535
</p>
3636
</div>
3737

@@ -49,13 +49,15 @@
4949
}
5050
<div class="card-body py-2">
5151
<p class="card-text mb-2"><small>@post.Tags</small></p>
52-
<hr class="my-2" />
53-
<a asp-controller="Home" asp-action="Details" asp-route-id="@post.Id" class="text-dark"><h4 class="card-title">@post.Title</h4></a>
54-
<p class="card-text mb-4">@post.Excerpt</p>
55-
<div class="row col-12">
56-
<p class="card-text"><small class="text-muted">Posted: @post.Created.ToShortDateString()</small></p>
57-
<p class="card-text ml-2"><small class="text-muted"><i class="fas fa-eye"></i> @post.Views</small></p>
58-
<a asp-controller="Home" asp-action="Details" asp-route-id="@post.Id" class="ml-auto text-dark float-right">Show more &#x2192;</a>
52+
<hr class="my-2 w-25 mx-0 mr-auto" />
53+
<div class="mt-3">
54+
<a asp-controller="Home" asp-action="Details" asp-route-id="@post.Id" class="text-dark"><h4 class="card-title">@post.Title</h4></a>
55+
<p class="card-text mb-4">@post.Excerpt</p>
56+
<div class="row col-12">
57+
<p class="card-text"><small class="text-muted">Posted: @post.Created.ToShortDateString()</small></p>
58+
<p class="card-text ml-2"><small class="text-muted"><i class="fas fa-eye"></i> @post.Views</small></p>
59+
<a asp-controller="Home" asp-action="Details" asp-route-id="@post.Id" class="ml-auto text-dark float-right">Show more &#x2192;</a>
60+
</div>
5961
</div>
6062
</div>
6163
</div>

Blog/Blog/Views/Posts/Details.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@model Blog.Models.Post
22

33
@{
4-
ViewData["Title"] = "Details";
4+
ViewData["Title"] = "Post Details";
55
}
66

77
<h1>Details</h1>

Blog/Blog/Views/Posts/Index.cshtml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@model Blog.Models.ViewModels.PostsViewModel
22

33
@{
4-
ViewData["Title"] = "Index";
4+
ViewData["Title"] = "Posts Table";
55
}
66

77
<h1>Posts</h1>
@@ -16,24 +16,20 @@
1616
<div class="row">
1717
<form class="form-inline w-100" asp-controller="Posts" asp-action="Index" method="get" role="form" enctype="multipart/form-data">
1818
<div class="col-md-10 p-0">
19-
<input type="text" class="form-control rounded-0 w-100" id="title" name="title" placeholder="Поиск по названию...">
19+
<input type="text" class="form-control rounded-0 w-100" id="title" name="title" placeholder="Search by title...">
2020
</div>
2121
<div class="col-md-2 p-0">
22-
<input type="submit" class="btn btn-primary w-100" value="Искать" />
22+
<button type="submit" class="btn btn-dark w-100" value="Search"><i class="fas fa-search"></i></button>
2323
</div>
2424
</form>
2525
</div>
2626
</div>
2727
</section>
2828

2929
<p>
30-
<a asp-action="Create" class="btn btn-primary ">New Post</a>
30+
<a asp-action="Create" class="btn btn-danger btn-block">New Post</a>
3131
</p>
3232

33-
<!-- TAGS CLOUD -->
34-
<div class="col-md-12 d-none d-lg-block">
35-
@await Component.InvokeAsync("TagCloud")
36-
</div>
3733

3834
<!-- POSTS TABLE -->
3935
<section id="post-table">

Blog/Blog/Views/Posts/PostForm.cshtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ViewData["Title"] = Model.Id == 0 ? "Create Post" : "Edit Post";
55
}
66

7-
<h1>Post</h1>
7+
<h1 class="mb-4 text-center">Post</h1>
88
@if (Model.Id == 0)
99
{
1010
<h3>Create</h3>
@@ -82,7 +82,6 @@ else
8282
<script src="~/lib/jquery-ui/jquery-ui-1.12.1/jquery-ui.min.js"></script>
8383
<script src="~/lib/trumbowyg/trumbowyg.min.js"></script>
8484

85-
8685
<script>
8786
$('#content').trumbowyg();
8887
</script>

Blog/Blog/Views/Shared/Components/TagCloud/Default.cshtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
@model IEnumerable<Blog.Models.Tag>
22

3-
<div class="card tagcloud mt-0 mb-3">
3+
<div class="card mt-0 mb-3">
44
<h5 class="text-center py-3">Tags Cloud</h5>
55
<div class="container">
6-
<ul>
7-
<li>
8-
<a asp-action="Index" asp-route-tag=""><span>Show All</span></a>
6+
<ul class="list-group list-group-flush">
7+
<li class="list-group-item">
8+
<a asp-action="Index" asp-route-tag="" class="text-dark"><span>Show All</span></a>
99
</li>
1010
@foreach (var tag in Model)
1111
{
12-
<li>
13-
<a asp-action="Index" asp-route-tag="@tag.Name"><span>@tag.Name</span> </a>
12+
<li class="list-group-item">
13+
<a asp-action="Index" asp-route-tag="@tag.Name" class="text-dark"><span>@tag.Name</span> </a>
1414
</li>
1515
}
1616
</ul>

Blog/Blog/Views/Shared/_Layout.cshtml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="utf-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>@ViewData["Title"] - Blog</title>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>@ViewData["Title"] - Blog</title>
77

8-
<meta name="description" content="@ViewBag.Description"/>
9-
<meta name="keywords" content="@ViewBag.Keywords"/>
8+
<meta name="description" content="@ViewBag.Description" />
9+
<meta name="keywords" content="@ViewBag.Keywords" />
10+
<meta property="og:site_name" content="Blog">
1011

11-
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
12-
<link rel="stylesheet" href="~/css/site.css" />
12+
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap-lux.min.css" />
13+
<link rel="stylesheet" href="~/css/site.css" />
1314

14-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp"
15-
crossorigin="anonymous">
15+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp"
16+
crossorigin="anonymous">
1617
</head>
1718
<body>
1819
<header>
19-
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
20+
<nav class="navbar sticky-top navbar-expand-sm navbar-toggleable-sm navbar-light border-bottom box-shadow mb-3">
2021
<div class="container">
2122
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Blog</a>
2223
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
@@ -25,18 +26,18 @@
2526
</button>
2627
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
2728
<partial name="_LoginPartial" />
28-
<ul class="navbar-nav flex-grow-1">
29+
<ul class="navbar-nav">
2930
<li class="nav-item">
30-
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
31+
<a class="nav-link" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
3132
</li>
3233
<li class="nav-item">
33-
<a class="nav-link text-dark" asp-area="" asp-controller="Posts" asp-action="Index">Posts</a>
34+
<a class="nav-link" asp-area="" asp-controller="Posts" asp-action="Index">Posts</a>
3435
</li>
3536
<li class="nav-item">
36-
<a class="nav-link text-dark" asp-area="" asp-controller="Tags" asp-action="Index">Tags</a>
37+
<a class="nav-link" asp-area="" asp-controller="Tags" asp-action="Index">Tags</a>
3738
</li>
3839
<li class="nav-item">
39-
<a class="nav-link text-dark" asp-area="" asp-controller="AboutMe" asp-action="Index">About Me</a>
40+
<a class="nav-link" asp-area="" asp-controller="AboutMe" asp-action="Index">About Me</a>
4041
</li>
4142
</ul>
4243
</div>
@@ -50,8 +51,8 @@
5051
</div>
5152

5253
<footer class="border-top footer text-muted">
53-
<div class="container">
54-
&copy; 2020 - Blog - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
54+
<div class="container text-center">
55+
&copy; @DateTime.Now.Year - <a asp-controller="Home" asp-action="Index">Blog</a> - @ViewBag?.Title
5556
</div>
5657
</footer>
5758
<script src="~/lib/jquery/dist/jquery.min.js"></script>

0 commit comments

Comments
 (0)