All Projects → miiiku → Flex Block

miiiku / Flex Block

Licence: mit
一个基于Hexo的主题

Projects that are alternatives of or similar to Flex Block

Hexo Theme Yilia Plus
一个简洁优雅的hexo主题 A simple and elegant theme for hexo.
Stars: ✭ 462 (+247.37%)
Mutual labels:  hexo, hexo-theme, simple
Hexo-Theme-MengD
A simple, lightweight Hexo theme(支持:pjax、discuss、twikoo、waline、valine评论)
Stars: ✭ 69 (-48.12%)
Mutual labels:  simple, hexo, hexo-theme
Hexo Theme Zhaoo
🐳 A simple theme for Hexo
Stars: ✭ 131 (-1.5%)
Mutual labels:  hexo, simple
Hexo Theme Melody
🎹A simple & beautiful & fast theme for Hexo.
Stars: ✭ 1,306 (+881.95%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Doku
📜 Doku, a Hexo theme designed for writing documents.
Stars: ✭ 101 (-24.06%)
Mutual labels:  hexo, hexo-theme
Image Focus
A dependency free utility for cropping images based on a focus point ~2.13kB gzipped
Stars: ✭ 134 (+0.75%)
Mutual labels:  image, responsive
Ungrid
ungrid - the simplest responsive css grid
Stars: ✭ 1,292 (+871.43%)
Mutual labels:  simple, responsive
Imgnotes
Extension of the jQuery imgViewer plugin to add markers and notes to the image
Stars: ✭ 98 (-26.32%)
Mutual labels:  image, responsive
Jekyll Cloudinary
Jekyll plugin adding a Liquid tag for Cloudinary, for better responsive images
Stars: ✭ 79 (-40.6%)
Mutual labels:  image, responsive
Yinwang
Blog Theme For Hexo
Stars: ✭ 133 (+0%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Ylion
😊 说不定是一个让你感到惊喜的hexo主题 🍻 🍬
Stars: ✭ 110 (-17.29%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Primer
The github style (primer) for Hexo theme.
Stars: ✭ 117 (-12.03%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Believe
A simple theme for hexo Sample:
Stars: ✭ 86 (-35.34%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Webstack
A hexo theme based on webstack. | 一个基于webstack的hexo主题。
Stars: ✭ 86 (-35.34%)
Mutual labels:  hexo, hexo-theme
React Responsive Picture
A future-proof responsive image component that supports latest Picture specification
Stars: ✭ 91 (-31.58%)
Mutual labels:  image, responsive
Hexo Theme Even
🚀 A super concise theme for Hexo
Stars: ✭ 1,244 (+835.34%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Oranges
🍊A simple hexo theme of minimalism
Stars: ✭ 95 (-28.57%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Vateral
😘hexo单页面主题:Vateral(a theme for hexo)
Stars: ✭ 133 (+0%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Aloha
A hexo theme, use semantic ui.
Stars: ✭ 68 (-48.87%)
Mutual labels:  hexo, hexo-theme
Hexo Theme Archer
🏹 A smart and modern theme for Hexo.
Stars: ✭ 1,163 (+774.44%)
Mutual labels:  hexo, hexo-theme

flex-block

一个基于Hexo的主题

模仿加瞎改Ghost里的一个主题nurui

预览

cover1

cover2

更新

2020.07

  • 添加主题模式(暂不支持手动切换,根据系统自动切换)

  • 删除 分类标签 页面

  • UI部分更新

2020.04

  • 添加社交图标显示

  • 局部小更新css样式

  • 添加返回到顶部按钮

  • 添加水平居中标签 center

2020.01

2019.12

  • 优化了若干代码,结构更清晰,修复了几处CSS显示问题

  • 修改文章内容显示宽度,和一些标签样式

  • 更新了 waterfall (画廊)标签 可设置大小

  • 新增 iamge (图片), bookmark (书签), aplayer 音频播放 标签

变动

关于 waterfall 标签,在更新主题后,会导致以前的视频不能正常播放,需要进行如下修改:

<!-- 旧版写法 -->
{% dplayer https://qiniu.miiiku.xyz/video/%E7%BE%8E.mp4 https://qiniu.miiiku.xyz/video/%E7%BE%8E.mp4?vframe/jpg/offset/10 %} 

<!-- 新版写法 需要指定属性名 -->
{% dplayer url="https://qiniu.miiiku.xyz/video/%E7%BE%8E.mp4" cover="https://qiniu.miiiku.xyz/video/%E7%BE%8E.mp4?vframe/jpg/offset/10" %} 

可自定义的相关页面

目前可以扩展的页面菜单有:

type value name
categories /categories 分类
tags /tags 标签
links /links 友链
messages /messages 留言板

如何添加:

🌰 添加友链页面

hexo new page links

找到新建的页面并修改Front-matter,添加如下内容

type: links

修改_config.yml配置菜单,找到menu选项添加如下内容

links: /links

添加其他自定义页面,如关于页面

hexo new page about

Front-matter相关

除开以有的字段,目前有效的相关属性

key layout desc
subtitle post,page,draft 小标题,文章或页面的小标题,文章缺省值为文章的发布时间
categories post,draft 分类,文章的分类
cover post,page,draft 封面,文章或页面的封面,banner图
type page 页面类型,取值详见可自定义的相关页面

建议复制以下代码替换scaffolds/下默认的模版

post.md,draft.md

---
title: {{ title }}
subtitle:
date: {{ date }}
categories:
tags:
cover:
---

page.md

---
title: {{ title }}
subtitle:
date: {{ date }}
cover:
type:
---

自定义数据

友链数据

在目录的source/_data下新建一个links.yml

一行一条数据,格式如下:

- { "name" : "", "describe" : "", "link" : "", "cover" : "" }

SEO优化相关

查找并修改Hexo下的_config.yml

# Site

# <meta name="description" content=[config.description]>
description: 

# <meta name="keywords" content=[config.keywords]>
keywords: 

# <meta name="author" content=[config.author]>
author: 

# <meta name="copyright" content=[config.copyright]>
copyright:

配置项:

代码高亮

hexo默认提供了highlightjs代码高亮,如何开启?

查找并修改Hexo下的_config.yml

highlight:
  enable: true
  line_number: true
  auto_detect: true
  tab_replace:
  hljs: true
  theme: monokai

其中enable为开启代码高亮,hljs设置为hljs为class,theme为highlight代码高亮主题,不设置默认为monokai

具体的主题可以在https://highlightjs.org/查看

长标题

进入flex-block配置文件_config.yml找到large_legnth

# large cover
large_legnth: 20

设置Card封面的大小,如 large_legnth: 20 表示如果文章标题长度大于20,文章卡片显示为长文章

aplayer

进入flex-block配置文件_config.yml找到aplayer

aplayer歌词模式默认使用第三种(文件格式)

# aplayer 视频播放
# docs: https://aplayer.js.org/#/
aplayer:
  enable: true
  theme: "#b7daff"
  autoplay: false
  loop: false
  mutex: true
  lrcType: 3

详情查看https://aplayer.js.org/

dplayer

进入flex-block配置文件_config.yml找到dplayer

# dplayer 视频播放
# docs: http://dplayer.js.org/
dplayer:
  enable: true
  theme: "#b7daff"
  autoplay: false
  loop: false
  mutex: true

详情查看http://dplayer.js.org/

zoom 图片预览

进入flex-block配置文件_config.yml找到zoom

# zoom 图片预览
# docs: https://github.com/miiiku/zoom
# Specific configuration information go to `layout/plug-in/zoom.ejs`
zoom: true

详情查看https://github.com/miiiku/zoom

waterfall 瀑布流

进入flex-block配置文件_config.yml找到waterfall

# waterfall 瀑布流
# docs: https://github.com/miiiku/waterfall
# Specific configuration information go to `layout/plug-in/waterfall.ejs`
waterfall: true

如果要进行详细的配置,请找到并编辑layout/plug-in/waterfall.ejs

详情查看https://github.com/miiiku/waterfall

Valine评论

进入flex-block配置文件_config.yml找到valine

# valine 评论
# docs: https://valine.js.org
# You can get your appid and appkey from https://leancloud.cn
# 这里appId和appKey一定一定要改成自己的,没有的话去https://leancloud.cn这个网站注册创建一个
valine:
  enable: true
  appId: # your appid
  appKey: # your appkey
  avatar: mm
  placeholder: 随便说点什么叭~
  notify: false
  visitor: false
  pageSize: 10

如果想给某一页面/文章取消评论,在md文件的front-matter中增加comments: false

详情查看https://valine.js.org/configuration.html

disqus评论

进入flex-block配置文件_config.yml找到disqus

# disqus 评论
# docs: https://disqus.com/
# website 网站到昵称
# error 加载失败的提示语
disqus:
  enable: true
  website: # your website
  error: 如果你看不到评论,那么就真的看不到评论 w(゜Д゜)w

一言

进入flex-block配置文件_config.yml找到hitokoto

# 一言
# docs: https://hitokoto.cn/api
# type: [a, b, c, d, e, f, g]
hitokoto:
  enable: true
  type: a

详情查看https://hitokoto.cn/api

内建标签

插入音频 aplayer

更多参数可参考https://aplayer.js.org/#/home?id=optionsaudio的属性

<!-- url 必填  -->
{% aplayer name="アイロニ" artist="鹿乃" url="https://qiniu.miiiku.xyz/public/music/鹿乃 - アイロニ.mp3" lrc="https://qiniu.miiiku.xyz/public/music/鹿乃 - アイロニ.lrc" cover="https://qiniu.miiiku.xyz/public/music/鹿乃 - アイロニ.jpg" %}

注意: 需要开启aplayer插件才能正常使用本内置标签

插入视频 dplayer

<!-- url 必填 cover(封面) 可选 subtitle(字幕) 可选 -->
{% dplayer url="https://qiniu.miiiku.xyz/video/%E7%BE%8E.mp4" cover="https://qiniu.miiiku.xyz/video/%E7%BE%8E.mp4?vframe/jpg/offset/10" %} 

注意: 需要开启dplayer插件才能正常使用本内置标签

插入瀑布流 waterfall

如需要修改大小 添加参数size="max"

{% waterfall size="max" %}
![imgname](imgsrc)
...
{% endwaterfall %}

更多参数可参考https://github.com/miiiku/waterfall#options 原参数的驼峰命名改为横线连接

🌰: 如设置布局为水平布局,每个元素的类名为item-image

{% waterfall direction=h item-class=item-image %}
![imgname](imgsrc)
...
{% endwaterfall %}

注意: 需要开启waterfall插件才能正常使用本内置标签

水平居中 center

使center标签内的内容水平居中

{% center %}
...
{% endcenter %}

插入书签 bookmark

<!-- link 地址(必填) title? 标题 cover? 封面 -->
{% bookmark title="我在这里" link="https://miiiku.xyz" cover="https://qiniu.miiiku.xyz/attach/2019/03/15529735091219953_175322076_H800.jpg" %}

插入图片 image

如需要修改大小 添加参数size="max"

<!-- src 地址(必填) title? 描述 size? 大小 -->
{% image src="https://qiniu.miiiku.xyz/attach/2019/03/15529735091219953_175322076_H800.jpg" title="hello world" size="max" %}

其他

favicon

替换掉主题文件下的source/favicon.ico

logo

logo:

高度不超过50,宽度不超过200为最佳

banner

banner:

宽图为最佳

统计

google_analytics: 

gauges_analytics: 

baidu_analytics: 

tencent_analytics: 

接入常用网站统计第三方

social icon 社交图标

添加常用到一些社交图标

header_enable 首页导航栏是否显示社交图标

footer_enable 底部导航栏是否显示社交图标

如需要修改图标显示顺序,只需要移动icons下的列表顺序即可

social_icon:
  header_enable: false
  footer_enable: false
  icons:
    - { type: email,      value: }
    - { type: github,     value: }
    - { type: google+,    value: }
    - { type: ins,        value: }
    - { type: twitter,    value: }
    - { type: youtube,    value: }
    - { type: weibo,      value: }
    - { type: cloudmusic, value: }
    - { type: zhihu,      value: }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].