移植菜单栏
This commit is contained in:
parent
2ad7117e8a
commit
63e0f77652
45
header.ftl
45
header.ftl
|
@ -0,0 +1,45 @@
|
|||
<#macro head title>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="keywords" content="${meta_keywords!}"/>
|
||||
<meta name="description" content="${meta_description!}" />
|
||||
<title>${title}</title>
|
||||
<link href="${theme_base!}/source/css/kico.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="${theme_base!}/source/css/single.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="https://fastly.jsdelivr.net/gh/FortAwesome/Font-Awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
|
||||
<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1"/>
|
||||
<link rel="shortcut icon" type="images/x-icon" href="${theme_base!}/source/images/icon.png" sizes="192x192"/>
|
||||
${blog_logo!}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="head-title">
|
||||
<h4>${blog_title!}</h4>
|
||||
</div>
|
||||
<div class="head-action">
|
||||
<div class="toggle-btn"></div>
|
||||
<div class="light-btn"></div>
|
||||
<div class="search-btn"></div>
|
||||
</div>
|
||||
<form class="head-search" method="post">
|
||||
<input type="text" name="s" placeholder="搜索什么?">
|
||||
</form>
|
||||
<nav class="head-menu">
|
||||
<@menuTag method="list">
|
||||
<#list menus?sort_by('priority') as menu>
|
||||
<a href="${menu.url}" target="${menu.target!}">${menu.name} </a>
|
||||
</#list>
|
||||
</@menuTag>
|
||||
</nav>
|
||||
<#nested >
|
||||
</header>
|
||||
<script src="${theme_base!}/source/js/kico.js"></script>
|
||||
<script src="${theme_base!}/source/js/single.js"></script>
|
||||
<script src="${theme_base!}/source/js/prism.js"></script>
|
||||
<@global.footer />
|
||||
</body>
|
||||
</html>
|
||||
</#macro>
|
||||
|
106
index.ftl
106
index.ftl
|
@ -1,64 +1,62 @@
|
|||
<#include "module/macro.ftl">
|
||||
<#include "header.ftl">
|
||||
<@head title="${blog_title!}"/>
|
||||
<#macro greet>
|
||||
<font size="+2">Hello Joe!</font>
|
||||
|
||||
<#--<h1>公告</h1>
|
||||
<p>
|
||||
${settings.index_notice!}
|
||||
</p>
|
||||
-->
|
||||
<main>
|
||||
<#--<h1>公告</h1><#macro greet><font size="+2">Hello Joe!</font><@greet></@greet>
|
||||
</#macro><p>${settings.index_notice!} </p> -->
|
||||
<main>
|
||||
<div class="wrap min">
|
||||
<section class="home-title">
|
||||
<h1>${blog_title!}</h1>
|
||||
<span>${user.description!}</span>
|
||||
<#--快捷-->
|
||||
<div class="home-social"> </div>
|
||||
<div class="home-social"> </div>
|
||||
</section>
|
||||
<section class="home-posts">
|
||||
<div class="post-item">
|
||||
<#list posts.content as post>
|
||||
<h2>
|
||||
<a href="${post.fullPath!}">${post.title!}</a>
|
||||
</h2>
|
||||
<p>${post.summary!}</p>
|
||||
<div class="post-meta">
|
||||
<time class="date">${post.createTime?string('yyyy-MM-dd')!}</time>
|
||||
<span class="category">
|
||||
<#list post.categories as category>
|
||||
${category.name!}
|
||||
</#list></span>
|
||||
<span class="tags">
|
||||
<#list post.tags as tag>
|
||||
<a href="${tag.fullPath}" class="tag">${tag.name}</a>
|
||||
</#list>
|
||||
</span>
|
||||
<span class="comments">${post.commentCount!}°C</span>
|
||||
<span class="visits">${post.visits!}</span>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
</section>
|
||||
<section class="page-navigator">
|
||||
<div class="post-item">
|
||||
<#list posts.content as post>
|
||||
<h2>
|
||||
<a href="${post.fullPath!}">${post.title!}</a>
|
||||
</h2>
|
||||
<p>${post.summary!}</p>
|
||||
<div class="post-meta">
|
||||
<time class="date">
|
||||
${post.createTime?string('yyyy-MM-dd')!}
|
||||
</time>
|
||||
<span class="category">
|
||||
<#list post.categories as category>
|
||||
${category.name!}
|
||||
</#list>
|
||||
</span>
|
||||
<span class="tags">
|
||||
<#list post.tags as tag>
|
||||
<a href="${tag.fullPath}" class="tag">${tag.name}</a>
|
||||
</#list>
|
||||
</span>
|
||||
<span class="comments">
|
||||
${post.commentCount!}°C
|
||||
</span>
|
||||
<span class="visits">
|
||||
${post.visits!}
|
||||
</span>
|
||||
</div>
|
||||
</#list>
|
||||
</div>
|
||||
</section>
|
||||
<section class="page-navigator">
|
||||
<@paginationTag method="archives" page="${posts.number}" total="${posts.totalPages}" display="3">
|
||||
<#if pagination.hasPrev>
|
||||
<a href="${pagination.prevPageFullPath!}">上一页</a>
|
||||
</#if>
|
||||
<#list pagination.rainbowPages as number>
|
||||
<#if number.isCurrent>
|
||||
<span class="current">${number.page!}</span>
|
||||
<#else>
|
||||
<a href="${number.fullPath!}">${number.page!}</a>
|
||||
</#if>
|
||||
</#list>
|
||||
<#if pagination.hasNext>
|
||||
<a href="${pagination.nextPageFullPath!}">下一页</a>
|
||||
</#if>
|
||||
</@paginationTag>
|
||||
</section>
|
||||
<#if pagination.hasPrev>
|
||||
<a href="${pagination.prevPageFullPath!}">上一页</a>
|
||||
</#if>
|
||||
<#list pagination.rainbowPages as number>
|
||||
<#if number.isCurrent>
|
||||
<span class="current">${number.page!}</span>
|
||||
<#else>
|
||||
<a href="${number.fullPath!}">${number.page!}</a>
|
||||
</#if>
|
||||
</#list>
|
||||
<#if pagination.hasNext>
|
||||
<a href="${pagination.nextPageFullPath!}">下一页</a>
|
||||
</#if>
|
||||
</@paginationTag>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<@greet></@greet>
|
||||
</#macro>
|
||||
</main>
|
Loading…
Reference in New Issue