From c13bcd38cae2e1aa553baf1c6d54a554f7fb6c36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arma=C4=9Fan=20=C3=9Cnl=C3=BC?=
<36102404+armgnunlu@users.noreply.github.com>
Date: Mon, 24 Jun 2019 17:35:56 +0300
Subject: [PATCH 1/3] Merge branch 'dev' of https://github.com/abpframework/abp
into dev
---
.../Volo.Blogging.Web/Pages/Blog/Shared/Styles/_header.scss | 4 ++++
.../src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css | 2 +-
.../Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css | 2 +-
.../src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss | 4 ++--
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_header.scss b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_header.scss
index d68cec899f..d5b34d7de5 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_header.scss
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/_header.scss
@@ -1,3 +1,7 @@
+
+.vs-blog {
+
+}
.vs-blog-title {
padding-bottom: 15px;
margin-bottom: 25px;
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css
index 84e4ab27cc..fc90869e69 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css
@@ -1,7 +1,7 @@
div.vs-blog {
position: relative;
background: white;
- padding: 0 30px;
+ padding: 30px;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
font-size: 14px;
margin: 0 auto;
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css
index 57895315af..10cb3d1a46 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css
@@ -1 +1 @@
-div.vs-blog{position:relative;background:#fff;padding:0 30px;font-family:'Open Sans',Helvetica,Arial,sans-serif;font-size:14px;margin:0 auto;max-width:1080px;}div.vs-blog a,div.vs-blog a:hover{text-decoration:none;color:#000;}div.vs-blog p{color:#444;}div.vs-blog p a{text-decoration:underline;}div.vs-blog h1,div.vs-blog h2,div.vs-blog h3,div.vs-blog h4,div.vs-blog h5,div.vs-blog h6,div.vs-blog .tab-title{font-family:Helvetica,Arial,sans-serif;font-weight:700;}div.vs-blog h1{font-size:2.25em;margin:1.5rem 0 .75rem;}div.vs-blog h2,div.vs-blog .tab-title{font-size:1.75em;margin:1.5rem 0 .75rem;}div.vs-blog h3{font-size:1.5em;margin:1.5rem 0 .75rem;}div.vs-blog h4{font-size:1.25em;margin:1.5rem 0 .75rem;}div.vs-blog h5{font-size:1em;}div.vs-blog h6{font-size:1em;}div.vs-blog .lead{font-size:1.1rem;font-weight:300;}div.vs-blog img{max-width:100%;}div.vs-blog input,div.vs-blog select,div.vs-blog textarea,div.vs-blog .form-control,div.vs-blog .btn{border-radius:0;}div.vs-blog .navbar-toggler{background:#0ff;}div.vs-blog .no-border{border:0;}div.vs-blog .btn-rounded{border-radius:30px;}div.vs-blog .list-group .list-group-item{position:relative;display:block;padding:0 0 20px 0;background:none;border-radius:0;border:0;}div.vs-blog .list-group .list-group-item:hover{background:none;}div.vs-blog .list-group .list-group-item+.list-group-item{border-top:1px solid #f5f5f5;padding:20px 0;}div.vs-blog .list-group .list-group-item h3{margin-top:0;}div.vs-blog .list-group.small-list .list-group-item{padding:10px 0;}div.vs-blog .list-group.small-list .list-group-item+.list-group-item{padding:10px 0;}div.vs-blog .font-75{font-size:.75em;}div.vs-blog .font-85{font-size:.85em;}div.vs-blog .font-92{font-size:.92em;}div.vs-blog .font-100{font-size:1em;}div.vs-blog .font-125{font-size:1.25em;}div.vs-blog .vs-blog-title{padding-bottom:15px;margin-bottom:25px;border-bottom:1px solid #ddd;}div.vs-blog .vs-blog-title h1,div.vs-blog .vs-blog-title h2,div.vs-blog .vs-blog-title h3,div.vs-blog .vs-blog-title h4,div.vs-blog .vs-blog-title h5,div.vs-blog .vs-blog-title h6{margin:0;padding:0;}div.vs-blog .vs-footer{padding-top:15px;margin-top:25px;border-top:1px solid #ddd;}div.vs-blog .vs-seperator{padding:0 4px;opacity:.3;}div.vs-blog .hero-section{padding:0;}div.vs-blog .hero-section .hero-articles{position:relative;overflow:hidden;}div.vs-blog .hero-section .hero-articles .hero-content{position:absolute;left:12%;right:12%;bottom:80px;z-index:4;text-align:center;}div.vs-blog .hero-section .hero-articles .hero-content h2{margin-top:0;font-size:2.5em;font-weight:bold;}div.vs-blog .hero-section .hero-articles .hero-content a{color:#fff;text-shadow:0 0 20px rgba(0,0,0,.5);}div.vs-blog .hero-section .hero-articles .hero-content p{color:#fff;}div.vs-blog .hero-section .hero-articles .tags .tag{background:rgba(208,208,208,.3);color:#fff !important;}div.vs-blog .hero-section .hero-articles .tags .tag:hover{background:#fff;color:#000 !important;}div.vs-blog .hero-section .hero-articles .article-owner{text-align:center;position:relative;z-index:12;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos{color:#000;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos a{color:#000;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos .seperator{margin:0 4px;color:rgba(255,255,255,.2);}div.vs-blog .hero-section .hero-articles .article-owner .article-infos img.article-avatar{width:64px;margin:-25px 10px 0 0;border:3px solid #fff;display:inline-block;border-radius:50%;}div.vs-blog .hero-section .hero-articles .img-container{min-height:320px;}div.vs-blog .hero-section .hero-articles .img-container img{filter:grayscale(10%);}div.vs-blog .hero-section .hero-articles .img-container::after{content:"";display:block;position:absolute;z-index:1;bottom:0;width:100%;top:1% !important;background:linear-gradient(to bottom,transparent 0,rgba(0,0,0,.75) 89%,rgba(0,0,0,.78) 93%) !important;transition:.2s all ease-in-out;opacity:.9;}div.vs-blog .hero-section .hero-articles:hover .img-container::after{opacity:1;}div.vs-blog .article-owner .article-infos{color:#000;}div.vs-blog .article-owner .article-infos a{color:rgba(0,0,0,.6);}div.vs-blog .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .article-owner .article-infos img.article-avatar{width:30px;margin:-1px 4px 0 0;display:inline-block;border-radius:50%;}div.vs-blog .card-articles .card-content{padding:10px 0 10px;}div.vs-blog .card-articles .card-content h3{margin:10px 0;}div.vs-blog .card-articles .card-content h3 a{font-weight:700;}div.vs-blog .card-articles .article-owner{text-align:left;}div.vs-blog .card-articles .article-owner .article-infos{color:#000;}div.vs-blog .card-articles .article-owner .article-infos a{color:rgba(0,0,0,.6);}div.vs-blog .card-articles .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .card-articles .article-owner .article-infos img.article-avatar{width:30px;margin:-1px 4px 0 0;display:inline-block;border-radius:50%;}div.vs-blog .article-owner{font-size:.85em;}div.vs-blog .user-link-icons{position:absolute;right:18px;top:15px;z-index:3;}div.vs-blog .user-link-icons a{display:inline-block;color:#eee;margin-left:12px;font-size:1.25em;}div.vs-blog .user-link-icons a:hover{color:#fff;}div.vs-blog .tags .tag{display:inline-block;padding:2px 8px;background:rgba(208,208,208,.3);border-radius:30px;margin:0 1px 3px 0;color:#b1b1b1 !important;font-size:.7em;line-height:1.6em;text-transform:uppercase;}div.vs-blog .tags .tag:hover{background:#000;color:#fff !important;}div.vs-blog .popular-tags a{display:block;font-size:.9em;}div.vs-blog .popular-tags a span{float:right;opacity:.3;font-size:.9em;}div.vs-blog .img-container{position:relative;overflow:hidden;border-radius:4px;background:#dcdcdc;}div.vs-blog .post-detail h1{padding:0 0;line-height:1.25em;font-size:3.5em;}div.vs-blog .post-detail .article-owner{text-align:center;position:relative;z-index:12;}div.vs-blog .post-detail .article-owner .article-infos{color:#000;}div.vs-blog .post-detail .article-owner .article-infos a{color:#000;color:rgba(0,0,0,.8);}div.vs-blog .post-detail .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .post-detail .article-owner .article-infos img.article-avatar{width:64px;margin:-20px 10px 0 0;display:inline-block;border-radius:50%;border:3px solid #fff;}div.vs-blog .post-detail .post-content{font-size:1.125em;}div.vs-blog .post-detail .post-content .post-img-container{margin:50px -80px 20px;overflow:hidden;border-radius:4px;}div.vs-blog .post-detail .post-content .lead{font-size:1.125em;color:#111;}div.vs-blog .comment-avatar{max-width:64px;}div.vs-blog .answer-avatar{max-width:48px;}div.vs-blog .media{font-size:.95em;}div.vs-blog .media .media{font-size:.95em;}div.vs-blog .comment-area .comment-owner{margin-bottom:2px;}div.vs-blog .comment-area .comment-owner span{font-weight:300;color:#999;font-size:.8em;}div.vs-blog .comment-area>.media{padding:30px 0;border-bottom:1px solid #f1f1f1;}div.vs-blog .comment-area>.media .media{padding:20px 0;}div.vs-blog .comment-area .comment-buttons{padding:4px 8px;}div.vs-blog .comment-area .comment-buttons .seperator{color:#ddd;margin:0 8px;}div.vs-blog .comment-area .comment-buttons .count{color:#fff;background:#ddd;margin-left:5px;padding:1px 3px;font-size:10px;border-radius:3px;}div.vs-blog .comment-area .comment-buttons .count.count-up{background:#999;}div.vs-blog .comment-area .comment-buttons a{opacity:.5;}div.vs-blog .comment-area .comment-buttons a:hover{opacity:.75;}div.vs-blog .comment-area p{margin-bottom:6px;}div.vs-blog .comment-area .comment-avatar{width:64px;}div.vs-blog .comment-area .answer-avatar{width:48px;}@media(min-width:767px){div.vs-blog .box-articles .img-container{position:relative;overflow:hidden;}div.vs-blog .box-articles .img-container img{position:absolute;left:50%;top:50%;height:100%;width:auto;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:initial;}div.vs-blog .box-articles .img-container img.portrait{width:100%;height:auto;}}
\ No newline at end of file
+div.vs-blog{position:relative;background:#fff;padding:30px;font-family:'Open Sans',Helvetica,Arial,sans-serif;font-size:14px;margin:0 auto;max-width:1080px;}div.vs-blog a,div.vs-blog a:hover{text-decoration:none;color:#000;}div.vs-blog p{color:#444;}div.vs-blog p a{text-decoration:underline;}div.vs-blog h1,div.vs-blog h2,div.vs-blog h3,div.vs-blog h4,div.vs-blog h5,div.vs-blog h6,div.vs-blog .tab-title{font-family:Helvetica,Arial,sans-serif;font-weight:700;}div.vs-blog h1{font-size:2.25em;margin:1.5rem 0 .75rem;}div.vs-blog h2,div.vs-blog .tab-title{font-size:1.75em;margin:1.5rem 0 .75rem;}div.vs-blog h3{font-size:1.5em;margin:1.5rem 0 .75rem;}div.vs-blog h4{font-size:1.25em;margin:1.5rem 0 .75rem;}div.vs-blog h5{font-size:1em;}div.vs-blog h6{font-size:1em;}div.vs-blog .lead{font-size:1.1rem;font-weight:300;}div.vs-blog img{max-width:100%;}div.vs-blog input,div.vs-blog select,div.vs-blog textarea,div.vs-blog .form-control,div.vs-blog .btn{border-radius:0;}div.vs-blog .navbar-toggler{background:#0ff;}div.vs-blog .no-border{border:0;}div.vs-blog .btn-rounded{border-radius:30px;}div.vs-blog .list-group .list-group-item{position:relative;display:block;padding:0 0 20px 0;background:none;border-radius:0;border:0;}div.vs-blog .list-group .list-group-item:hover{background:none;}div.vs-blog .list-group .list-group-item+.list-group-item{border-top:1px solid #f5f5f5;padding:20px 0;}div.vs-blog .list-group .list-group-item h3{margin-top:0;}div.vs-blog .list-group.small-list .list-group-item{padding:10px 0;}div.vs-blog .list-group.small-list .list-group-item+.list-group-item{padding:10px 0;}div.vs-blog .font-75{font-size:.75em;}div.vs-blog .font-85{font-size:.85em;}div.vs-blog .font-92{font-size:.92em;}div.vs-blog .font-100{font-size:1em;}div.vs-blog .font-125{font-size:1.25em;}div.vs-blog .vs-blog-title{padding-bottom:15px;margin-bottom:25px;border-bottom:1px solid #ddd;}div.vs-blog .vs-blog-title h1,div.vs-blog .vs-blog-title h2,div.vs-blog .vs-blog-title h3,div.vs-blog .vs-blog-title h4,div.vs-blog .vs-blog-title h5,div.vs-blog .vs-blog-title h6{margin:0;padding:0;}div.vs-blog .vs-footer{padding-top:15px;margin-top:25px;border-top:1px solid #ddd;}div.vs-blog .vs-seperator{padding:0 4px;opacity:.3;}div.vs-blog .hero-section{padding:0;}div.vs-blog .hero-section .hero-articles{position:relative;overflow:hidden;}div.vs-blog .hero-section .hero-articles .hero-content{position:absolute;left:12%;right:12%;bottom:80px;z-index:4;text-align:center;}div.vs-blog .hero-section .hero-articles .hero-content h2{margin-top:0;font-size:2.5em;font-weight:bold;}div.vs-blog .hero-section .hero-articles .hero-content a{color:#fff;text-shadow:0 0 20px rgba(0,0,0,.5);}div.vs-blog .hero-section .hero-articles .hero-content p{color:#fff;}div.vs-blog .hero-section .hero-articles .tags .tag{background:rgba(208,208,208,.3);color:#fff !important;}div.vs-blog .hero-section .hero-articles .tags .tag:hover{background:#fff;color:#000 !important;}div.vs-blog .hero-section .hero-articles .article-owner{text-align:center;position:relative;z-index:12;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos{color:#000;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos a{color:#000;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos .seperator{margin:0 4px;color:rgba(255,255,255,.2);}div.vs-blog .hero-section .hero-articles .article-owner .article-infos img.article-avatar{width:64px;margin:-25px 10px 0 0;border:3px solid #fff;display:inline-block;border-radius:50%;}div.vs-blog .hero-section .hero-articles .img-container{min-height:320px;}div.vs-blog .hero-section .hero-articles .img-container img{filter:grayscale(10%);}div.vs-blog .hero-section .hero-articles .img-container::after{content:"";display:block;position:absolute;z-index:1;bottom:0;width:100%;top:1% !important;background:linear-gradient(to bottom,transparent 0,rgba(0,0,0,.75) 89%,rgba(0,0,0,.78) 93%) !important;transition:.2s all ease-in-out;opacity:.9;}div.vs-blog .hero-section .hero-articles:hover .img-container::after{opacity:1;}div.vs-blog .article-owner .article-infos{color:#000;}div.vs-blog .article-owner .article-infos a{color:rgba(0,0,0,.6);}div.vs-blog .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .article-owner .article-infos img.article-avatar{width:30px;margin:-1px 4px 0 0;display:inline-block;border-radius:50%;}div.vs-blog .card-articles .card-content{padding:10px 0 10px;}div.vs-blog .card-articles .card-content h3{margin:10px 0;}div.vs-blog .card-articles .card-content h3 a{font-weight:700;}div.vs-blog .card-articles .article-owner{text-align:left;}div.vs-blog .card-articles .article-owner .article-infos{color:#000;}div.vs-blog .card-articles .article-owner .article-infos a{color:rgba(0,0,0,.6);}div.vs-blog .card-articles .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .card-articles .article-owner .article-infos img.article-avatar{width:30px;margin:-1px 4px 0 0;display:inline-block;border-radius:50%;}div.vs-blog .article-owner{font-size:.85em;}div.vs-blog .user-link-icons{position:absolute;right:18px;top:15px;z-index:3;}div.vs-blog .user-link-icons a{display:inline-block;color:#eee;margin-left:12px;font-size:1.25em;}div.vs-blog .user-link-icons a:hover{color:#fff;}div.vs-blog .tags .tag{display:inline-block;padding:2px 8px;background:rgba(208,208,208,.3);border-radius:30px;margin:0 1px 3px 0;color:#b1b1b1 !important;font-size:.7em;line-height:1.6em;text-transform:uppercase;}div.vs-blog .tags .tag:hover{background:#000;color:#fff !important;}div.vs-blog .popular-tags a{display:block;font-size:.9em;}div.vs-blog .popular-tags a span{float:right;opacity:.3;font-size:.9em;}div.vs-blog .img-container{position:relative;overflow:hidden;border-radius:4px;background:#dcdcdc;}div.vs-blog .post-detail h1{padding:0 0;line-height:1.25em;font-size:3.5em;}div.vs-blog .post-detail .article-owner{text-align:center;position:relative;z-index:12;}div.vs-blog .post-detail .article-owner .article-infos{color:#000;}div.vs-blog .post-detail .article-owner .article-infos a{color:#000;color:rgba(0,0,0,.8);}div.vs-blog .post-detail .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .post-detail .article-owner .article-infos img.article-avatar{width:64px;margin:-20px 10px 0 0;display:inline-block;border-radius:50%;border:3px solid #fff;}div.vs-blog .post-detail .post-content{font-size:1.125em;}div.vs-blog .post-detail .post-content .post-img-container{margin:50px -80px 20px;overflow:hidden;border-radius:4px;}div.vs-blog .post-detail .post-content .lead{font-size:1.125em;color:#111;}div.vs-blog .comment-avatar{max-width:64px;}div.vs-blog .answer-avatar{max-width:48px;}div.vs-blog .media{font-size:.95em;}div.vs-blog .media .media{font-size:.95em;}div.vs-blog .comment-area .comment-owner{margin-bottom:2px;}div.vs-blog .comment-area .comment-owner span{font-weight:300;color:#999;font-size:.8em;}div.vs-blog .comment-area>.media{padding:30px 0;border-bottom:1px solid #f1f1f1;}div.vs-blog .comment-area>.media .media{padding:20px 0;}div.vs-blog .comment-area .comment-buttons{padding:4px 8px;}div.vs-blog .comment-area .comment-buttons .seperator{color:#ddd;margin:0 8px;}div.vs-blog .comment-area .comment-buttons .count{color:#fff;background:#ddd;margin-left:5px;padding:1px 3px;font-size:10px;border-radius:3px;}div.vs-blog .comment-area .comment-buttons .count.count-up{background:#999;}div.vs-blog .comment-area .comment-buttons a{opacity:.5;}div.vs-blog .comment-area .comment-buttons a:hover{opacity:.75;}div.vs-blog .comment-area p{margin-bottom:6px;}div.vs-blog .comment-area .comment-avatar{width:64px;}div.vs-blog .comment-area .answer-avatar{width:48px;}@media(min-width:767px){div.vs-blog .box-articles .img-container{position:relative;overflow:hidden;}div.vs-blog .box-articles .img-container img{position:absolute;left:50%;top:50%;height:100%;width:auto;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:initial;}div.vs-blog .box-articles .img-container img.portrait{width:100%;height:auto;}}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss
index a4ff0948fc..83c06aeea3 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss
@@ -1,7 +1,7 @@
div.vs-blog {
position: relative;
background: white;
- padding: 0 30px;
+ padding: 30px;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
font-size: 14px;
margin: 0 auto;
@@ -12,4 +12,4 @@ div.vs-blog {
@import "post.scss";
@import "custom.scss";
}
-
\ No newline at end of file
+
From ff55c5b17d26bb1b5b448f983fb2f877a3db52b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arma=C4=9Fan=20=C3=9Cnl=C3=BC?=
<36102404+armgnunlu@users.noreply.github.com>
Date: Mon, 24 Jun 2019 17:41:26 +0300
Subject: [PATCH 2/3] blog issue
---
.../Pages/Blog/Posts/Index.cshtml | 320 +++++++++---------
.../Pages/Blog/Shared/Styles/blog.css | 4 +-
.../Pages/Blog/Shared/Styles/blog.min.css | 2 +-
.../Pages/Blog/Shared/Styles/blog.scss | 4 +-
4 files changed, 164 insertions(+), 166 deletions(-)
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml
index 6526c79ef1..58dbbef447 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml
@@ -22,152 +22,39 @@
}
-
-
-
-
-
- @for (var index = 0; index < Model.Posts.Count && index < 1; index++)
- {
- var post = Model.Posts[index];
-
-
-
-
- @foreach (var tag in post.Tags)
- {
- @tag.Name
- }
-
-
-
- @Html.Raw(GetShortContent(post.Content))
-
-
@L["ContinueReading"]
-
-
- @if (post.Writer != null)
+
+
+
+
+
+
+ @for (var index = 0; index < Model.Posts.Count && index < 1; index++)
{
-
- }
-
-
- }
-
-
-
-
-
-
- @if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Create))
- {
-
@L["CreateANewPost"]
- }
-
-
- @for (var index = 0; index < Model.Posts.Count && index < 3; index++)
- {
- var post = Model.Posts[index];
-
-
-
-
-
+ var post = Model.Posts[index];
+
-
-
- }
-
-
-
-
-
-
-
-
-
- @if (Model.Posts.Count > 3)
- {
-
-
@L["LastPosts"]
-
-
- @for (var index = 3; index < Model.Posts.Count; index++)
- {
- var post = Model.Posts[index];
- var oddPost = index % 2 == 1;
-
-
-
-
-
+
@foreach (var tag in post.Tags)
{
@tag.Name
}
-
-
- @Html.Raw(GetShortContent(post.Content))
+
+
+ @Html.Raw(GetShortContent(post.Content))
+
@L["ContinueReading"]
+
+
+ @if (post.Writer != null)
+ {
-
+ }
-
+
+ }
+
+
+
+
+
+
+ @if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Create))
+ {
+
@L["CreateANewPost"]
}
+
+
+ @for (var index = 0; index < Model.Posts.Count && index < 3; index++)
+ {
+ var post = Model.Posts[index];
+
+ }
+
- }
+
- @if (Model.PopularTags.Count > 0)
- {
-
-
-
@L["PopularTags"]
-
-
-
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css
index fc90869e69..8053928f76 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.css
@@ -3,9 +3,7 @@
background: white;
padding: 30px;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
- font-size: 14px;
- margin: 0 auto;
- max-width: 1080px; }
+ font-size: 14px; }
div.vs-blog a, div.vs-blog a:hover {
text-decoration: none;
color: #000000; }
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css
index 10cb3d1a46..dfcd02657a 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.min.css
@@ -1 +1 @@
-div.vs-blog{position:relative;background:#fff;padding:30px;font-family:'Open Sans',Helvetica,Arial,sans-serif;font-size:14px;margin:0 auto;max-width:1080px;}div.vs-blog a,div.vs-blog a:hover{text-decoration:none;color:#000;}div.vs-blog p{color:#444;}div.vs-blog p a{text-decoration:underline;}div.vs-blog h1,div.vs-blog h2,div.vs-blog h3,div.vs-blog h4,div.vs-blog h5,div.vs-blog h6,div.vs-blog .tab-title{font-family:Helvetica,Arial,sans-serif;font-weight:700;}div.vs-blog h1{font-size:2.25em;margin:1.5rem 0 .75rem;}div.vs-blog h2,div.vs-blog .tab-title{font-size:1.75em;margin:1.5rem 0 .75rem;}div.vs-blog h3{font-size:1.5em;margin:1.5rem 0 .75rem;}div.vs-blog h4{font-size:1.25em;margin:1.5rem 0 .75rem;}div.vs-blog h5{font-size:1em;}div.vs-blog h6{font-size:1em;}div.vs-blog .lead{font-size:1.1rem;font-weight:300;}div.vs-blog img{max-width:100%;}div.vs-blog input,div.vs-blog select,div.vs-blog textarea,div.vs-blog .form-control,div.vs-blog .btn{border-radius:0;}div.vs-blog .navbar-toggler{background:#0ff;}div.vs-blog .no-border{border:0;}div.vs-blog .btn-rounded{border-radius:30px;}div.vs-blog .list-group .list-group-item{position:relative;display:block;padding:0 0 20px 0;background:none;border-radius:0;border:0;}div.vs-blog .list-group .list-group-item:hover{background:none;}div.vs-blog .list-group .list-group-item+.list-group-item{border-top:1px solid #f5f5f5;padding:20px 0;}div.vs-blog .list-group .list-group-item h3{margin-top:0;}div.vs-blog .list-group.small-list .list-group-item{padding:10px 0;}div.vs-blog .list-group.small-list .list-group-item+.list-group-item{padding:10px 0;}div.vs-blog .font-75{font-size:.75em;}div.vs-blog .font-85{font-size:.85em;}div.vs-blog .font-92{font-size:.92em;}div.vs-blog .font-100{font-size:1em;}div.vs-blog .font-125{font-size:1.25em;}div.vs-blog .vs-blog-title{padding-bottom:15px;margin-bottom:25px;border-bottom:1px solid #ddd;}div.vs-blog .vs-blog-title h1,div.vs-blog .vs-blog-title h2,div.vs-blog .vs-blog-title h3,div.vs-blog .vs-blog-title h4,div.vs-blog .vs-blog-title h5,div.vs-blog .vs-blog-title h6{margin:0;padding:0;}div.vs-blog .vs-footer{padding-top:15px;margin-top:25px;border-top:1px solid #ddd;}div.vs-blog .vs-seperator{padding:0 4px;opacity:.3;}div.vs-blog .hero-section{padding:0;}div.vs-blog .hero-section .hero-articles{position:relative;overflow:hidden;}div.vs-blog .hero-section .hero-articles .hero-content{position:absolute;left:12%;right:12%;bottom:80px;z-index:4;text-align:center;}div.vs-blog .hero-section .hero-articles .hero-content h2{margin-top:0;font-size:2.5em;font-weight:bold;}div.vs-blog .hero-section .hero-articles .hero-content a{color:#fff;text-shadow:0 0 20px rgba(0,0,0,.5);}div.vs-blog .hero-section .hero-articles .hero-content p{color:#fff;}div.vs-blog .hero-section .hero-articles .tags .tag{background:rgba(208,208,208,.3);color:#fff !important;}div.vs-blog .hero-section .hero-articles .tags .tag:hover{background:#fff;color:#000 !important;}div.vs-blog .hero-section .hero-articles .article-owner{text-align:center;position:relative;z-index:12;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos{color:#000;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos a{color:#000;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos .seperator{margin:0 4px;color:rgba(255,255,255,.2);}div.vs-blog .hero-section .hero-articles .article-owner .article-infos img.article-avatar{width:64px;margin:-25px 10px 0 0;border:3px solid #fff;display:inline-block;border-radius:50%;}div.vs-blog .hero-section .hero-articles .img-container{min-height:320px;}div.vs-blog .hero-section .hero-articles .img-container img{filter:grayscale(10%);}div.vs-blog .hero-section .hero-articles .img-container::after{content:"";display:block;position:absolute;z-index:1;bottom:0;width:100%;top:1% !important;background:linear-gradient(to bottom,transparent 0,rgba(0,0,0,.75) 89%,rgba(0,0,0,.78) 93%) !important;transition:.2s all ease-in-out;opacity:.9;}div.vs-blog .hero-section .hero-articles:hover .img-container::after{opacity:1;}div.vs-blog .article-owner .article-infos{color:#000;}div.vs-blog .article-owner .article-infos a{color:rgba(0,0,0,.6);}div.vs-blog .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .article-owner .article-infos img.article-avatar{width:30px;margin:-1px 4px 0 0;display:inline-block;border-radius:50%;}div.vs-blog .card-articles .card-content{padding:10px 0 10px;}div.vs-blog .card-articles .card-content h3{margin:10px 0;}div.vs-blog .card-articles .card-content h3 a{font-weight:700;}div.vs-blog .card-articles .article-owner{text-align:left;}div.vs-blog .card-articles .article-owner .article-infos{color:#000;}div.vs-blog .card-articles .article-owner .article-infos a{color:rgba(0,0,0,.6);}div.vs-blog .card-articles .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .card-articles .article-owner .article-infos img.article-avatar{width:30px;margin:-1px 4px 0 0;display:inline-block;border-radius:50%;}div.vs-blog .article-owner{font-size:.85em;}div.vs-blog .user-link-icons{position:absolute;right:18px;top:15px;z-index:3;}div.vs-blog .user-link-icons a{display:inline-block;color:#eee;margin-left:12px;font-size:1.25em;}div.vs-blog .user-link-icons a:hover{color:#fff;}div.vs-blog .tags .tag{display:inline-block;padding:2px 8px;background:rgba(208,208,208,.3);border-radius:30px;margin:0 1px 3px 0;color:#b1b1b1 !important;font-size:.7em;line-height:1.6em;text-transform:uppercase;}div.vs-blog .tags .tag:hover{background:#000;color:#fff !important;}div.vs-blog .popular-tags a{display:block;font-size:.9em;}div.vs-blog .popular-tags a span{float:right;opacity:.3;font-size:.9em;}div.vs-blog .img-container{position:relative;overflow:hidden;border-radius:4px;background:#dcdcdc;}div.vs-blog .post-detail h1{padding:0 0;line-height:1.25em;font-size:3.5em;}div.vs-blog .post-detail .article-owner{text-align:center;position:relative;z-index:12;}div.vs-blog .post-detail .article-owner .article-infos{color:#000;}div.vs-blog .post-detail .article-owner .article-infos a{color:#000;color:rgba(0,0,0,.8);}div.vs-blog .post-detail .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .post-detail .article-owner .article-infos img.article-avatar{width:64px;margin:-20px 10px 0 0;display:inline-block;border-radius:50%;border:3px solid #fff;}div.vs-blog .post-detail .post-content{font-size:1.125em;}div.vs-blog .post-detail .post-content .post-img-container{margin:50px -80px 20px;overflow:hidden;border-radius:4px;}div.vs-blog .post-detail .post-content .lead{font-size:1.125em;color:#111;}div.vs-blog .comment-avatar{max-width:64px;}div.vs-blog .answer-avatar{max-width:48px;}div.vs-blog .media{font-size:.95em;}div.vs-blog .media .media{font-size:.95em;}div.vs-blog .comment-area .comment-owner{margin-bottom:2px;}div.vs-blog .comment-area .comment-owner span{font-weight:300;color:#999;font-size:.8em;}div.vs-blog .comment-area>.media{padding:30px 0;border-bottom:1px solid #f1f1f1;}div.vs-blog .comment-area>.media .media{padding:20px 0;}div.vs-blog .comment-area .comment-buttons{padding:4px 8px;}div.vs-blog .comment-area .comment-buttons .seperator{color:#ddd;margin:0 8px;}div.vs-blog .comment-area .comment-buttons .count{color:#fff;background:#ddd;margin-left:5px;padding:1px 3px;font-size:10px;border-radius:3px;}div.vs-blog .comment-area .comment-buttons .count.count-up{background:#999;}div.vs-blog .comment-area .comment-buttons a{opacity:.5;}div.vs-blog .comment-area .comment-buttons a:hover{opacity:.75;}div.vs-blog .comment-area p{margin-bottom:6px;}div.vs-blog .comment-area .comment-avatar{width:64px;}div.vs-blog .comment-area .answer-avatar{width:48px;}@media(min-width:767px){div.vs-blog .box-articles .img-container{position:relative;overflow:hidden;}div.vs-blog .box-articles .img-container img{position:absolute;left:50%;top:50%;height:100%;width:auto;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:initial;}div.vs-blog .box-articles .img-container img.portrait{width:100%;height:auto;}}
\ No newline at end of file
+div.vs-blog{position:relative;background:#fff;padding:30px;font-family:'Open Sans',Helvetica,Arial,sans-serif;font-size:14px;}div.vs-blog a,div.vs-blog a:hover{text-decoration:none;color:#000;}div.vs-blog p{color:#444;}div.vs-blog p a{text-decoration:underline;}div.vs-blog h1,div.vs-blog h2,div.vs-blog h3,div.vs-blog h4,div.vs-blog h5,div.vs-blog h6,div.vs-blog .tab-title{font-family:Helvetica,Arial,sans-serif;font-weight:700;}div.vs-blog h1{font-size:2.25em;margin:1.5rem 0 .75rem;}div.vs-blog h2,div.vs-blog .tab-title{font-size:1.75em;margin:1.5rem 0 .75rem;}div.vs-blog h3{font-size:1.5em;margin:1.5rem 0 .75rem;}div.vs-blog h4{font-size:1.25em;margin:1.5rem 0 .75rem;}div.vs-blog h5{font-size:1em;}div.vs-blog h6{font-size:1em;}div.vs-blog .lead{font-size:1.1rem;font-weight:300;}div.vs-blog img{max-width:100%;}div.vs-blog input,div.vs-blog select,div.vs-blog textarea,div.vs-blog .form-control,div.vs-blog .btn{border-radius:0;}div.vs-blog .navbar-toggler{background:#0ff;}div.vs-blog .no-border{border:0;}div.vs-blog .btn-rounded{border-radius:30px;}div.vs-blog .list-group .list-group-item{position:relative;display:block;padding:0 0 20px 0;background:none;border-radius:0;border:0;}div.vs-blog .list-group .list-group-item:hover{background:none;}div.vs-blog .list-group .list-group-item+.list-group-item{border-top:1px solid #f5f5f5;padding:20px 0;}div.vs-blog .list-group .list-group-item h3{margin-top:0;}div.vs-blog .list-group.small-list .list-group-item{padding:10px 0;}div.vs-blog .list-group.small-list .list-group-item+.list-group-item{padding:10px 0;}div.vs-blog .font-75{font-size:.75em;}div.vs-blog .font-85{font-size:.85em;}div.vs-blog .font-92{font-size:.92em;}div.vs-blog .font-100{font-size:1em;}div.vs-blog .font-125{font-size:1.25em;}div.vs-blog .vs-blog-title{padding-bottom:15px;margin-bottom:25px;border-bottom:1px solid #ddd;}div.vs-blog .vs-blog-title h1,div.vs-blog .vs-blog-title h2,div.vs-blog .vs-blog-title h3,div.vs-blog .vs-blog-title h4,div.vs-blog .vs-blog-title h5,div.vs-blog .vs-blog-title h6{margin:0;padding:0;}div.vs-blog .vs-footer{padding-top:15px;margin-top:25px;border-top:1px solid #ddd;}div.vs-blog .vs-seperator{padding:0 4px;opacity:.3;}div.vs-blog .hero-section{padding:0;}div.vs-blog .hero-section .hero-articles{position:relative;overflow:hidden;}div.vs-blog .hero-section .hero-articles .hero-content{position:absolute;left:12%;right:12%;bottom:80px;z-index:4;text-align:center;}div.vs-blog .hero-section .hero-articles .hero-content h2{margin-top:0;font-size:2.5em;font-weight:bold;}div.vs-blog .hero-section .hero-articles .hero-content a{color:#fff;text-shadow:0 0 20px rgba(0,0,0,.5);}div.vs-blog .hero-section .hero-articles .hero-content p{color:#fff;}div.vs-blog .hero-section .hero-articles .tags .tag{background:rgba(208,208,208,.3);color:#fff !important;}div.vs-blog .hero-section .hero-articles .tags .tag:hover{background:#fff;color:#000 !important;}div.vs-blog .hero-section .hero-articles .article-owner{text-align:center;position:relative;z-index:12;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos{color:#000;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos a{color:#000;}div.vs-blog .hero-section .hero-articles .article-owner .article-infos .seperator{margin:0 4px;color:rgba(255,255,255,.2);}div.vs-blog .hero-section .hero-articles .article-owner .article-infos img.article-avatar{width:64px;margin:-25px 10px 0 0;border:3px solid #fff;display:inline-block;border-radius:50%;}div.vs-blog .hero-section .hero-articles .img-container{min-height:320px;}div.vs-blog .hero-section .hero-articles .img-container img{filter:grayscale(10%);}div.vs-blog .hero-section .hero-articles .img-container::after{content:"";display:block;position:absolute;z-index:1;bottom:0;width:100%;top:1% !important;background:linear-gradient(to bottom,transparent 0,rgba(0,0,0,.75) 89%,rgba(0,0,0,.78) 93%) !important;transition:.2s all ease-in-out;opacity:.9;}div.vs-blog .hero-section .hero-articles:hover .img-container::after{opacity:1;}div.vs-blog .article-owner .article-infos{color:#000;}div.vs-blog .article-owner .article-infos a{color:rgba(0,0,0,.6);}div.vs-blog .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .article-owner .article-infos img.article-avatar{width:30px;margin:-1px 4px 0 0;display:inline-block;border-radius:50%;}div.vs-blog .card-articles .card-content{padding:10px 0 10px;}div.vs-blog .card-articles .card-content h3{margin:10px 0;}div.vs-blog .card-articles .card-content h3 a{font-weight:700;}div.vs-blog .card-articles .article-owner{text-align:left;}div.vs-blog .card-articles .article-owner .article-infos{color:#000;}div.vs-blog .card-articles .article-owner .article-infos a{color:rgba(0,0,0,.6);}div.vs-blog .card-articles .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .card-articles .article-owner .article-infos img.article-avatar{width:30px;margin:-1px 4px 0 0;display:inline-block;border-radius:50%;}div.vs-blog .article-owner{font-size:.85em;}div.vs-blog .user-link-icons{position:absolute;right:18px;top:15px;z-index:3;}div.vs-blog .user-link-icons a{display:inline-block;color:#eee;margin-left:12px;font-size:1.25em;}div.vs-blog .user-link-icons a:hover{color:#fff;}div.vs-blog .tags .tag{display:inline-block;padding:2px 8px;background:rgba(208,208,208,.3);border-radius:30px;margin:0 1px 3px 0;color:#b1b1b1 !important;font-size:.7em;line-height:1.6em;text-transform:uppercase;}div.vs-blog .tags .tag:hover{background:#000;color:#fff !important;}div.vs-blog .popular-tags a{display:block;font-size:.9em;}div.vs-blog .popular-tags a span{float:right;opacity:.3;font-size:.9em;}div.vs-blog .img-container{position:relative;overflow:hidden;border-radius:4px;background:#dcdcdc;}div.vs-blog .post-detail h1{padding:0 0;line-height:1.25em;font-size:3.5em;}div.vs-blog .post-detail .article-owner{text-align:center;position:relative;z-index:12;}div.vs-blog .post-detail .article-owner .article-infos{color:#000;}div.vs-blog .post-detail .article-owner .article-infos a{color:#000;color:rgba(0,0,0,.8);}div.vs-blog .post-detail .article-owner .article-infos .seperator{margin:0 4px;color:rgba(0,0,0,.2);}div.vs-blog .post-detail .article-owner .article-infos img.article-avatar{width:64px;margin:-20px 10px 0 0;display:inline-block;border-radius:50%;border:3px solid #fff;}div.vs-blog .post-detail .post-content{font-size:1.125em;}div.vs-blog .post-detail .post-content .post-img-container{margin:50px -80px 20px;overflow:hidden;border-radius:4px;}div.vs-blog .post-detail .post-content .lead{font-size:1.125em;color:#111;}div.vs-blog .comment-avatar{max-width:64px;}div.vs-blog .answer-avatar{max-width:48px;}div.vs-blog .media{font-size:.95em;}div.vs-blog .media .media{font-size:.95em;}div.vs-blog .comment-area .comment-owner{margin-bottom:2px;}div.vs-blog .comment-area .comment-owner span{font-weight:300;color:#999;font-size:.8em;}div.vs-blog .comment-area>.media{padding:30px 0;border-bottom:1px solid #f1f1f1;}div.vs-blog .comment-area>.media .media{padding:20px 0;}div.vs-blog .comment-area .comment-buttons{padding:4px 8px;}div.vs-blog .comment-area .comment-buttons .seperator{color:#ddd;margin:0 8px;}div.vs-blog .comment-area .comment-buttons .count{color:#fff;background:#ddd;margin-left:5px;padding:1px 3px;font-size:10px;border-radius:3px;}div.vs-blog .comment-area .comment-buttons .count.count-up{background:#999;}div.vs-blog .comment-area .comment-buttons a{opacity:.5;}div.vs-blog .comment-area .comment-buttons a:hover{opacity:.75;}div.vs-blog .comment-area p{margin-bottom:6px;}div.vs-blog .comment-area .comment-avatar{width:64px;}div.vs-blog .comment-area .answer-avatar{width:48px;}@media(min-width:767px){div.vs-blog .box-articles .img-container{position:relative;overflow:hidden;}div.vs-blog .box-articles .img-container img{position:absolute;left:50%;top:50%;height:100%;width:auto;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:initial;}div.vs-blog .box-articles .img-container img.portrait{width:100%;height:auto;}}
\ No newline at end of file
diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss
index 83c06aeea3..b5bd681f53 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss
+++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Shared/Styles/blog.scss
@@ -3,9 +3,7 @@ div.vs-blog {
background: white;
padding: 30px;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
- font-size: 14px;
- margin: 0 auto;
- max-width: 1080px;
+ font-size: 14px;
@import "bootstrap-overwrite.scss";
@import "header.scss";
@import "home.scss";
From 63bc860d757a9a953306ba6d62bab1e7b8e78099 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?=
Date: Mon, 24 Jun 2019 18:35:57 +0300
Subject: [PATCH 3/3] Resolved #1361: Layout Hook Feature for MVC UI
---
.../Themes/Basic/Layouts/Account.cshtml | 12 +++++++--
.../Themes/Basic/Layouts/Application.cshtml | 8 ++++++
.../Themes/Basic/Layouts/Empty.cshtml | 8 ++++++
.../Volo.Abp.AspNetCore.Mvc.UI.csproj | 5 ++++
.../Mvc/UI/AbpAspNetCoreMvcUiModule.cs | 9 ++++++-
.../UI/Components/LayoutHook/Default.cshtml | 9 +++++++
.../Components/LayoutHook/LayoutHookInfo.cs | 24 +++++++++++++++++
.../LayoutHook/LayoutHookOptions.cs | 24 +++++++++++++++++
.../LayoutHook/LayoutHookViewComponent.cs | 27 +++++++++++++++++++
.../LayoutHook/LayoutHookViewModel.cs | 15 +++++++++++
.../UI/Components/LayoutHook/LayoutHooks.cs | 17 ++++++++++++
...ViewComponentHelperLayoutHookExtensions.cs | 24 +++++++++++++++++
12 files changed, 179 insertions(+), 3 deletions(-)
create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/Default.cshtml
create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookInfo.cs
create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookOptions.cs
create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs
create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewModel.cs
create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHooks.cs
create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml
index 43c05559f9..c5ff3762b2 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml
@@ -2,11 +2,13 @@
@using Microsoft.Extensions.Options
@using Volo.Abp.AspNetCore.MultiTenancy
@using Volo.Abp.AspNetCore.Mvc.AntiForgery
+@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
@using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.MainNavbar
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.PageAlerts
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components
+@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@using Volo.Abp.MultiTenancy
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@inject IBrandingProvider BrandingProvider
@@ -25,6 +27,8 @@
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.First, StandardLayouts.Account)
+
@@ -34,16 +38,19 @@
@await RenderSectionAsync("styles", false)
+
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.Last, StandardLayouts.Account)
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.First, StandardLayouts.Account)
@(await Component.InvokeAsync())
- @if (MultiTenancyOptions.Value.IsEnabled &&
- (TenantResolveResultAccessor.Result?.AppliedResolvers?.Contains(CookieTenantResolveContributor.ContributorName) == true))
+ @if (MultiTenancyOptions.Value.IsEnabled &&
+ (TenantResolveResultAccessor.Result?.AppliedResolvers?.Contains(CookieTenantResolveContributor.ContributorName) == true))
{
@MultiTenancyStringLocalizer["Tenant"]:
@@ -73,5 +80,6 @@
@await RenderSectionAsync("scripts", false)
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Account)
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml
index b189bf8e40..db8f8e1a6b 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml
@@ -1,9 +1,11 @@
@using Volo.Abp.AspNetCore.Mvc.AntiForgery
+@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.MainNavbar
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.PageAlerts
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components
+@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@inject IBrandingProvider BrandingProvider
@inject IPageLayout PageLayout
@@ -29,6 +31,8 @@
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.First, StandardLayouts.Application)
+
@@ -38,8 +42,11 @@
@await RenderSectionAsync("styles", false)
+
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.Last, StandardLayouts.Application)
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.First, StandardLayouts.Application)
@(await Component.InvokeAsync
())
@@ -58,5 +65,6 @@
@await RenderSectionAsync("scripts", false)
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Application)
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml
index 59fd80ea1d..da7c119de4 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml
@@ -1,8 +1,10 @@
@using Volo.Abp.AspNetCore.Mvc.AntiForgery
+@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.PageAlerts
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components
+@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@inject IBrandingProvider BrandingProvider
@inject IPageLayout PageLayout
@@ -28,6 +30,8 @@
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.First, StandardLayouts.Empty)
+
@@ -37,8 +41,11 @@
@await RenderSectionAsync("styles", false)
+
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Head.Last, StandardLayouts.Empty)
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.First, StandardLayouts.Empty)
@(await Component.InvokeAsync
())
@@ -52,5 +59,6 @@
@await RenderSectionAsync("scripts", false)
+ @await Component.InvokeLayoutHookAsync(LayoutHooks.Body.Last, StandardLayouts.Empty)
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj
index 9911b60b5c..34367260f9 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj
@@ -10,6 +10,11 @@
+
+
+
+
+
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs
index cafc4c87fc..60a142bda5 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/AbpAspNetCoreMvcUiModule.cs
@@ -1,5 +1,6 @@
using Volo.Abp.Modularity;
using Volo.Abp.UI.Navigation;
+using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Mvc.UI
{
@@ -7,6 +8,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI
[DependsOn(typeof(AbpUiNavigationModule))]
public class AbpAspNetCoreMvcUiModule : AbpModule
{
-
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
+ }
}
}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/Default.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/Default.cshtml
new file mode 100644
index 0000000000..61e9afbf6e
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/Default.cshtml
@@ -0,0 +1,9 @@
+@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
+@model LayoutHookViewModel
+@if (Model.Hooks.Any())
+{
+ foreach (var hook in Model.Hooks)
+ {
+ @await Component.InvokeAsync(hook.ComponentType, new { layout = Model.Layout })
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookInfo.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookInfo.cs
new file mode 100644
index 0000000000..7828ba6536
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookInfo.cs
@@ -0,0 +1,24 @@
+using System;
+
+namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
+{
+ public class LayoutHookInfo
+ {
+ ///
+ /// ViewComponent type.
+ ///
+ public Type ComponentType { get; }
+
+ ///
+ /// Specifies the layout name to apply this hook.
+ /// null indicates that this hook will be applied to all layouts.
+ ///
+ public string Layout { get; }
+
+ public LayoutHookInfo(Type componentType, string layout = null)
+ {
+ ComponentType = componentType;
+ Layout = layout;
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookOptions.cs
new file mode 100644
index 0000000000..e51f491f64
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookOptions.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
+{
+ public class LayoutHookOptions
+ {
+ public IDictionary> Hooks { get; }
+
+ public LayoutHookOptions()
+ {
+ Hooks = new Dictionary>();
+ }
+
+ public LayoutHookOptions Add(string name, Type componentType, string layout = null)
+ {
+ Hooks
+ .GetOrAdd(name, () => new List())
+ .Add(new LayoutHookInfo(componentType, layout));
+
+ return this;
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs
new file mode 100644
index 0000000000..85527037a8
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Options;
+
+namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
+{
+ public class LayoutHookViewComponent : AbpViewComponent
+ {
+ protected LayoutHookOptions Options { get; }
+
+ public LayoutHookViewComponent(IOptions options)
+ {
+ Options = options.Value;
+ }
+
+ public virtual IViewComponentResult Invoke(string name, string layout)
+ {
+ var hooks = Options.Hooks.GetOrDefault(name)?.ToArray() ?? Array.Empty();
+
+ return View(
+ "~/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/Default.cshtml",
+ new LayoutHookViewModel(hooks, layout)
+ );
+ }
+ }
+}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewModel.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewModel.cs
new file mode 100644
index 0000000000..3e71c5cd2d
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewModel.cs
@@ -0,0 +1,15 @@
+namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
+{
+ public class LayoutHookViewModel
+ {
+ public LayoutHookInfo[] Hooks { get; }
+
+ public string Layout { get; }
+
+ public LayoutHookViewModel(LayoutHookInfo[] hooks, string layout)
+ {
+ Hooks = hooks;
+ Layout = layout;
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHooks.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHooks.cs
new file mode 100644
index 0000000000..ab3ef8e903
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHooks.cs
@@ -0,0 +1,17 @@
+namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
+{
+ public static class LayoutHooks
+ {
+ public static class Head
+ {
+ public const string First = "Header.First";
+ public const string Last = "Header.Last";
+ }
+
+ public static class Body
+ {
+ public const string First = "Body.First";
+ public const string Last = "Body.Last";
+ }
+ }
+}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs
new file mode 100644
index 0000000000..99b6596401
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs
@@ -0,0 +1,24 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Html;
+using Microsoft.AspNetCore.Mvc;
+
+namespace Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook
+{
+ public static class ViewComponentHelperLayoutHookExtensions
+ {
+ public static Task InvokeLayoutHookAsync(
+ this IViewComponentHelper componentHelper,
+ string name,
+ string layout)
+ {
+ return componentHelper.InvokeAsync(
+ typeof(LayoutHookViewComponent),
+ new
+ {
+ name = name,
+ layout = layout
+ }
+ );
+ }
+ }
+}