🎨 仪表盘样式优化

pull/41/head
ruibaby 2018-10-31 10:17:55 +08:00
parent e2c2468be2
commit cd0513cf9a
4 changed files with 18 additions and 3 deletions

View File

@ -238,7 +238,7 @@
<span class="label bg-red"><@spring.message code='common.status.recycle-bin' /></span> <span class="label bg-red"><@spring.message code='common.status.recycle-bin' /></span>
</#if> </#if>
</td> </td>
<td>${post.postDate?if_exists?string("yyyy-MM-dd HH:mm")}</td> <td><@common.timeline datetime="${post.postDate?if_exists}"?datetime /></td>
</tr> </tr>
</#list> </#list>
<#else> <#else>
@ -310,7 +310,7 @@
<#break > <#break >
</#switch> </#switch>
</td> </td>
<td>${comment.commentDate?string("yyyy-MM-dd HH:mm")}</td> <td><@common.timeline datetime="${comment.commentDate}"?datetime /></td>
</tr> </tr>
</#list> </#list>
<#else> <#else>

View File

@ -35,7 +35,7 @@
</div> </div>
<h4> <h4>
${comment.commentAuthor} ${comment.commentAuthor}
<small> ${comment.commentDate?string("yyyy/MM/dd HH:mm")}</small> <small> <@common.timeline datetime="${comment.commentDate}"?datetime /></small>
</h4> </h4>
<object>${comment.commentContent}</object> <object>${comment.commentContent}</object>
</a> </a>

View File

@ -1,4 +1,5 @@
<#macro head> <#macro head>
<#import "/common/macro/common_macro.ftl" as common>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>

View File

@ -32,3 +32,17 @@
<meta name="360-site-verification" content="${options.blog_verification_qihu}" /> <meta name="360-site-verification" content="${options.blog_verification_qihu}" />
</#if> </#if>
</#macro> </#macro>
<#-- 时间格式化 几...前 -->
<#macro timeline datetime=.now>
<#assign ct = (.now?long-datetime?long)/1000>
<#if ct gte 31104000>${(ct/31104000)?int}年前
<#t><#elseif ct gte 2592000>${(ct/2592000)?int}个月前
<#t><#elseif ct gte 86400*2>${(ct/86400)?int}天前
<#t><#elseif ct gte 86400>昨天
<#t><#elseif ct gte 3600>${(ct/3600)?int}小时前
<#t><#elseif ct gte 60>${(ct/60)?int}分钟前
<#t><#elseif ct gt 0>${ct?int}秒前
<#t><#else>刚刚
</#if>
</#macro>