From 13c053817d801c5844e3feecd04d70f4c8124984 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sun, 24 Dec 2023 00:02:06 +0800 Subject: [PATCH] [opt] gallery 2.0 --- _config.yml | 6 ++ scripts/tags/lib/banner.js | 1 - scripts/tags/lib/gallery.js | 19 +++++- source/css/_layout/tag-plugins/banner.styl | 9 +-- source/css/_layout/tag-plugins/gallery.styl | 69 ++++++++++++++++++--- 5 files changed, 86 insertions(+), 18 deletions(-) diff --git a/_config.yml b/_config.yml index 9a016bb..d7c6e54 100755 --- a/_config.yml +++ b/_config.yml @@ -272,6 +272,12 @@ tag_plugins: unfinished: color: red label: 未完成 + # {% gallery %} + gallery: + layout: grid # grid / flow + size: mix # s / m / l / xl / mix + square: true # true / false + diff --git a/scripts/tags/lib/banner.js b/scripts/tags/lib/banner.js index 67868c0..57a0b13 100644 --- a/scripts/tags/lib/banner.js +++ b/scripts/tags/lib/banner.js @@ -10,7 +10,6 @@ 'use strict'; module.exports = ctx => function(args, content) { - const url_for = require('hexo-util').url_for.bind(ctx) args = ctx.args.map(args, ['bg', 'avatar', 'link'], ['title', 'subtitle']) var el = '' el += `