Skip to content

Commit

Permalink
Merge pull request #362 from dorthl/mian
Browse files Browse the repository at this point in the history
fix page
  • Loading branch information
dorthl authored Aug 7, 2023
2 parents 4c338fe + 5d3d10f commit 4c47557
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/Blogifier.Shared/BlogifierSharedConstant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public static class BlogifierSharedConstant
{
public const string PolicyAdminName = "Administrator";
public static readonly string PolicyAdminValue = $"{((int)UserType.Administrator)}";
public static readonly string DefaultAvatar = "img/avatar.webp";
public static readonly string DefaultAvatar = "/img/avatar.jpg";
public static readonly string DefaultCover = "img/cover.jpg";
public static readonly string DefaultLogo = "img/logo-sm.png";
public static readonly JsonSerializerOptions DefaultJsonSerializerOptions = new(JsonSerializerDefaults.Web);
Expand Down
12 changes: 12 additions & 0 deletions src/Blogifier.Shared/Resources/Resource.resx
Original file line number Diff line number Diff line change
Expand Up @@ -774,4 +774,16 @@
<data name="page-not-found-message" xml:space="preserve">
<value>The Page you are looking for doesn't exist, or error occurred.</value>
</data>
<data name="next-post" xml:space="preserve">
<value>Next Post</value>
</data>
<data name="previous-post" xml:space="preserve">
<value>Previous Post</value>
</data>
<data name="related-posts" xml:space="preserve">
<value>Related Posts</value>
</data>
<data name="view-all" xml:space="preserve">
<value>View All</value>
</data>
</root>
48 changes: 48 additions & 0 deletions src/Blogifier.Shared/Resources/Resource.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -456,4 +456,52 @@
<data name="page-not-found" xml:space="preserve">
<value>页面不存在</value>
</data>
<data name="basic" xml:space="preserve">
<value>基本</value>
</data>
<data name="customize" xml:space="preserve">
<value>自定义</value>
</data>
<data name="menus" xml:space="preserve">
<value>菜单</value>
</data>
<data name="scripts" xml:space="preserve">
<value>脚本</value>
</data>
<data name="widgets" xml:space="preserve">
<value>小部件</value>
</data>
<data name="basic-settings" xml:space="preserve">
<value>基础设置</value>
</data>
<data name="default-cover" xml:space="preserve">
<value>默认背景图</value>
</data>
<data name="script-footer" xml:space="preserve">
<value>尾部脚本</value>
</data>
<data name="script-header" xml:space="preserve">
<value>头部脚本</value>
</data>
<data name="script-settings" xml:space="preserve">
<value>脚本设置</value>
</data>
<data name="users-settings" xml:space="preserve">
<value>用户设置</value>
</data>
<data name="read-more" xml:space="preserve">
<value>阅读更多</value>
</data>
<data name="next-post" xml:space="preserve">
<value>下一篇</value>
</data>
<data name="previous-post" xml:space="preserve">
<value>上一篇</value>
</data>
<data name="related-posts" xml:space="preserve">
<value>推荐博客</value>
</data>
<data name="view-all" xml:space="preserve">
<value>查看所有</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
}
</section>

<partial name="../components/nav.cshtml" />
<partial name="./nav.cshtml" />
</div>
</header>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<h1 class="post-title">@Model.PostSlug.Post.Title</h1>
<div class="post-meta d-flex align-items-center">
<div class="post-meta-item post-meta-author">
<img class="post-meta-author-img d-none d-md-block" width="32" height="32" src="~/@UserHelper.CheckGetAvatarUrl(Model.PostSlug.Post.User.Avatar)"
<img class="post-meta-author-img d-none d-md-block" width="32" height="32" src="@UserHelper.CheckGetAvatarUrl(Model.PostSlug.Post.User.Avatar)"
alt="@Model.PostSlug.Post.User.NickName" aria-hidden="true" />
<div class="post-meta-author-details">
<span class="post-meta-label">@_localizer["author"]</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<section class="post-author d-md-flex align-items-md-center text-center text-md-start">
<figure class="post-author-cover mb-3 mb-md-0">
<img class="post-author-img" width="96" height="96" src="~/@UserHelper.CheckGetAvatarUrl(Model.PostSlug.Post.User.Avatar)" alt="@Model.PostSlug.Post.User.NickName" />
<img class="post-author-img" width="96" height="96" src="@UserHelper.CheckGetAvatarUrl(Model.PostSlug.Post.User.Avatar)" alt="@Model.PostSlug.Post.User.NickName" />
</figure>
<div class="post-author-details">
<h5 class="post-author-name">@Model.PostSlug.Post.User.NickName</h5>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@model PostPagerModel

