fix: pc文章详情发布时间中英文区分
This commit is contained in:
@@ -93,6 +93,12 @@ class Article extends Common
|
|||||||
])
|
])
|
||||||
->bypk($id)
|
->bypk($id)
|
||||||
->find();
|
->find();
|
||||||
|
if (!$detail->isEmpty()) {
|
||||||
|
$detail->release_time = date('Y-m-d H:i:s', strtotime($detail->release_time));
|
||||||
|
if (cookie('think_lang') == 'en-us') {
|
||||||
|
$detail->release_time = 'Posted on ' . date('F j, Y', strtotime($detail->release_time));
|
||||||
|
}
|
||||||
|
}
|
||||||
View::assign('detail', $detail);
|
View::assign('detail', $detail);
|
||||||
|
|
||||||
// 获取分享配置相关
|
// 获取分享配置相关
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
{notempty name="detail.seo_title"}<title>{$detail.seo_title}</title>{else /}{__BLOCK__}{/notempty}
|
{notempty name="detail.seo_title"}<title>{$detail.seo_title}</title>{else /}{__BLOCK__}{/notempty}
|
||||||
{/block}
|
{/block}
|
||||||
{block name="seo"}
|
{block name="seo"}
|
||||||
{notempty name="detail.seo_keywords"}
|
{notempty name="detail.seo_keywords"}
|
||||||
<meta name="keywords" content="{$detail.seo_keywords}" />
|
<meta name="keywords" content="{$detail.seo_keywords}" />
|
||||||
<meta name="description" content="{$detail.seo_desc}" />
|
<meta name="description" content="{$detail.seo_desc}" />
|
||||||
{else /}
|
{else /}
|
||||||
{__BLOCK__}
|
{__BLOCK__}
|
||||||
{/notempty}
|
{/notempty}
|
||||||
{/block}
|
{/block}
|
||||||
{block name="style"}
|
{block name="style"}
|
||||||
<link rel="stylesheet" href="__CSS__/article_detail.css">
|
<link rel="stylesheet" href="__CSS__/article_detail.css">
|
||||||
@@ -27,8 +27,6 @@
|
|||||||
<div class="blog_content">{$detail.content|raw}</div>
|
<div class="blog_content">{$detail.content|raw}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 评论只显示前面五条--->
|
<!-- 评论只显示前面五条--->
|
||||||
|
|
||||||
|
|
||||||
{notempty name="comments"}
|
{notempty name="comments"}
|
||||||
<div class="plmain">
|
<div class="plmain">
|
||||||
<div class="pl">
|
<div class="pl">
|
||||||
@@ -66,12 +64,10 @@
|
|||||||
<span>{:lang_i18n('名称')}</span>
|
<span>{:lang_i18n('名称')}</span>
|
||||||
<input class="form-control itinp new_name" type="text" name="name" style="text-indent: 10px;">
|
<input class="form-control itinp new_name" type="text" name="name" style="text-indent: 10px;">
|
||||||
<span>{:lang_i18n('电子邮箱')}</span>
|
<span>{:lang_i18n('电子邮箱')}</span>
|
||||||
<input class="form-control itinp new_email" type="email" name="email"
|
<input class="form-control itinp new_email" type="email" name="email" style="text-indent: 10px; margin-bottom:0;">
|
||||||
style="text-indent: 10px; margin-bottom:0;">
|
|
||||||
<p style="color: #C6C7C9; font-size: 0.75rem; margin-bottom: 0.625rem;">{:lang_i18n('您的电子邮件地址不会被公开')}</p>
|
<p style="color: #C6C7C9; font-size: 0.75rem; margin-bottom: 0.625rem;">{:lang_i18n('您的电子邮件地址不会被公开')}</p>
|
||||||
<span>{:lang_i18n('留言内容')}</span>
|
<span>{:lang_i18n('留言内容')}</span>
|
||||||
<textarea class="form-control itinp new_comment" name="content" rows="3"
|
<textarea class="form-control itinp new_comment" name="content" rows="3" style="text-indent: 10px;width: 98%; margin-top: 0.625rem;margin-bottom: 0.625rem;border: 1px solid #DBDBDB;"></textarea>
|
||||||
style="text-indent: 10px;width: 98%; margin-top: 0.625rem;margin-bottom: 0.625rem;border: 1px solid #DBDBDB;"></textarea>
|
|
||||||
<div class="comment_btn" style="color:#ffffff;">{:lang_i18n('提交留言')}</div>
|
<div class="comment_btn" style="color:#ffffff;">{:lang_i18n('提交留言')}</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,9 +131,9 @@
|
|||||||
const elHeight = $el.outerHeight();
|
const elHeight = $el.outerHeight();
|
||||||
// 元素底部距离视口顶部还有 50px 时触发动画
|
// 元素底部距离视口顶部还有 50px 时触发动画
|
||||||
const triggerPosition = scrollTop + viewportHeight;
|
const triggerPosition = scrollTop + viewportHeight;
|
||||||
if (scrollTop > $('.orico_Page_articleDetail').height()-350-900) {
|
if (scrollTop > $('.orico_Page_articleDetail').height() - 350 - 900) {
|
||||||
$(".atmright").css("position", "static");
|
$(".atmright").css("position", "static");
|
||||||
$(".orico_Page_articleDetail .articleDetailMain").css("align-items","flex-end");
|
$(".orico_Page_articleDetail .articleDetailMain").css("align-items", "flex-end");
|
||||||
} else {
|
} else {
|
||||||
// 还原原始样式
|
// 还原原始样式
|
||||||
$(".atmright").removeAttr("style"); // 清除自定义样式
|
$(".atmright").removeAttr("style"); // 清除自定义样式
|
||||||
|
|||||||
Reference in New Issue
Block a user