Skip to content

Commit 65f3662

Browse files
author
Francis
committed
Theme - Star - 01
1 parent d62683a commit 65f3662

55 files changed

Lines changed: 5186 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
@model ListModel
2+
@inject Core.Services.IDataService _db
3+
@{
4+
ViewData["bodyClass"] = "home";
5+
var pgr = Model.Pager;
6+
var first3 = _db.BlogPosts.All().OrderByDescending(p => p.Published).Take(3).ToList();
7+
}
8+
<!DOCTYPE html>
9+
<html lang="en">
10+
<head>
11+
<partial name="~/Views/Themes/star/_Shared/_Head.cshtml" />
12+
</head>
13+
<body class="@ViewData["bodyClass"]">
14+
15+
<partial name="~/Views/Themes/star/_Shared/_Header.cshtml" />
16+
17+
<div class="page-content">
18+
19+
@if (Model.PostListType == PostListType.Search)
20+
{
21+
<div class="page-search">
22+
<div class="container">
23+
<h2 class="page-search-title"><i class="fa fa-search"></i> @Model.Blog.Title</h2>
24+
</div>
25+
</div>
26+
}
27+
else if (Model.PostListType == PostListType.Author)
28+
{
29+
<div class="page-author">
30+
<div class="container">
31+
<h2 class="page-author-title">
32+
<img src="~/@Model.Author.Avatar" class="page-author-avatar" />
33+
<span class="page-author-name">@Model.Author.DisplayName</span>
34+
</h2>
35+
</div>
36+
</div>
37+
}
38+
else if (Model.PostListType == PostListType.Category)
39+
{
40+
<div class="page-category">
41+
<div class="container">
42+
<h2 class="page-category-title"><i class="fa fa-tag"></i> @ViewBag.Category</h2>
43+
</div>
44+
</div>
45+
}
46+
47+
@if (Model.Posts != null)
48+
{
49+
foreach (var item in Model.Posts)
50+
{
51+
var img = string.IsNullOrEmpty(item.Cover) ? Model.Blog.Cover : item.Cover;
52+
var avatar = string.IsNullOrEmpty(item.Author.Avatar) ? "lib/img/avatar.jpg" : item.Author.Avatar;
53+
<article class="post">
54+
<div class="post-cover">
55+
<img src="~/@img" alt="@item.Title">
56+
</div>
57+
<div class="container">
58+
<div class="row">
59+
<div class="col-sm-2"></div>
60+
<div class="col-sm-10">
61+
<header class="post-header">
62+
<h2 class="post-title"><a href="~/posts/@item.Slug">@item.Title</a></h2>
63+
</header>
64+
@if (item.Featured)
65+
{
66+
<span class="post-featrued-label" title="Featured" data-toggle="tooltip"><i class="fa fa-star"></i></span>
67+
}
68+
</div>
69+
<div class="col-sm-2">
70+
<div class="post-meta">
71+
<a class="post-meta-author" href="~/authors/@item.Author.AppUserName">
72+
<img class="post-meta-author-avatar" src="~/@avatar" alt="Author: @item.Author.DisplayName" />
73+
<div class="post-meta-author-name">@item.Author.DisplayName</div>
74+
</a>
75+
<div class="post-meta-category">
76+
<a href="#">Technology</a>
77+
</div>
78+
<time class="post-meta-time">@item.Published.ToFriendlyDateString()</time>
79+
</div>
80+
</div>
81+
<div class="col-sm-10">
82+
<div class="post-description">@Html.Raw(Markdig.Markdown.ToHtml(item.Description))</div>
83+
</div>
84+
</div>
85+
</div>
86+
</article>
87+
}
88+
}
89+
90+
@if (pgr != null && (pgr.ShowOlder || pgr.ShowNewer))
91+
{
92+
<ul class="pagination justify-content-center">
93+
@if (pgr.ShowOlder)
94+
{
95+
<li class="item item-prev">
96+
<a class="item-link" href="~/@pgr.LinkToOlder">
97+
<i class="fa fa-chevron-left"></i>
98+
</a>
99+
</li>
100+
}
101+
@if (pgr.ShowNewer)
102+
{
103+
<li class="item item-next">
104+
<a class="item-link" href="~/@pgr.LinkToNewer">
105+
<i class="fa fa-chevron-right"></i>
106+
</a>
107+
</li>
108+
}
109+
</ul>
110+
}
111+
</div>
112+
113+
<partial name="~/Views/Themes/star/_Shared/_Footer.cshtml" />
114+
115+
</body>
116+
</html>
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
@model PostModel
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<partial name="~/Views/Themes/star/_Shared/_Head.cshtml" />
6+
</head>
7+
<body class="@ViewData["bodyClass"]">
8+
<!--[if lt IE 10]>
9+
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
10+
<![endif]-->
11+
<partial name="~/Views/Themes/star/_Shared/_Header.cshtml" />
12+
13+
14+
15+
<div class="page-content">
16+
17+
18+
<article class="post">
19+
<div class="post-cover">
20+
<img src="@Model.Blog.Cover" alt="@Model.Post.Title">
21+
22+
</div>
23+
<div class="container">
24+
<div class="row">
25+
<div class="col-sm-2"></div>
26+
<div class="col-sm-10">
27+
<header class="post-header">
28+
<h2 class="post-title">@Model.Post.Title</h2>
29+
</header>
30+
</div>
31+
<div class="col-sm-2">
32+
<div class="post-meta">
33+
<a class="post-meta-author" href="~/authors/@Model.Post.Author.AppUserName">
34+
<img class="post-meta-author-avatar" src="~/@Model.Post.Author.Avatar" alt="@Model.Post.Author.DisplayName" />
35+
<div class="post-meta-author-name">@Model.Post.Author.DisplayName</div>
36+
</a>
37+
<div class="post-meta-category">
38+
39+
@if (!string.IsNullOrEmpty(Model.Post.Categories))
40+
{
41+
var cats = Model.Post.Categories.Split(',');
42+
43+
foreach (var cat in cats)
44+
{
45+
<a href="~/categories/@cat">@cat</a>
46+
}
47+
}
48+
</div>
49+
<time class="post-meta-time">@string.Format("{0:MMM d, yyyy}", Model.Post.Published)</time>
50+
</div>
51+
</div>
52+
<div class="col-sm-10">
53+
<div class="post-content">@Html.Raw(Model.Post.Content)</div>
54+
55+
</div>
56+
</div>
57+
</div>
58+
</article>
59+
60+
61+
62+
63+
@if (Model.Older != null || Model.Newer != null)
64+
{
65+
<ul class="pagination justify-content-center">
66+
@if (Model.Older != null)
67+
{
68+
<li class="item item-prev">
69+
<a class="item-link" href="~/posts/@Model.Older.Slug" title="@Model.Older.Title">
70+
<i class="fa fa-chevron-left"></i>
71+
</a>
72+
</li>
73+
}
74+
@if (Model.Newer != null)
75+
{
76+
<li class="item item-next">
77+
<a class="item-link" href="~/posts/@Model.Newer.Slug" title="@Model.Newer.Title">
78+
<i class="fa fa-chevron-right"></i>
79+
</a>
80+
</li>
81+
}
82+
</ul>
83+
}
84+
</div>
85+
86+
87+
88+
89+
<partial name="~/Views/Themes/star/_Shared/_Footer.cshtml" />
90+
</body>
91+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"Widget": "HtmlBlock",
4+
"Title": "Social Buttons"
5+
},
6+
{
7+
"Widget": "PostList",
8+
"Title": "Recent Posts"
9+
},
10+
{
11+
"Widget": "Newsletter",
12+
"Title": "Newsletter"
13+
},
14+
{
15+
"Widget": "Categories",
16+
"Title": "Categories"
17+
},
18+
{
19+
"Widget": "Categories",
20+
"Title": "Tags"
21+
}
22+
]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
@{
2+
var returnUrl = Url.Action("Index", "Admin");
3+
}
4+
<footer class="blog-footer">
5+
<div class="widget widget-newsletter">
6+
<h4 class="widget-title">Newsletter</h4>
7+
<div class="widget-body">
8+
@await Component.InvokeAsync("Newsletter", new { theme = "star", widget = "Newsletter" })
9+
</div>
10+
</div>
11+
<div class="container">
12+
<div class="d-flex">
13+
<p class="blog-copyright">Copyright © @DateTime.Now.Year. Powered by <a href="https://github.com/blogifierdotnet/Blogifier" data-toggle="tooltip" target="_blank" title="Version - @AppSettings.Version">Blogifier</a>. Designed by <a href="https://francis.bio/" target="_blank" rel="nofollow">Francis</a>.</p>
14+
<div class="widget-social ml-auto">
15+
@*@await Component.InvokeAsync("HtmlBlock", new { theme = "star", widget = "Social Buttons" })*@
16+
<ul>
17+
<li><a class="widget-social-fb" target="_blank" href="https://facebook.com/blogifierdotnet"><i class="fa fa-facebook"></i></a></li>
18+
<li><a class="widget-social-tw" target="_blank" href="https://twitter.com/blogifierdotnet"><i class="fa fa-twitter"></i></a></li>
19+
<li><a class="widget-social-in" target="_blank" href="https://instagram.com/blogifierdotnet"><i class="fa fa-instagram"></i></a></li>
20+
<li><a class="widget-social-rss" target="_blank" href="/feed/rss"><i class="fa fa-rss"></i></a></li>
21+
22+
@if (User.Identity.IsAuthenticated)
23+
{
24+
<li>
25+
<a class="widget-social-admin" href="~/admin"><i class="fa fa-user"></i></a>
26+
</li>
27+
}
28+
else
29+
{
30+
<li>
31+
<a class="widget-social-admin" href="~/account/login?ReturnUrl=@returnUrl"><i class="fa fa-login"></i></a>
32+
</li>
33+
}
34+
</ul>
35+
</div>
36+
</div>
37+
</div>
38+
</footer>
39+
40+
@*<a href="#" onclick="profileLogOut(); return false;">Logoff</a>
41+
<form method="post" id="frmLogOut" asp-controller="Account" asp-action="Logout" asp-antiforgery="true"></form>*@
42+
<script src="~/themes/star/js/jquery.min.js"></script>
43+
<script src="~/themes/star/js/popper.min.js"></script>
44+
<script src="~/themes/star/js/bootstrap.min.js"></script>
45+
<script src="~/themes/star/js/prism.js"></script>
46+
<script src="~/themes/star/js/blog.js" asp-append-version="true"></script>
47+
48+
49+
50+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<meta charset="utf-8">
2+
<meta http-equiv="x-ua-compatible" content="ie=edge">
3+
<title>@Html.Raw(Model.Blog.Title)</title>
4+
<meta name="description" content="@Html.Raw(Model.Blog.Description)">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link href="https://fonts.googleapis.com/css?family=Roboto:300,500,400,700|Merriweather:700" rel="stylesheet">
7+
<link href="~/themes/star/css/bootstrap.min.css" rel="stylesheet">
8+
<link href="~/themes/star/css/font-awesome.min.css" rel="stylesheet">
9+
<link href="~/themes/star/css/prism.css" rel="stylesheet">
10+
<link href="~/themes/star/css/styles.min.css" rel="stylesheet" asp-append-version="true">
11+
<link rel="shortcut icon" href="~/lib/img/favicon.ico">
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<header class="blog-header">
2+
<div class="container d-flex">
3+
<a href="~/" class="blog-logo"> <img src="~/themes/star/img/logo.png" alt="@Model.Blog.Title" /></a>
4+
<nav class="navbar navbar-expand-lg navbar-dark ml-auto">
5+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
6+
<span class="navbar-toggler-icon"></span>
7+
</button>
8+
<div class="collapse navbar-collapse" id="navbarSupportedContent">
9+
<ul class="navbar-nav mr-auto">
10+
<li class="nav-item active">
11+
<a class="nav-link" href="~/">Home <span class="sr-only">(current)</span></a>
12+
</li>
13+
<li class="nav-item">
14+
@if (User.Identity.IsAuthenticated)
15+
{
16+
<a class="nav-link" href="~/admin">Admin</a>
17+
}
18+
else
19+
{
20+
<a class="nav-link" href="~/account/login?ReturnUrl=/admin">Login</a>
21+
}
22+
</li>
23+
@*<li class="nav-item">
24+
<a class="nav-link" href="#">Contact</a>
25+
</li>
26+
<li class="nav-item dropdown">
27+
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
28+
Example
29+
</a>
30+
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
31+
<a class="dropdown-item" href="#">Action</a>
32+
<a class="dropdown-item" href="#">Another action</a>
33+
<div class="dropdown-divider"></div>
34+
<a class="dropdown-item" href="#">Something else here</a>
35+
</div>
36+
</li>*@
37+
</ul>
38+
</div>
39+
</nav>
40+
<form class="blog-search-form my-auto" role="search" asp-controller="Blog" asp-action="Index" method="post">
41+
<input type="search" id="term" name="term" class="form-control" placeholder="Search..." autocomplete="off">
42+
<button type="submit"><i class="fa fa-search"></i></button>
43+
</form>
44+
</div>
45+
</header>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = function (grunt) {
2+
grunt.initConfig({
3+
sass: {
4+
dist: {
5+
options: {
6+
style: 'compressed'
7+
},
8+
files: {
9+
'css/styles.min.css': 'scss/styles.scss',
10+
}
11+
}
12+
},
13+
watch: {
14+
src: {
15+
files: ['scss/**/*.scss'],
16+
tasks: ['sass']
17+
}
18+
}
19+
});
20+
grunt.loadNpmTasks('grunt-contrib-sass');
21+
grunt.loadNpmTasks('grunt-contrib-watch');
22+
grunt.registerTask('default', ['sass','watch']);
23+
};

src/App/wwwroot/themes/star/css/bootstrap.min.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App/wwwroot/themes/star/css/font-awesome.min.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)