mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-27 16:58:55 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de72a8c802 | |||
| f5b867d717 | |||
| 5ba4a8145b | |||
| 80e4d07294 | |||
| c2dc17e9e0 | |||
| b7edbf3e49 | |||
| adeecfb69d |
@@ -25,7 +25,7 @@
|
||||
> It is based on the original [LoveIt](https://github.com/dillonzq/LoveIt) Theme, [KeepIt](https://github.com/Fastbyte01/KeepIt) Theme and [LeaveIt](https://github.com/liuzc/LeaveIt) Theme.
|
||||
|
||||
[](https://github.com/hugo-fixit/FixIt/releases)
|
||||
[](https://gohugo.io/)
|
||||
[](https://gohugo.io/)
|
||||
[](/LICENSE)
|
||||
[](https://github.com/hugo-fixit/FixIt)
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
> 它的原型基于 [LoveIt](https://github.com/dillonzq/LoveIt) 主题,[KeepIt](https://github.com/Fastbyte01/KeepIt) 主题和 [LeaveIt](https://github.com/liuzc/LeaveIt) 主题。
|
||||
|
||||
[](https://github.com/hugo-fixit/FixIt/releases)
|
||||
[](https://gohugo.io/)
|
||||
[](https://gohugo.io/)
|
||||
[](/LICENSE)
|
||||
[](https://github.com/hugo-fixit/FixIt)
|
||||
|
||||
|
||||
+6
-1
@@ -686,7 +686,12 @@ class FixIt {
|
||||
if ($echarts.nextElementSibling.tagName === 'TEMPLATE') {
|
||||
const chart = echarts.init($echarts, this.isDark ? 'dark' : 'light', { renderer: 'svg' });
|
||||
stagingDOM.stage($echarts.nextElementSibling.content.cloneNode(true));
|
||||
chart.setOption(stagingDOM.contentAsJson());
|
||||
// support both JSON and JS object literal
|
||||
if ($echarts.nextElementSibling.dataset.fmt === 'js') {
|
||||
eval(`chart.setOption(${stagingDOM.contentAsText()})`);
|
||||
} else {
|
||||
chart.setOption(stagingDOM.contentAsJson());
|
||||
}
|
||||
this._echartsArr.push(chart);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -135,7 +135,7 @@ enableEmoji = true
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.141.0"
|
||||
min = "0.146.0"
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
# Markup related configuration in Hugo
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- .Scratch.Set "version" "v0.3.17" -}}
|
||||
{{- .Scratch.Set "version" "v0.3.19" -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
{{- /* Echarts support for code fences extended and shortcodes. */ -}}
|
||||
{{- $width := .Options.width | default "100%" -}}
|
||||
{{- $height := .Options.height | default "30rem" -}}
|
||||
{{- $js := .Options.js | default false -}}
|
||||
{{- $attrs := printf `style="width: %v; height: %v;"` $width $height -}}
|
||||
<div class="echarts" {{ $attrs | safeHTMLAttr }}></div>
|
||||
<template>{{ .Inner | transform.Unmarshal | jsonify }}</template>
|
||||
{{- /* EOF */ -}}
|
||||
{{- if $js -}}
|
||||
{{- $content := strings.TrimSpace .Inner -}}
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- $content = replaceRE `[\s]+` " " $content -}}
|
||||
{{- end -}}
|
||||
{{- if not ((hasPrefix $content "{") | and (hasSuffix $content "}")) -}}
|
||||
{{- errorf "ECharts format error\nPlease use JS object literal for Echarts, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#object_literals" -}}
|
||||
{{- end -}}
|
||||
<template data-fmt="js">{{ $content | safeJS }}</template>
|
||||
{{- else -}}
|
||||
<template>{{ .Inner | transform.Unmarshal | jsonify }}</template>
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{{- /*
|
||||
deprecated: image-legacy.html
|
||||
TODO delete this file in the next minor release
|
||||
*/ -}}
|
||||
{{- warnf "Deprecated image-legacy.html and will be removed in the next minor release, please use image.html instead." -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
{{- $class := .Class | default "" -}}
|
||||
{{- $style := "" -}}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{{- $options := .Get "width" | default (.Get 0) | dict "width" -}}
|
||||
{{- $options = .Get "height" | default (.Get 1) | dict "height" | merge $options -}}
|
||||
{{- $options = .Get "js" | default (.Get 2) | dict "js" | merge $options -}}
|
||||
{{- dict "Options" $options "Inner" .Inner | partial "plugin/echarts.html" -}}
|
||||
{{- .Page.Store.Set "hasEcharts" true -}}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fixit-core",
|
||||
"version": "0.3.17",
|
||||
"version": "0.3.19",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.5.2",
|
||||
"description": "Hugo FixIt core theme component source files",
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ licenselink = "https://github.com/hugo-fixit/FixIt/blob/main/LICENSE"
|
||||
description = "A Clean, Elegant but Advanced Hugo Theme for Hugo."
|
||||
homepage = "https://github.com/hugo-fixit/FixIt"
|
||||
demosite = "https://fixit.lruihao.cn"
|
||||
min_version = "0.141.0"
|
||||
min_version = "0.146.0"
|
||||
|
||||
tags = [
|
||||
"blog",
|
||||
|
||||
Reference in New Issue
Block a user