98 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			98 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <th:block xmlns:th="https://www.thymeleaf.org"
 | |
|           th:insert="~{common/layout :: layout (title = ${site.title}, canonical = ${site.url}, content = ~{::content}, isPost = false)}">
 | |
|   <th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}">
 | |
|     <div th:if="${isEmpty}" class="card card-empty">
 | |
|       <i class="fa fa-inbox"></i>
 | |
|       还没有发表过文章
 | |
|     </div>
 | |
|     <th:block th:unless="${isEmpty}">
 | |
|       <th:block th:replace="~{::firstIndex}"/>
 | |
|       <th:block th:replace="~{main/article_list :: articleList (${posts.items}, ${posts.first})}"/>
 | |
|       <th:block th:replace="~{main/pagination :: pagination (${posts}, '/index')}"/>
 | |
|     </th:block>
 | |
|   </th:block>
 | |
| 
 | |
|   <th:block th:if="${posts.first}" th:fragment="firstIndex">
 | |
|     <th:block th:replace="~{::carousel}"/>
 | |
|     <div th:if="${!#strings.isEmpty(theme.config.basic_info.index_inform)}" class="card tips brightness"
 | |
|          th:text="${theme.config.basic_info.index_inform}"></div>
 | |
|   </th:block>
 | |
| 
 | |
|   <th:block th:fragment="carousel">
 | |
|   </th:block>
 | |
| </th:block>
 | |
| <!--    <#if is_first_index!false>-->
 | |
| <!--        <#local carousel_content>-->
 | |
| <!--          <#list posts as post>-->
 | |
| <!--              <#if post.topPriority!=1>-->
 | |
| <!--                  <#break>-->
 | |
| <!--              </#if>-->
 | |
| <!--              <#if !post.metas?? || (post.metas.index_carousel!'false')=='false'>-->
 | |
| <!--                  <#continue>-->
 | |
| <!--              </#if>-->
 | |
| <!--              <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))>-->
 | |
| <!--              <#if thumbnail != ''>-->
 | |
| <!--                <a class="swiper-slide bg-shadow cover-image" style="background-image: url(${thumbnail})" href="${post.fullPath!}">-->
 | |
| <!--                    <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600">-->
 | |
| <!--                        <p class="swiper-slide-details-title">${post.title!}</p>-->
 | |
| <!--                        <ul class="breadcrumb">-->
 | |
| <!--                            <li><@global.timeline datetime=post.createTime/></li>-->
 | |
| <!--                            <li><i class="fa fa-eye"></i>${post.visits?c}</li>-->
 | |
| <!--                            <#if !post.disallowComment!false>-->
 | |
| <!--                                <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>-->
 | |
| <!--                            <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>-->
 | |
| <!--                            <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />-->
 | |
| <!--                            <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />-->
 | |
| <!--                            <li style="color: ${heatColor}">${heat}℃</li>-->
 | |
| <!--                        </ul>-->
 | |
| <!--                    </div>-->
 | |
| <!--                </a>-->
 | |
| <!--              </#if>-->
 | |
| <!--          </#list>-->
 | |
| <!--        </#local>-->
 | |
| <!--        <#if settings.sidebar_column=='module-left' || settings.sidebar_column=='module-right'>-->
 | |
| <!--          <#if settings.module_links?? && settings.module_links?trim != ''>-->
 | |
| <!--              <#local module_links=settings.module_links?split('\n')>-->
 | |
| <!--          <#else>-->
 | |
| <!--              <#local module_links=[]>-->
 | |
| <!--              <#list 0..1 as i>-->
 | |
| <!--                <#local post=posts[i]>-->
 | |
| <!--                <#local module_links=module_links+["推荐|${post.title!}|false|${post.thumbnail!}|${post.fullPath!}"]>-->
 | |
| <!--              </#list>-->
 | |
| <!--          </#if>-->
 | |
| <!--          <div class="model model-index">-->
 | |
| <!--            <div class="card widget swiper">-->
 | |
| <!--              <div class="swiper-wrapper">${carousel_content}</div>-->
 | |
| <!--              <div class="swiper-pagination"></div>-->
 | |
| <!--              <div class="swiper-button-prev"></div>-->
 | |
| <!--              <div class="swiper-button-next"></div>-->
 | |
| <!--            </div>-->
 | |
| <!--            <div class="model model-index-side">-->
 | |
| <!--              <#list 0..1 as i>-->
 | |
| <!--                <#if i < module_links?size >-->
 | |
| <!--                    <@model_build module_links[i]/>-->
 | |
| <!--                </#if>-->
 | |
| <!--              </#list>-->
 | |
| <!--            </div>-->
 | |
| <!--          </div>-->
 | |
| <!--            <#if module_links?size > 2 && module_links?size<=6>-->
 | |
| <!--              <div class="model model-attach model-attach-${module_links?size-2}">-->
 | |
| <!--                <#list 2..5 as i>-->
 | |
| <!--                    <#if i < module_links?size >-->
 | |
| <!--                        <@model_build module_links[i]/>-->
 | |
| <!--                    </#if>-->
 | |
| <!--                </#list>-->
 | |
| <!--              </div>-->
 | |
| <!--            </#if>-->
 | |
| <!--          <#assign is_carousel=true />-->
 | |
| <!--        <#elseif carousel_content != ''>-->
 | |
| <!--          <div class="card widget swiper">-->
 | |
| <!--            <div class="swiper-wrapper">${carousel_content}</div>-->
 | |
| <!--            <div class="swiper-pagination"></div>-->
 | |
| <!--            <div class="swiper-button-prev"></div>-->
 | |
| <!--            <div class="swiper-button-next"></div>-->
 | |
| <!--          </div>-->
 | |
| <!--          <#assign is_carousel=true />-->
 | |
| <!--        </#if>-->
 | |
| <!--    </#if>--> |