From 300bbe9a44cab8d3a88e2232c061a5feb9255f75 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Mon, 22 Apr 2024 11:23:25 +0800 Subject: [PATCH] :fire: Chore: remove data store in id partials function --- assets/js/theme.js | 1 - layouts/partials/function/id.html | 3 --- 2 files changed, 4 deletions(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index a3451c4d..81072a12 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -3,7 +3,6 @@ import Util from './util'; class FixIt { constructor() { this.config = window.config; - this.data = this.config.data || []; this.isDark = document.body.dataset.theme === 'dark'; this.util = new Util(); this.newScrollTop = this.util.getScrollTop(); diff --git a/layouts/partials/function/id.html b/layouts/partials/function/id.html index 73fac683..4ca6a0bc 100644 --- a/layouts/partials/function/id.html +++ b/layouts/partials/function/id.html @@ -8,7 +8,4 @@ {{- $id = printf "id-%d" $count -}} {{- $count | add 1 | $.Scratch.SetInMap "this" "count" -}} {{- end -}} -{{- with .Content -}} - {{- dict $id . | dict "data" | dict "config" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}} -{{- end -}} {{- return $id -}}