@inject IStringLocalizer<Resource> _localizer

@{
var featured = Model.Pager.Items.Where(p => p.State == PostState.Featured).Take(3).ToList();
}
Expand Down Expand Up @@ -56,7 +58,7 @@
@item.Description
</p>
<a class="featured-more" href="~/post/@item.Slug">
Read More
@_localizer["read-more"]
<svg width="16" height="16" class="bi bi-arrow-right">
<use xlink:href="/_content/@ThemesStandardConstant.AssemblyName/img/icon-sprites.svg#bi-arrow-right"></use>
</svg>
Expand All @@ -67,13 +69,17 @@
}
}
</div>
@* <button class="carousel-control-next featured-next d-none d-xl-block" type="button" data-bs-target="#carouselFeatured" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
<button class="carousel-control-prev featured-prev d-none d-xl-block" type="button" data-bs-target="#carouselFeatured" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>*@
<span class="visually-hidden">
@_localizer["previous"]
</span>
</button>
<button class="carousel-control-next featured-next d-none d-xl-block" type="button" data-bs-target="#carouselFeatured" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">
@_localizer["next"]
</span>
</button>
</div>
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
@if (Model.PostSlug.Older != null)
{
<div class="col">
<a class="post-nav-item text-start" href="~/post/@Model.PostSlug.Older.Slug" aria-label="@_localizer["Previous post"]">
<span class="post-nav-text">@_localizer["Previous post"]</span>
<a class="post-nav-item text-start" href="~/post/@Model.PostSlug.Older.Slug" aria-label="@_localizer["previous-post"]">
<span class="post-nav-text">@_localizer["previous-post"]</span>
<h4 class="post-nav-title">@Model.PostSlug.Older.Title</h4>
</a>
</div>
}
@if (Model.PostSlug.Newer != null)
{
<div class="col">
<a class="post-nav-item text-end" href="~/post/@Model.PostSlug.Newer.Slug" aria-label="@_localizer["Next post"]">
<span class="post-nav-text">@_localizer["Next post"]</span>
<a class="post-nav-item text-end" href="~/post/@Model.PostSlug.Newer.Slug" aria-label="@_localizer["next-post"]">
<span class="post-nav-text">@_localizer["next-post"]</span>
<h4 class="post-nav-title">@Model.PostSlug.Newer.Title</h4>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
{
<section class="related">
<header class="related-header">
<h3 class="related-header-title">Related Posts</h3>
<h3 class="related-header-title">
@_localizer["related-posts"]
</h3>
<a class="related-header-link ms-auto" href="~/">
View All
@_localizer["view-all"]
<svg width="22" height="22" class="bi bi-arrow-left">
<use xlink:href="/_content/@ThemesStandardConstant.AssemblyName/img/icon-sprites.svg#bi-arrow-left"></use>
</svg>
Expand All @@ -44,11 +46,12 @@
<h2 class="post-grid-title">
<a class="post-grid-link" href="~/post/@post.Slug">@post.Title</a>
</h2>
<p class="post-grid-desc">@Html.Raw(post.DescriptionHtml)</p>
<p class="post-grid-desc">
@Html.Raw(post.Description)
</p>
<div class="post-grid-meta d-flex">
<div class="post-grid-author">
<img class="post-grid-author-img" src="@post.User.Avatar" width="16" height="16"
alt="@post.User.NickName" aria-hidden="true">
<img class="post-grid-author-img" src="@UserHelper.CheckGetAvatarUrl(post.User.Avatar)" width="16" height="16" alt="@post.User.NickName" aria-hidden="true">
<span class="post-grid-author-name">@post.User.NickName</span>
</div>
<div class="post-grid-date">
Expand All @@ -58,9 +61,11 @@
<time class="post-grid-date-time">@DateTimeHelper.ToFriendlyShortDateString(post.PublishedAt)</time>
</div>
<a class="post-grid-more ms-auto" href="~/post/@post.Slug" tabindex="-1">
<span>Read</span>
<span>
@_localizer["read"]
</span>
<svg width="16" height="16" class="bi bi-arrow-right-short">
<use xlink:href="/_content/@ThemesStandardConstant.AssemblyName/img/icon-sprites.svg#bi-calendar-event"></use>
<use xlink:href="/_content/@ThemesStandardConstant.AssemblyName/img/icon-sprites.svg#bi-arrow-right-short"></use>
</svg>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
<time class="post-grid-date-time">@DateTimeHelper.ToFriendlyShortDateString(post.PublishedAt)</time>
</div>
<a class="post-grid-more ms-auto" href="~/post/@post.Slug" tabindex="-1">
<span>Read</span>
<span>
@_localizer["read"]
</span>
<svg width="16" height="16" class="bi bi-arrow-right-short">
<use xlink:href="/_content/@ThemesStandardConstant.AssemblyName/img/icon-sprites.svg#bi-arrow-right-short"></use>
</svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</h2>
<div class="post-list-meta d-flex">
<div class="post-list-meta-item post-list-author">
<img class="post-list-author-img" src="~/@UserHelper.CheckGetAvatarUrl(post.User.Avatar)" width="16" height="16"
<img class="post-list-author-img" src="@UserHelper.CheckGetAvatarUrl(post.User.Avatar)" width="16" height="16"
alt="@post.User.NickName">
<span class="post-list-author-name">@post.User.NickName</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="form-item">
<label class="form-label mb-1">@_localizer["profile-picture"]</label>
<div class="d-flex">
<img src="~/@UserHelper.CheckGetAvatarUrl(Model.Avatar)" width="39" height="39" class="profilePicture rounded me-3" alt="@Model.NickName" />
<img src="@UserHelper.CheckGetAvatarUrl(Model.Avatar)" width="39" height="39" class="profilePicture rounded me-3" alt="@Model.NickName" />
<button class="btn btn-link" onclick="return fileManager.uploadClick('@UploadType.Avatar');" type="button" title="@_localizer["upload"]" data-bs-toggle="tooltip">
<svg width="18" height="18" class="bi bi-arrow-up-circle">
<use xlink:href="/_content/@ThemesStandardConstant.AssemblyName/img/icon-sprites.svg#bi-arrow-up-circle"></use>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@import "../../node_modules/bootstrap/scss/modal";
@import "../../node_modules/bootstrap/scss/tooltip";
@import "../../node_modules/bootstrap/scss/popover";
// @import "../../node_modules/bootstrap/scss/carousel";
@import "../../node_modules/bootstrap/scss/carousel";
@import "../../node_modules/bootstrap/scss/spinners";
// @import "../../node_modules/bootstrap/scss/offcanvas";

Expand Down
4 changes: 2 additions & 2 deletions src/Blogifier.Themes.Standard/assets/scss/post/_featured.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
&-cover {
margin: 0;
max-height: 100%;
min-height: 100%;
min-height: 311.375px;
overflow: hidden;
position: relative;
border-radius: $radius-var;
Expand Down Expand Up @@ -113,7 +113,7 @@
&-more {
font-weight: 500;
font-size: 0.875rem;
color: $color;
color: #555;
text-decoration: none;
&:hover {
color: #000;
Expand Down
Binary file added src/Blogifier/wwwroot/img/avatar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/Blogifier/wwwroot/img/avatar.webp
Binary file not shown.

0 comments on commit 4c47557

Please sign in to comment.