Skip to content

Commit 99e7fd7

Browse files
committed
moment theme
1 parent faead3a commit 99e7fd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+6249
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
@model ListModel
2+
@{
3+
ViewData["bodyClass"] = "home";
4+
var pgr = Model.Pager;
5+
}
6+
<!DOCTYPE html>
7+
<html lang="en">
8+
<head>
9+
<partial name="~/Views/Themes/moments/_Shared/_Head.cshtml" />
10+
</head>
11+
<body class="@ViewData["bodyClass"]">
12+
13+
<partial name="~/Views/Themes/moments/_Shared/_Header.cshtml" />
14+
15+
16+
17+
<div class="page-cover" style="background-image: url('@Model.Blog.Cover')">
18+
<h1 class="page-cover-title">
19+
@if (Model.PostListType == PostListType.Search)
20+
{
21+
<a href="#"><i class="fa fa-search"></i> @Model.Blog.Title</a>
22+
}
23+
else if (Model.PostListType == PostListType.Author)
24+
{
25+
<a href="~/">
26+
<img src="~/@Model.Author.Avatar" class="rounded-circle" style="width: 52px" /> @Model.Author.DisplayName
27+
</a>
28+
}
29+
else if (Model.PostListType == PostListType.Category)
30+
{
31+
<a href="#"><i class="fa fa-tag"></i> @ViewBag.Category</a>
32+
}
33+
else
34+
{
35+
<a href="~/">@Model.Blog.Title</a>
36+
}
37+
</h1>
38+
<p class="page-cover-desc">@Model.Blog.Description</p>
39+
</div>
40+
41+
42+
43+
<div class="page-content">
44+
<div class="container">
45+
@if (Model.Posts != null)
46+
{
47+
foreach (var item in Model.Posts)
48+
{
49+
var img = string.IsNullOrEmpty(item.Cover) ? Model.Blog.Cover : item.Cover;
50+
<article class="post">
51+
<div class="post-cover">
52+
<img src="~/@img" alt="@item.Title">
53+
@if (item.Featured)
54+
{
55+
<span class="post-featrued-label"><i class="fa fa-star"></i> Featured</span>
56+
}
57+
</div>
58+
<h2 class="post-title"><a href="~/posts/@item.Slug">@item.Title</a></h2>
59+
<div class="post-meta">
60+
<a class="post-meta-author" href="~/authors/@item.Author.AppUserName">@item.Author.DisplayName</a>
61+
<time class="post-meta-time">/ @item.Published.ToFriendlyDateString()</time>
62+
</div>
63+
<div class="post-description">@Html.Raw(Markdig.Markdown.ToHtml(item.Description))</div>
64+
<a class="post-more btn btn-rounded btn-dark" href="~/posts/@item.Slug">Read</a>
65+
</article>
66+
}
67+
}
68+
@if (pgr != null && (pgr.ShowOlder || pgr.ShowNewer))
69+
{
70+
<ul class="pagination justify-content-center">
71+
@if (pgr.ShowOlder)
72+
{
73+
<li class="item item-prev">
74+
<a class="item-link" href="~/@pgr.LinkToOlder">
75+
<i class="item-icon fa fa-angle-left"></i>
76+
</a>
77+
</li>
78+
}
79+
@if (pgr.ShowNewer)
80+
{
81+
<li class="item item-next">
82+
<a class="item-link" href="~/@pgr.LinkToNewer">
83+
<i class="item-icon fa fa-angle-right"></i>
84+
</a>
85+
</li>
86+
}
87+
</ul>
88+
}
89+
</div>
90+
</div>
91+
92+
<partial name="~/Views/Themes/moments/_Shared/_Footer.cshtml" />
93+
</body>
94+
</html>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"Widget": "HtmlBlock",
4+
"Title": "Social Buttons"
5+
}
6+
]
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@model PostModel
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
<head>
5+
<partial name="~/Views/Themes/moments/_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/moments/_Shared/_Header.cshtml" />
12+
<article class="post-single">
13+
<div class="post-cover" style="background-image: url('@Model.Blog.Cover')"></div>
14+
<section class="container">
15+
<div class=" post-body">
16+
<header class="post-header">
17+
<h2 class="post-title">@Model.Post.Title</h2>
18+
<div class="post-meta">
19+
<a href="~/authors/@Model.Post.Author.AppUserName">
20+
<img class="post-meta-img" src="~/@Model.Post.Author.Avatar" alt="@Model.Post.Author.DisplayName" />
21+
<span class="post-meta-author">@Model.Post.Author.DisplayName</span>
22+
</a>
23+
<time class="post-meta-time">@string.Format("{0:MMM d, yyyy}", Model.Post.Published)</time>
24+
@if (!string.IsNullOrEmpty(Model.Post.Categories))
25+
{
26+
<span>/</span>
27+
var cats = Model.Post.Categories.Split(',');
28+
foreach (var cat in cats)
29+
{
30+
<span>
31+
<a href="~/categories/@cat">@cat</a>
32+
</span>
33+
}
34+
}
35+
</div>
36+
</header>
37+
<div class="post-content">
38+
@Html.Raw(Model.Post.Content)
39+
</div>
40+
41+
@if (Model.Older != null || Model.Newer != null)
42+
{
43+
<ul class="pagination justify-content-center">
44+
@if (Model.Older != null)
45+
{
46+
<li class="item item-prev">
47+
<a class="item-link" href="~/posts/@Model.Older.Slug" title="@Model.Older.Title">
48+
<i class="item-icon fa fa-angle-left"></i>
49+
</a>
50+
</li>
51+
}
52+
@if (Model.Newer != null)
53+
{
54+
<li class="item item-next">
55+
<a class="item-link" href="~/posts/@Model.Newer.Slug" title="@Model.Newer.Title">
56+
<i class="item-icon fa fa-angle-right"></i>
57+
</a>
58+
</li>
59+
}
60+
</ul>
61+
}
62+
</div>
63+
</section>
64+
</article>
65+
<partial name="~/Views/Themes/moments/_Shared/_Footer.cshtml" />
66+
</body>
67+
</html>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@{
2+
var returnUrl = Url.Action("Index", "Admin");
3+
}
4+
5+
<div class="modal fade blog-search" id="blog-search" tabindex="-1" role="dialog" aria-hidden="true">
6+
<div class="modal-dialog" role="document">
7+
<div class="modal-content">
8+
<div class="modal-body p-0">
9+
<form role="search" asp-controller="Blog" asp-action="Index" method="post">
10+
<input type="search" id="term" name="term" class="form-control form-control-lg" placeholder="Search..." autocomplete="off">
11+
</form>
12+
</div>
13+
</div>
14+
</div>
15+
</div>
16+
17+
<footer class="blog-footer">
18+
<div class="container d-lg-flex text-center text-lg-left">
19+
<p>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>
20+
<div class="ml-auto">
21+
@if (User.Identity.IsAuthenticated)
22+
{
23+
<a href="~/admin">Admin</a>
24+
}
25+
else
26+
{
27+
<a href="~/account/login?ReturnUrl=@returnUrl">Login</a>
28+
}
29+
</div>
30+
</div>
31+
</footer>
32+
@*<a href="#" onclick="profileLogOut(); return false;">Logoff</a>
33+
<form method="post" id="frmLogOut" asp-controller="Account" asp-action="Logout" asp-antiforgery="true"></form>*@
34+
<script src="~/themes/moments/js/jquery.min.js"></script>
35+
<script src="~/themes/moments/js/popper.min.js"></script>
36+
<script src="~/themes/moments/js/bootstrap.min.js"></script>
37+
<script src="~/themes/moments/js/prism.js"></script>
38+
<script src="~/themes/moments/js/blog.js" asp-append-version="true"></script>
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,400,700|Merriweather:700" rel="stylesheet">
7+
<link href="~/themes/moments/css/bootstrap.min.css" rel="stylesheet">
8+
<link href="~/themes/moments/css/font-awesome.min.css" rel="stylesheet">
9+
<link href="~/themes/moments/css/prism.css" rel="stylesheet">
10+
<link href="~/themes/moments/css/styles.min.css" rel="stylesheet" asp-append-version="true">
11+
<link rel="shortcut icon" href="~/lib/img/favicon.ico">
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<header class="blog-header d-flex flex-column">
2+
<div class="container d-flex">
3+
<a href="~/" class="blog-logo my-auto d-flex"> <img src="~/@Model.Blog.Logo" alt="@Model.Blog.Title" class="my-auto" /> <span class="my-auto">@Model.Blog.Title</span> </a>
4+
5+
<button class="blog-search-toggle btn-unstyled ml-auto" type="button" data-toggle="modal" data-target="#blog-search">
6+
<i class="fa fa-search"></i>
7+
</button>
8+
</div>
9+
</header>
10+
11+
<!--
12+
<ul class="blog-social nav ml-auto my-auto">
13+
@await Component.InvokeAsync("HtmlBlock", new { theme = "moments", widget = "Social Buttons" })
14+
</ul> -->
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/moments/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/moments/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)