Browse Source
import scroll index style and js file if feature enabled
pull/12121/head
Musa Demir
5 years ago
No known key found for this signature in database
GPG Key ID: 117DF92322553DC8
1 changed files with
19 additions and
7 deletions
-
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml
|
|
|
@ -16,28 +16,40 @@ |
|
|
|
|
|
|
|
@inject IMarkdownToHtmlRenderer MarkdownRenderer |
|
|
|
|
|
|
|
|
|
|
|
@{ |
|
|
|
string dummyImageSource = "https://dummyimage.com/1280x720/a3a3a3/fff.png?text=" + Model.BlogPost.Title; |
|
|
|
var isScrollIndexEnabled = GlobalFeatureManager.Instance.IsEnabled<BlogPostScrollIndexFeature>(); |
|
|
|
} |
|
|
|
|
|
|
|
@section styles{ |
|
|
|
@if (isScrollIndexEnabled) |
|
|
|
{ |
|
|
|
<abp-abp-style-bundle> |
|
|
|
<abp-style src="/Pages/Public/CmsKit/Blogs/bootstrap-toc.css"/> |
|
|
|
</abp-abp-style-bundle> |
|
|
|
} |
|
|
|
<abp-abp-style-bundle> |
|
|
|
<abp-style src="/Pages/Public/CmsKit/Blogs/bootstrap-toc.css"/> |
|
|
|
<abp-style src="/Pages/Public/CmsKit/Blogs/blogPost.css"/> |
|
|
|
<abp-style type="typeof(HighlightJsStyleContributor)"/> |
|
|
|
</abp-abp-style-bundle> |
|
|
|
} |
|
|
|
|
|
|
|
@section scripts{ |
|
|
|
@if (isScrollIndexEnabled) |
|
|
|
{ |
|
|
|
<abp-script-bundle> |
|
|
|
<abp-style src="/Pages/Public/CmsKit/Blogs/bootstrap-toc.js"/> |
|
|
|
</abp-script-bundle> |
|
|
|
} |
|
|
|
|
|
|
|
<abp-script-bundle> |
|
|
|
<abp-style src="/Pages/Public/CmsKit/Blogs/bootstrap-toc.js"/> |
|
|
|
<abp-script type="typeof(HighlightJsScriptContributor)"/> |
|
|
|
<abp-script src="/Pages/Public/CmsKit/highlightOnLoad.js"/> |
|
|
|
<abp-script src="/Pages/Public/CmsKit/Blogs/blogpost.js"/> |
|
|
|
</abp-script-bundle> |
|
|
|
} |
|
|
|
|
|
|
|
@{ |
|
|
|
string dummyImageSource = "https://dummyimage.com/1280x720/a3a3a3/fff.png?text=" + Model.BlogPost.Title; |
|
|
|
var isScrollIndexEnabled = GlobalFeatureManager.Instance.IsEnabled<BlogPostScrollIndexFeature>(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div @Html.Raw(isScrollIndexEnabled ? "class=\"col-md-10 col-sm-12\"" : "class=\"col-md-12\"")> |
|
|
|
|