最新hexo教程请移步我的博客:www.heson10.com
本文地址:https://www.heson10.com/posts/51572.html
新增links页面
hexo new page links
打开在/source/links里面刚生成的index.md文件,在头部加上type: "links"
,
代码如下:
---
title: 朋友圈
date: 2020-07-19 22:28:52
type: "links"
---
配置menu
在主题配置文件menu下添加:
links: /links/ || fa fa-link
在\themes\next\languages\zh-CN.yml
文件中menu
下增加中文描述
links: 朋友圈
新增links.swig页面
在\themes\next\layout
新建links.swig
,内容如下:
{% block content %}
{######################}
{### LINKS BLOCK ###}
{######################}
<div id="links">
<style>
#links{
margin-top: 5rem;
}
.links-content{
margin-top:1rem;
}
.link-navigation::after {
content: " ";
display: block;
clear: both;
}
.card {
width: 300px;
font-size: 1rem;
padding: 10px 20px;
border-radius: 4px;
transition-duration: 0.15s;
margin-bottom: 1rem;
display:flex;
}
.card:nth-child(odd) {
float: left;
}
.card:nth-child(even) {
float: right;
}
.card:hover {
transform: sc