diff options
author | Christoph Cullmann <christoph@cullmann.io> | 2024-08-28 22:54:34 +0200 |
---|---|---|
committer | Christoph Cullmann <christoph@cullmann.io> | 2024-08-28 22:54:34 +0200 |
commit | 8f3d03b1888fed23e6aa07d6077045e673357481 (patch) | |
tree | a914b8f43b8486380ccc1c35721b28da2ff7986a /themes | |
parent | 8db6bd0e555dca050d7d885582100c5ca5ba3aa2 (diff) |
Diffstat (limited to 'themes')
53 files changed, 1747 insertions, 213 deletions
diff --git a/themes/blowfish/README.md b/themes/blowfish/README.md index 55f585f..ddb6e96 100644 --- a/themes/blowfish/README.md +++ b/themes/blowfish/README.md @@ -1,3 +1,4 @@ +English | [简体中文](https://github.com/nunocoracao/blowfish/blob/main/README.zh-cn.md) # Blowfish [![Deploy Production to Firebase](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml) [![Deploy Production to GitHub pages](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml) @@ -141,7 +142,7 @@ blowfish-tools new mynewsite 3. Start your server using `hugo server` and the theme will be downloaded automatically. -4. In the root folder of your website, delete the `config.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder. +4. In the root folder of your website, delete the `hugo.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder. > **Note:** Do not overwrite the `module.toml` file you created above! diff --git a/themes/blowfish/README.zh-cn.md b/themes/blowfish/README.zh-cn.md new file mode 100644 index 0000000..6e965df --- /dev/null +++ b/themes/blowfish/README.zh-cn.md @@ -0,0 +1,176 @@ +[English](https://github.com/nunocoracao/blowfish/blob/main/README.md) | 简体中文 +# Blowfish +[![Deploy Production to Firebase](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml) +[![Deploy Production to GitHub pages](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml) +[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.87.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.87.0) +[![GitHub](https://img.shields.io/github/license/nunocoracao/blowfish)](https://github.com/nunocoracao/blowfish/blob/main/LICENSE) +[![Blowfish](https://img.shields.io/badge/Hugo--Themes-@Blowfish-blue)](https://themes.gohugo.io/themes/blowfish/) +![code-size](https://img.shields.io/github/languages/code-size/nunocoracao/blowfish) + +Blowfish 是一个轻量有力的 Hugo 主题。它使用 Tailwind CSS 构建,洁净而富有极简主义,是你网站内容载体的不二之选。 + +![blowfish screenshot](https://github.com/nunocoracao/blowfish/blob/main/images/screenshot.png?raw=true) + + +🌏 [示例站点](https://blowfish.page/zh-cn/) +📑 [主题文档](https://blowfish.page/zh-cn/docs/) +💎 [周边商店](http://tee.pub/lic/qwSlWVBL5zc) +🐛 [Bug 问题报告](https://github.com/nunocoracao/blowfish/issues) +💡 [问答和功能需求](https://github.com/nunocoracao/blowfish/discussions) + + + +<a href="https://www.buymeacoffee.com/nunocoracao" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a> +<a target="_blank" href="http://tee.pub/lic/qwSlWVBL5zc"><img class="nozoom" src="https://img.buymeacoffee.com/button-api/?text=Merch Store &emoji=💎&slug=nunocoracao&button_colour=5F7FFF&font_colour=ffffff&font_family=Lato&outline_colour=000000&coffee_colour=FFDD00" /></a> + + + +## 特性 + +- 使用 Tailwind CSS 3.0 构建全面响应式布局 +- 多种配色方案,亦可完全由你定义 +- 夜间模式支持(手动开启/关闭或根据用户设备自动切换) +- 高度自主的配置方式 +- 集成 Firebase 以支持动态数据统计 +- 集成浏览次数统计和点赞机制 +- “相关文章”列表生成 +- 多种主页布局 +- 多作者模式支持 +- 可将文章整理成选集列表 +- 禅模式支持 +- 可灵活定义各种内容类型、分类标准和菜单 +- 页眉和页脚双重菜单可选 +- 支持嵌套菜单和子导航菜单 +- 支持多语言内容,包括 RTL 语言 +- 可链接到第三方网站上的帖子 +- 支持多种简码,如图库、时间轴、GitHub 卡片和图片灯箱 +- 支持 Buymeacoffee +- 拥有由 Fuse.js 支持的客户端一侧网站搜索功能 +- 植入了基于 Mermaid 的图表功能 +- 植入了基于 Chart.js 的图表功能 +- 集成逼真的自动打字效果 +- 集成性能优化的 Youtube 卡片简码 +- 集成 KaTeX 的公式 +- 集成 FontAwesome 6 的矢量图标引用 +- 使用 Hugo Pipes 自动调整图像大小 +- 拥有标题锚点、目录、代码复制、按钮、分类徽章等功能 +- 文章内部支持 HTML 和 Emoji 🎉 +- 便于搜索引擎优化,文章可一键分享到社交媒体 +- 支持 Fathom Analytics 和 Google Analytics +- 支持 RSS 订阅、网站图标和评论功能 +- 可使用简单的 Tailwind 对颜色和样式进行高级定制 +- 优化了性能和可访问性,拥有极高的 Lighthouse 评分 +- 文档齐全,定期更新 + +--- + +![blowfish logo](https://github.com/nunocoracao/blowfish/blob/main/logo.png?raw=true) + +## 文档 +Blowfish 有 [全面的文档](https://blowfish.page/zh-cn/docs/),覆盖主题的任何一个方面。 请确保 [阅读文档](https://blowfish.page/zh-cn/docs/) 以详细了解本主题有哪些功能。 + +--- + +## 安装 + +Blowfish 支持多种安装方式,既能作为 git 子模块、Hugo 模块,也可完全手动安装。 + +每种方法的详细说明都可以在 [安装](https://blowfish.page/zh-cn/docs/installation) 文档中找到。为了获得最简单的安装体验,请查阅文档。如果你使用的是 git,请阅读下面使用子模块的快速开始指南;如果你能安装 Hugo 主题,请阅读下面 Hugo 模块的快速开始指南。 + +### 使用 Blowfish Tools 快速开始 + +> **注:** 请确保你已安装 **Node.js**、 **Git**、 **Go** 和 **Hugo** ,且已经创建了一个 Hugo 工程。 + +我们最新推出了一个新的 CLI 工具,帮助你开始使用 Blowfish。它将为你创建一个新的 Hugo 项目、安装主题并设置主题配置文件。它仍处于测试阶段,因此请 [报告你发现的任何问题](https://github.com/nunocoracao/blowfish-tools)。 + +使用 npm(或其他软件包管理器)全局安装 CLI 工具: +```shell +npm i -g blowfish-tools +``` + +然后运行 "blowfish-tools "命令,开启一个交互式进程,引导你完成创建和配置。 +```shell +blowfish-tools +``` + +你也可以运行命令 `blowfish-tools new` 来创建一个新的 Hugo 项目,并一次性安装主题。更多信息请查看 CLI 帮助。 +```shell +blowfish-tools new mynewsite +``` + +### 使用 git 子模块快速开始 + +> **注:** 请确保你已安装 **Node.js**、 **Git**、 **Go** 和 **Hugo** ,且已经创建了一个 Hugo 工程。 + +1. 从你工程的所在目录初始化 git 仓库 + + ```shell + git init + ``` + +2. 配置 Blowfish 作为 git 子模块 + + ```shell + git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish + ``` + +3. 在你网站的根目录中删除由 Hugo 自动生成的 `config.toml`文件,并把主题文件夹中的`*.toml`配置文件复制到你的 `config/_default/`文件夹中 + + 你可在 Hugo 缓存目录中找到主题配置文件,或者也可以从[这里](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default)下载一份。 + +4. 按照[入门指南](https://blowfish.page/zh-cn/docs/getting-started/)来配置你的网站 + +### 使用 Hugo 快速开始 + +> **注:** 确保你已经安装了 **Go** 和 **Hugo**,且已创建了一个 Hugo 工程。 + +1. 从你工程的所在目录初始化 Hugo 模块 + + ```shell + hugo mod init github.com/<用户名>/<仓库名> + ``` + +2. 新建 `config/_default/module.toml` 并写入以下内容: + + ```toml + [[imports]] + path = "github.com/nunocoracao/blowfish/v2" + ``` + +3. 运行 `hugo server` 启动你的本地服务器,本主题就会自动下载。 + +4. 在你网站的根目录中删除由 Hugo 自动生成的 `config.toml`文件,并把主题文件夹中的`*.toml`配置文件复制到你的 `config/_default/`文件夹中 + + > **注** 不要覆盖之前的 `module.toml` ! + + 你可在 Hugo 缓存目录中找到主题配置文件,或者也可以从[这里](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default)下载一份。 + +5. 按照[入门指南](https://blowfish.page/zh-cn/docs/getting-started/)来配置你的网站 + +### Installing theme updates + +当新的主题版本发布,你可以在你网站的根目录使用 Hugo 命令`hugo mod get -u`来简单地把主题更新到最新版本。 + +详细的[更新指南](https://blowfish.page/zh-cn/docs/installation/#%E6%9B%B4%E6%96%B0%E4%B8%BB%E9%A2%98)在文档中。 + +--- + +## 贡献 + +Blowfish 将会持续进化。我打算不断增加功能,并按需进行修改。 + +如有任何问题或对新功能的建议,请随时联系我。 + +- 🐛 **Bug 问题报告** 使用 [GitHub Issues](https://github.com/nunocoracao/blowfish/issues) +- 💡 **发表关于新功能的想法:** 在 [GitHub Discussions](https://github.com/nunocoracao/blowfish/discussions) 发起讨论 +- 🙋♀️ **一般问题:** 查看 [GitHub Discussions](https://github.com/nunocoracao/blowfish/discussions) + +如果你有能力修补 Bug 或者实现新功能,欢迎提交 PR。[了解更多](https://github.com/nunocoracao/blowfish/blob/main/CONTRIBUTING.md). + +--- + +## Star 数量统计 + +[![Stargazers over time](https://starchart.cc/nunocoracao/blowfish.svg)](https://starchart.cc/nunocoracao/blowfish) + +<a rel="me" href="https://masto.ai/@blowfish">Mastodon</a> diff --git a/themes/blowfish/assets/css/compiled/main.css b/themes/blowfish/assets/css/compiled/main.css index 3936000..d82a51b 100644 --- a/themes/blowfish/assets/css/compiled/main.css +++ b/themes/blowfish/assets/css/compiled/main.css @@ -14,7 +14,7 @@ body.zen-mode-enable { } } -/*! tailwindcss v3.4.6 | MIT License | https://tailwindcss.com */ +/*! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com */ /* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) @@ -1121,7 +1121,6 @@ select { .prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) { width:100%; table-layout:auto; - text-align:start; margin-top:2em; margin-bottom:2em; font-size:0.875em; @@ -1164,6 +1163,10 @@ select { vertical-align:top } +.prose :where(th, td):not(:where([class~="not-prose"],[class~="not-prose"] *)) { + text-align:start +} + .prose :where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) { margin-top:0; margin-bottom:0 @@ -3163,6 +3166,13 @@ body button { width:1em } +/* Scale SVG logos to appropriate size */ + +.logo svg { + height:5rem; + width:5rem +} + /* Search */ #search-query::-webkit-search-cancel-button, @@ -3346,6 +3356,14 @@ code { /* Renamed property in CSS3 draft spec */ } +/* Fix long URLs breaking out of article bounds on mobile */ + +a { + word-break: break-word; + word-wrap: break-word; + overflow-wrap: break-word; +} + /* -- Chroma Highlight -- */ /* Background */ @@ -5339,6 +5357,10 @@ pre { left:0px } + .lg\:top-10 { + top:2.5rem + } + .lg\:top-\[140px\] { top:140px } diff --git a/themes/blowfish/assets/css/main.css b/themes/blowfish/assets/css/main.css index 7f46d01..6db6960 100644 --- a/themes/blowfish/assets/css/main.css +++ b/themes/blowfish/assets/css/main.css @@ -16,6 +16,11 @@ body button { @apply h-[1em] w-[1em]; } +/* Scale SVG logos to appropriate size */ +.logo svg { + @apply h-[5rem] w-[5rem]; +} + /* Search */ #search-query::-webkit-search-cancel-button, #search-query::-webkit-search-decoration, @@ -128,6 +133,13 @@ code { overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */ } +/* Fix long URLs breaking out of article bounds on mobile */ +a { + word-break: break-word; + word-wrap: break-word; + overflow-wrap: break-word; +} + /* -- Chroma Highlight -- */ /* Background */ .prose .chroma { diff --git a/themes/blowfish/assets/icons/forgejo.svg b/themes/blowfish/assets/icons/forgejo.svg new file mode 100644 index 0000000..495ac8b --- /dev/null +++ b/themes/blowfish/assets/icons/forgejo.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 212 212" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor"><g style="opacity:.7"><path stroke-width="25" d="M64 174V76a50 50 0 0 1 50-50h20"/><circle stroke-width="15" cx="148" cy="26" r="18"/></g><path stroke-width="25" d="M64 174v-30a50 50 0 0 1 50-50h20"/><circle stroke-width="15" cx="148" cy="94" r="18"/><circle stroke-width="15" cx="64" cy="186" r="18"/></g></svg>
\ No newline at end of file diff --git a/themes/blowfish/assets/icons/gitea.svg b/themes/blowfish/assets/icons/gitea.svg new file mode 100644 index 0000000..7985d93 --- /dev/null +++ b/themes/blowfish/assets/icons/gitea.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="5.67 143.05 628.65 387.55"><path fill="currentColor" d="M115.912 143.075c-6.462 0-13.762.525-22.012 2.325-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.267.3-26.433.597-39.5.697l.1 117.002s57.4 24.202 83.1 40.102c3.7 2.3 10.2 6.798 12.9 14.398 2.1 6.1 2 13.101-1 19.301l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12l-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8a5290.322 5290.322 0 0 0 27 12.954c0-36.449-.1-109.053-.1-109.053-29 .4-89.2-2.201-89.2-2.201s-141.4-7.1-156.8-8.5c-4.9-.3-10.525-.825-16.988-.825zm12.188 48.026s7.1 59.399 15.7 94.199c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1z"/><path fill="currentColor" d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8-1.9 8 2 16.3 9.1 20 7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3 7.8 4 17.4 1.7 22.5-5.3 5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8l-24.6 50.4z"/></svg>
\ No newline at end of file diff --git a/themes/blowfish/assets/js/search.js b/themes/blowfish/assets/js/search.js index c3e7adb..bfa1a32 100644 --- a/themes/blowfish/assets/js/search.js +++ b/themes/blowfish/assets/js/search.js @@ -73,8 +73,6 @@ document.addEventListener("keydown", function (event) { } else { document.activeElement.click(); } - }else{ - event.preventDefault(); } } diff --git a/themes/blowfish/assets/lib/lite-youtube-embed/lite-yt-embed.js b/themes/blowfish/assets/lib/lite-youtube-embed/lite-yt-embed.js index 49db80e..591954b 100644 --- a/themes/blowfish/assets/lib/lite-youtube-embed/lite-yt-embed.js +++ b/themes/blowfish/assets/lib/lite-youtube-embed/lite-yt-embed.js @@ -46,10 +46,23 @@ class LiteYTEmbed extends HTMLElement { this.addNoscriptIframe(); - playBtnEl.removeAttribute('href'); + // for the PE pattern, change anchor's semantics to button + if(playBtnEl.nodeName === 'A'){ + playBtnEl.removeAttribute('href'); + playBtnEl.setAttribute('tabindex', '0'); + playBtnEl.setAttribute('role', 'button'); + // fake button needs keyboard help + playBtnEl.addEventListener('keydown', e => { + if( e.key === 'Enter' || e.key === ' ' ){ + e.preventDefault(); + this.activate(); + } + }); + } // On hover (or tap), warm up the TCP connections we're (likely) about to use. this.addEventListener('pointerover', LiteYTEmbed.warmConnections, {once: true}); + this.addEventListener('focusin', LiteYTEmbed.warmConnections, {once: true}); // Once the user clicks, add the real iframe and drop our play button // TODO: In the future we could be like amp-youtube and silently swap in the iframe during idle time diff --git a/themes/blowfish/assets/lib/typeit/typeit.umd.js b/themes/blowfish/assets/lib/typeit/typeit.umd.js index afd060f..453d618 100644 --- a/themes/blowfish/assets/lib/typeit/typeit.umd.js +++ b/themes/blowfish/assets/lib/typeit/typeit.umd.js @@ -1,2 +1,2 @@ // TypeIt by Alex MacArthur - https://typeitjs.com -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TypeIt=t()}(this,(function(){"use strict";const e=e=>Array.isArray(e),t=t=>e(t)?t:[t];const s="data-typeit-id",i="ti-cursor",r={started:!1,completed:!1,frozen:!1,destroyed:!1},n={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map((e=>({opacity:e}))),options:{iterations:1/0,easing:"steps(2, start)",fill:"forwards"}}},cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},o=`[${s}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,a=e=>document.createElement(e),u=e=>document.createTextNode(e),l=(e,t="")=>{let s=a("style");s.id=t,s.appendChild(u(e)),document.head.appendChild(s)},h=t=>(e(t)||(t=[t/2,t/2]),t),d=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t));let p=e=>e/2;const c=e=>Array.from(e);let m=e=>([...e.childNodes].forEach((e=>{if(e.nodeValue)return[...e.nodeValue].forEach((t=>{e.parentNode.insertBefore(u(t),e)})),void e.remove();m(e)})),e);const f=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,m(t.body)};function y(e,t=!1,s=!1){let r,n=e.querySelector(`.${i}`),o=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(n&&s){if(e.classList?.contains(i))return NodeFilter.FILTER_ACCEPT;if(n.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=[];for(;r=o.nextNode();)r.originalParent||(r.originalParent=r.parentNode),a.push(r);return t?a.reverse():a}function g(e,t=!0){return t?y(f(e)):c(e).map(u)}const b=e=>Number.isInteger(e),P=({queueItems:e,selector:t,cursorPosition:s,to:i})=>{if(b(t))return-1*t;let r=new RegExp("END","i").test(i),n=t?[...e].reverse().findIndex((({char:e})=>{let s=e.parentElement,i=s.matches(t);return!(!r||!i)||i&&s.firstChild.isSameNode(e)})):-1;return n<0&&(n=r?0:e.length-1),n-s+(r?0:1)},C=(e,t)=>new Array(t).fill(e);let v=e=>new Promise((t=>{requestAnimationFrame((async()=>{t(await e())}))})),T=e=>e?.getAnimations().find((t=>t.id===e.dataset.tiAnimationId)),w=({cursor:e,frames:t,options:s})=>{let i=e.animate(t,s);return i.pause(),i.id=e.dataset.tiAnimationId,v((()=>{v((()=>{i.play()}))})),i},I=e=>e.func?.call(null),q=async({index:e,queueItems:t,wait:s,cursor:i,cursorOptions:r})=>{let n=t[e][1],o=[],a=e,u=n,l=()=>u&&!u.delay,h=n.shouldPauseCursor()&&r.autoPause;for(;l();)o.push(u),l()&&a++,u=t[a]?t[a][1]:null;if(o.length)return await v((async()=>{for(let e of o)await I(e)})),a-1;let d,p=T(i);return p&&(d={...p.effect.getComputedTiming(),delay:h?r.autoPauseDelay:0}),await s((async()=>{p&&h&&p.cancel(),await v((()=>{I(n)}))}),n.delay),await(({cursor:e,options:t,cursorOptions:s})=>{if(!e||!s)return;let i,r=T(e);r&&(t.delay=r.effect.getComputedTiming().delay,i=r.currentTime,r.cancel());let n=w({cursor:e,frames:s.animation.frames,options:t});return i&&(n.currentTime=i),n})({cursor:i,options:d,cursorOptions:r}),e};const S=e=>"value"in e;let N=e=>"function"==typeof e?e():e,A=(e,t=document,s=!1)=>t["querySelector"+(s?"All":"")](e);const E=(e,t)=>Object.assign({},e,t);let L={"font-family":"","font-weight":"","font-size":"","font-style":"","line-height":"",color:"",transform:"translateX(-.125em)"};return class{element;timeouts;cursorPosition;predictedCursorPosition;statuses={started:!1,completed:!1,frozen:!1,destroyed:!1};opts;id;queue;cursor;unfreeze=()=>{};constructor(e,s={}){var i;this.opts=E(n,s),this.element="string"==typeof(i=e)?A(i):i,this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=E({},r),this.id=Math.random().toString().substring(2,9),this.queue=function(e){let s=function(e){return t(e).forEach((e=>n.set(Symbol(e.char?.innerText),i({...e})))),this},i=e=>(e.shouldPauseCursor=function(){return Boolean(this.typeable||this.cursorable||this.deletable)},e),r=()=>Array.from(n.values()),n=new Map;return s(e),{add:s,set:function(e,t){let s=[...n.keys()];n.set(s[e],i(t))},wipe:function(){n=new Map,s(e)},done:(e,t=!1)=>t?n.delete(e):n.get(e).done=!0,reset:function(){n.forEach((e=>delete e.done))},destroy:e=>n.delete(e),getItems:(e=!1)=>e?r():r().filter((e=>!e.done)),getQueue:()=>n,getTypeable:()=>r().filter((e=>e.typeable))}}([{delay:this.opts.startDelay}]),this.#e(s),this.cursor=this.#t(),this.element.dataset.typeitId=this.id,l(o),this.opts.strings.length&&this.#s()}go(){return this.statuses.started?this:(this.#i(),this.opts.waitUntilVisible?(e=this.element,t=this.#r.bind(this),new IntersectionObserver(((s,i)=>{s.forEach((s=>{s.isIntersecting&&(t(),i.unobserve(e))}))}),{threshold:1}).observe(e),this):(this.#r(),this));var e,t}destroy(e=!0){this.timeouts=(this.timeouts.forEach(clearTimeout),[]),N(e)&&this.cursor&&this.#n(this.cursor),this.statuses.destroyed=!0}reset(e){!this.is("destroyed")&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let t in this.statuses)this.statuses[t]=!1;return this.element[this.#o()?"value":"innerHTML"]="",this}is=function(e){return this.statuses[e]};type(e,t={}){e=N(e);let{instant:s}=t,i=this.#a(t),r=g(e,this.opts.html).map((e=>{return{func:()=>this.#u(e),char:e,delay:s||(t=e,/<(.+)>(.*?)<\/(.+)>/.test(t.outerHTML))?0:this.#l(),typeable:e.nodeType===Node.TEXT_NODE};var t})),n=[i[0],{func:async()=>await this.opts.beforeString(e,this)},...r,{func:async()=>await this.opts.afterString(e,this)},i[1]];return this.#h(n,t)}break(e={}){return this.#h({func:()=>this.#u(a("BR")),typeable:!0},e)}move(e,t={}){e=N(e);let s=this.#a(t),{instant:i,to:r}=t,n=P({queueItems:this.queue.getTypeable(),selector:null===e?"":e,to:r,cursorPosition:this.#d}),o=n<0?-1:1;return this.predictedCursorPosition=this.#d+n,this.#h([s[0],...C({func:()=>this.#p(o),delay:i?0:this.#l(),cursorable:!0},Math.abs(n)),s[1]],t)}exec(e,t={}){let s=this.#a(t);return this.#h([s[0],{func:()=>e(this)},s[1]],t)}options(e,t={}){return e=N(e),this.#c(e),this.#h({},t)}pause(e,t={}){return this.#h({delay:N(e)},t)}delete(e=null,t={}){e=N(e);let s=this.#a(t),i=e,{instant:r,to:n}=t,o=this.queue.getTypeable(),a=(()=>null===i?o.length:b(i)?i:P({queueItems:o,selector:i,cursorPosition:this.#d,to:n}))();return this.#h([s[0],...C({func:this.#m.bind(this),delay:r?0:this.#l(1),deletable:!0},a),s[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=(()=>{})){return this.#i(),this.#r(!1).then(e),this}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return this.#c(e)}getElement(){return this.element}empty(e={}){return this.#h({func:this.#f.bind(this)},e)}async#f(){this.#o()?this.element.value="":this.#y.forEach(this.#n.bind(this))}async#r(e=!0){this.statuses.started=!0;let t=t=>{this.queue.done(t,!e)};try{let s=[...this.queue.getQueue()];for(let e=0;e<s.length;e++){let[i,r]=s[e];if(!r.done){if(!r.deletable||r.deletable&&this.#y.length){let i=await this.#g(e,s);Array(i-e).fill(e+1).map(((e,t)=>e+t)).forEach((e=>{let[i]=s[e];t(i)})),e=i}t(i)}}if(!e)return this;if(this.statuses.completed=!0,await this.opts.afterComplete(this),!this.opts.loop)throw"";let i=this.opts.loopDelay;this.#b((async()=>{await this.#P(i[0]),this.#r()}),i[1])}catch(s){}return this}async#p(e){var t,s,r;this.cursorPosition=(t=e,s=this.cursorPosition,r=this.#y,Math.min(Math.max(s+t,0),r.length)),((e,t,s)=>{let r=t[s-1],n=A(`.${i}`,e);(e=r?.parentNode||e).insertBefore(n,r||null)})(this.element,this.#y,this.cursorPosition)}async#P(e){let t=this.#d;t&&await this.#p({value:t});let s=this.#y.map((e=>[Symbol(),{func:this.#m.bind(this),delay:this.#l(1),deletable:!0,shouldPauseCursor:()=>!0}]));for(let i=0;i<s.length;i++)await this.#g(i,s);this.queue.reset(),this.queue.set(0,{delay:e})}#g(e,t){return q({index:e,queueItems:t,wait:this.#b.bind(this),cursor:this.cursor,cursorOptions:this.opts.cursor})}async#b(e,t,s=!1){this.statuses.frozen&&await new Promise((e=>{this.unfreeze=()=>{this.statuses.frozen=!1,e()}})),s||await this.opts.beforeStep(this),await((e,t,s)=>new Promise((i=>{s.push(setTimeout((async()=>{await e(),i()}),t||0))})))(e,t,this.timeouts),s||await this.opts.afterStep(this)}async#i(){if(!this.#o()&&this.cursor&&this.element.appendChild(this.cursor),this.#C){((e,t)=>{let r=`[${s}='${e}'] .${i}`,n=getComputedStyle(t),o=Object.entries(L).reduce(((e,[t,s])=>`${e} ${t}: var(--ti-cursor-${t}, ${s||n[t]});`),"");l(`${r} { display: inline-block; width: 0; ${o} }`,e)})(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:r}=e;w({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...r}})}}#o(){return S(this.element)}#h(e,t){return this.queue.add(e),this.#v(t),this}#v(e={}){let t=e.delay;t&&this.queue.add({delay:t})}#a(e={}){return[{func:()=>this.#c(e)},{func:()=>this.#c(this.opts)}]}async#c(e){this.opts=E(this.opts,e)}#s(){let e=this.opts.strings.filter((e=>!!e));e.forEach(((t,s)=>{if(this.type(t),s+1===e.length)return;let i=this.opts.breakLines?[{func:()=>this.#u(a("BR")),typeable:!0}]:C({func:this.#m.bind(this),delay:this.#l(1)},this.queue.getTypeable().length);this.#T(i)}))}#e=e=>{e.cursor=(e=>{if("object"==typeof e){let t={},{frames:s,options:i}=n.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||s,t.animation.options=E(i,e.animation?.options||{}),t.autoPause=e.autoPause??n.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||n.cursor.autoPauseDelay,t}return!0===e?n.cursor:e})(e.cursor??n.cursor),this.opts.strings=this.#w(t(this.opts.strings)),this.opts=E(this.opts,{html:!this.#I&&this.opts.html,nextStringDelay:h(this.opts.nextStringDelay),loopDelay:h(this.opts.loopDelay)})};#w(e){let t=this.element.innerHTML;return t?(this.element.innerHTML="",this.opts.startDelete?(this.element.innerHTML=t,m(this.element),this.#T(C({func:this.#m.bind(this),delay:this.#l(1),deletable:!0},this.#y.length)),e):(s=t,s.replace(/<!--(.+?)-->/g,"").trim().split(/<br(?:\s*?)(?:\/)?>/)).concat(e)):e;var s}#t(){if(this.#I)return null;let e=a("span");return e.className=i,this.#C?(e.innerHTML=f(this.opts.cursorChar).innerHTML,e):(e.style.visibility="hidden",e)}#T(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])}#u(e){((e,t)=>{if(S(e))return void(e.value=`${e.value}${t.textContent}`);t.innerHTML="";let s=(r=t.originalParent,/body/i.test(r?.tagName)?e:t.originalParent||e);var r;s.insertBefore(t,A("."+i,s)||null)})(this.element,e)}#m(){this.#y.length&&(this.#I?this.element.value=this.element.value.slice(0,-1):this.#n(this.#y[this.cursorPosition]))}#n(e){((e,t)=>{if(!e)return;let s=e.parentNode;(s.childNodes.length>1||s.isSameNode(t)?e:s).remove()})(e,this.element)}#l(e=0){return function(e){let{speed:t,deleteSpeed:s,lifeLike:i}=e;return s=null!==s?s:t/3,i?[d(t,p(t)),d(s,p(s))]:[t,s]}(this.opts)[e]}get#d(){return this.predictedCursorPosition??this.cursorPosition}get#I(){return S(this.element)}get#C(){return!!this.opts.cursor&&!this.#I}get#y(){return e=this.element,S(e)?c(e.value):y(e,!0).filter((e=>!(e.childNodes.length>0)));var e}}})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TypeIt=t()}(this,(function(){"use strict";const e=e=>Array.isArray(e),t=t=>e(t)?t:[t];const s="data-typeit-id",i="ti-cursor",r={started:!1,completed:!1,frozen:!1,destroyed:!1},n={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map((e=>({opacity:e}))),options:{iterations:1/0,easing:"steps(2, start)",fill:"forwards"}}},cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},o=`[${s}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,a=e=>document.createElement(e),u=e=>document.createTextNode(e),l=(e,t="")=>{let s=a("style");s.id=t,s.appendChild(u(e)),document.head.appendChild(s)},h=t=>(e(t)||(t=[t/2,t/2]),t),d=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t));let p=e=>e/2;const c=e=>Array.from(e);let m=e=>([...e.childNodes].forEach((e=>{if(e.nodeValue)return[...e.nodeValue].forEach((t=>{e.parentNode.insertBefore(u(t),e)})),void e.remove();m(e)})),e);const f=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,m(t.body)};function y(e,t=!1,s=!1){let r,n=e.querySelector(`.${i}`),o=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(n&&s){if(e.classList?.contains(i))return NodeFilter.FILTER_ACCEPT;if(n.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=[];for(;r=o.nextNode();)r.originalParent||(r.originalParent=r.parentNode),a.push(r);return t?a.reverse():a}function g(e,t=!0){return t?y(f(e)):c(e).map(u)}const b=({index:e,newIndex:t,queueItems:s,cleanUp:i})=>{for(let r=e+1;r<t+1;r++)i(s[r][0])},P=e=>Number.isInteger(e),C=({queueItems:e,selector:t,cursorPosition:s,to:i})=>{if(P(t))return-1*t;let r=new RegExp("END","i").test(i),n=t?[...e].reverse().findIndex((({char:e})=>{let s=e.parentElement,i=s.matches(t);return!(!r||!i)||i&&s.firstChild.isSameNode(e)})):-1;return n<0&&(n=r?0:e.length-1),n-s+(r?0:1)},I=(e,t)=>new Array(t).fill(e);let v=e=>new Promise((t=>{requestAnimationFrame((async()=>{t(await e())}))})),w=e=>e?.getAnimations().find((t=>t.id===e.dataset.tiAnimationId)),T=({cursor:e,frames:t,options:s})=>{let i=e.animate(t,s);return i.pause(),i.id=e.dataset.tiAnimationId,v((()=>{v((()=>{i.play()}))})),i},q=e=>e.func?.call(null),S=async({index:e,queueItems:t,wait:s,cursor:i,cursorOptions:r})=>{let n=t[e][1],o=[],a=e,u=n,l=()=>u&&!u.delay,h=n.shouldPauseCursor()&&r.autoPause;for(;l();)o.push(u),l()&&a++,u=t[a]?t[a][1]:null;if(o.length)return await v((async()=>{for(let e of o)await q(e)})),a-1;let d,p=w(i);return p&&(d={...p.effect.getComputedTiming(),delay:h?r.autoPauseDelay:0}),await s((async()=>{p&&h&&p.cancel(),await v((()=>{q(n)}))}),n.delay),await(({cursor:e,options:t,cursorOptions:s})=>{if(!e||!s)return;let i,r=w(e);r&&(t.delay=r.effect.getComputedTiming().delay,i=r.currentTime,r.cancel());let n=T({cursor:e,frames:s.animation.frames,options:t});return i&&(n.currentTime=i),n})({cursor:i,options:d,cursorOptions:r}),e};const N=e=>"value"in e;let A=e=>"function"==typeof e?e():e,E=(e,t=document,s=!1)=>t["querySelector"+(s?"All":"")](e);const L=(e,t)=>Object.assign({},e,t);let x={"font-family":"","font-weight":"","font-size":"","font-style":"","line-height":"",color:"",transform:"translateX(-.125em)"};return class{element;timeouts;cursorPosition;predictedCursorPosition;statuses={started:!1,completed:!1,frozen:!1,destroyed:!1};opts;id;queue;cursor;unfreeze=()=>{};constructor(e,s={}){var i;this.opts=L(n,s),this.element="string"==typeof(i=e)?E(i):i,this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=L({},r),this.id=Math.random().toString().substring(2,9),this.queue=function(e){let s=function(e){return t(e).forEach((e=>n.set(Symbol(e.char?.innerText),i({...e})))),this},i=e=>(e.shouldPauseCursor=function(){return Boolean(this.typeable||this.cursorable||this.deletable)},e),r=()=>Array.from(n.values()),n=new Map;return s(e),{add:s,set:function(e,t){let s=[...n.keys()];n.set(s[e],i(t))},wipe:function(){n=new Map,s(e)},done:(e,t=!1)=>t?n.delete(e):n.get(e).done=!0,reset:function(){n.forEach((e=>delete e.done))},destroy:e=>n.delete(e),getItems:(e=!1)=>e?r():r().filter((e=>!e.done)),getQueue:()=>n,getTypeable:()=>r().filter((e=>e.typeable))}}([{delay:this.opts.startDelay}]),this.#e(s),this.cursor=this.#t(),this.element.dataset.typeitId=this.id,l(o),this.opts.strings.length&&this.#s()}go(){return this.statuses.started?this:(this.#i(),this.opts.waitUntilVisible?(e=this.element,t=this.#r.bind(this),new IntersectionObserver(((s,i)=>{s.forEach((s=>{s.isIntersecting&&(t(),i.unobserve(e))}))}),{threshold:1}).observe(e),this):(this.#r(),this));var e,t}destroy(e=!0){this.timeouts=(this.timeouts.forEach(clearTimeout),[]),A(e)&&this.cursor&&this.#n(this.cursor),this.statuses.destroyed=!0}reset(e){!this.is("destroyed")&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let t in this.statuses)this.statuses[t]=!1;return this.element[this.#o()?"value":"innerHTML"]="",this}is=function(e){return this.statuses[e]};type(e,t={}){e=A(e);let{instant:s}=t,i=this.#a(t),r=g(e,this.opts.html).map((e=>{return{func:()=>this.#u(e),char:e,delay:s||(t=e,/<(.+)>(.*?)<\/(.+)>/.test(t.outerHTML))?0:this.#l(),typeable:e.nodeType===Node.TEXT_NODE};var t})),n=[i[0],{func:async()=>await this.opts.beforeString(e,this)},...r,{func:async()=>await this.opts.afterString(e,this)},i[1]];return this.#h(n,t)}break(e={}){return this.#h({func:()=>this.#u(a("BR")),typeable:!0},e)}move(e,t={}){e=A(e);let s=this.#a(t),{instant:i,to:r}=t,n=C({queueItems:this.queue.getTypeable(),selector:null===e?"":e,to:r,cursorPosition:this.#d}),o=n<0?-1:1;return this.predictedCursorPosition=this.#d+n,this.#h([s[0],...I({func:()=>this.#p(o),delay:i?0:this.#l(),cursorable:!0},Math.abs(n)),s[1]],t)}exec(e,t={}){let s=this.#a(t);return this.#h([s[0],{func:()=>e(this)},s[1]],t)}options(e,t={}){return e=A(e),this.#c(e),this.#h({},t)}pause(e,t={}){return this.#h({delay:A(e)},t)}delete(e=null,t={}){e=A(e);let s=this.#a(t),i=e,{instant:r,to:n}=t,o=this.queue.getTypeable(),a=(()=>null===i?o.length:P(i)?i:C({queueItems:o,selector:i,cursorPosition:this.#d,to:n}))();return this.#h([s[0],...I({func:this.#m.bind(this),delay:r?0:this.#l(1),deletable:!0},a),s[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=()=>{}){return this.#i(),this.#r(!1).then(e),this}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return this.#c(e)}getElement(){return this.element}empty(e={}){return this.#h({func:this.#f.bind(this)},e)}async#f(){this.#o()?this.element.value="":this.#y.forEach(this.#n.bind(this))}async#r(e=!0){this.statuses.started=!0;let t=t=>{this.queue.done(t,!e)};try{let s=[...this.queue.getQueue()];for(let e=0;e<s.length;e++){let[i,r]=s[e];if(!r.done){if(!r.deletable||r.deletable&&this.#y.length){let i=await this.#g(e,s);b({index:e,newIndex:i,queueItems:s,cleanUp:t}),e=i}t(i)}}if(!e)return this;if(this.statuses.completed=!0,await this.opts.afterComplete(this),!this.opts.loop)throw"";let i=this.opts.loopDelay;this.#b((async()=>{await this.#P(i[0]),this.#r()}),i[1])}catch(s){}return this}async#p(e){var t,s,r;this.cursorPosition=(t=e,s=this.cursorPosition,r=this.#y,Math.min(Math.max(s+t,0),r.length)),((e,t,s)=>{let r=t[s-1],n=E(`.${i}`,e);(e=r?.parentNode||e).insertBefore(n,r||null)})(this.element,this.#y,this.cursorPosition)}async#P(e){let t=this.#d;t&&await this.#p({value:t});let s=this.#y.map((e=>[Symbol(),{func:this.#m.bind(this),delay:this.#l(1),deletable:!0,shouldPauseCursor:()=>!0}]));for(let i=0;i<s.length;i++)await this.#g(i,s);this.queue.reset(),this.queue.set(0,{delay:e})}#g(e,t){return S({index:e,queueItems:t,wait:this.#b.bind(this),cursor:this.cursor,cursorOptions:this.opts.cursor})}async#b(e,t,s=!1){this.statuses.frozen&&await new Promise((e=>{this.unfreeze=()=>{this.statuses.frozen=!1,e()}})),s||await this.opts.beforeStep(this),await((e,t,s)=>new Promise((i=>{s.push(setTimeout((async()=>{await e(),i()}),t||0))})))(e,t,this.timeouts),s||await this.opts.afterStep(this)}async#i(){if(!this.#o()&&this.cursor&&this.element.appendChild(this.cursor),this.#C){((e,t)=>{let r=`[${s}='${e}'] .${i}`,n=getComputedStyle(t),o=Object.entries(x).reduce(((e,[t,s])=>`${e} ${t}: var(--ti-cursor-${t}, ${s||n[t]});`),"");l(`${r} { display: inline-block; width: 0; ${o} }`,e)})(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:r}=e;T({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...r}})}}#o(){return N(this.element)}#h(e,t){return this.queue.add(e),this.#I(t),this}#I(e={}){let t=e.delay;t&&this.queue.add({delay:t})}#a(e={}){return[{func:()=>this.#c(e)},{func:()=>this.#c(this.opts)}]}async#c(e){this.opts=L(this.opts,e)}#s(){let e=this.opts.strings.filter((e=>!!e));e.forEach(((t,s)=>{if(this.type(t),s+1===e.length)return;let i=this.opts.breakLines?[{func:()=>this.#u(a("BR")),typeable:!0}]:I({func:this.#m.bind(this),delay:this.#l(1)},this.queue.getTypeable().length);this.#v(i)}))}#e=e=>{e.cursor=(e=>{if("object"==typeof e){let t={},{frames:s,options:i}=n.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||s,t.animation.options=L(i,e.animation?.options||{}),t.autoPause=e.autoPause??n.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||n.cursor.autoPauseDelay,t}return!0===e?n.cursor:e})(e.cursor??n.cursor),this.opts.strings=this.#w(t(this.opts.strings)),this.opts=L(this.opts,{html:!this.#T&&this.opts.html,nextStringDelay:h(this.opts.nextStringDelay),loopDelay:h(this.opts.loopDelay)})};#w(e){let t=this.element.innerHTML;return t?(this.element.innerHTML="",this.opts.startDelete?(this.element.innerHTML=t,m(this.element),this.#v(I({func:this.#m.bind(this),delay:this.#l(1),deletable:!0},this.#y.length)),e):(s=t,s.replace(/<!--(.+?)-->/g,"").trim().split(/<br(?:\s*?)(?:\/)?>/)).concat(e)):e;var s}#t(){if(this.#T)return null;let e=a("span");return e.className=i,this.#C?(e.innerHTML=f(this.opts.cursorChar).innerHTML,e):(e.style.visibility="hidden",e)}#v(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])}#u(e){((e,t)=>{if(N(e))return void(e.value=`${e.value}${t.textContent}`);t.innerHTML="";let s=(r=t.originalParent,/body/i.test(r?.tagName)?e:t.originalParent||e);var r;s.insertBefore(t,E("."+i,s)||null)})(this.element,e)}#m(){this.#y.length&&(this.#T?this.element.value=this.element.value.slice(0,-1):this.#n(this.#y[this.cursorPosition]))}#n(e){((e,t)=>{if(!e)return;let s=e.parentNode;(s.childNodes.length>1||s.isSameNode(t)?e:s).remove()})(e,this.element)}#l(e=0){return function(e){let{speed:t,deleteSpeed:s,lifeLike:i}=e;return s=null!==s?s:t/3,i?[d(t,p(t)),d(s,p(s))]:[t,s]}(this.opts)[e]}get#d(){return this.predictedCursorPosition??this.cursorPosition}get#T(){return N(this.element)}get#C(){return!!this.opts.cursor&&!this.#T}get#y(){return e=this.element,N(e)?c(e.value):y(e,!0).filter((e=>!(e.childNodes.length>0)));var e}}})); diff --git a/themes/blowfish/static/js/zoom.min.js b/themes/blowfish/assets/lib/zoom/zoom.min.js index b1214b7..b1214b7 100644 --- a/themes/blowfish/static/js/zoom.min.js +++ b/themes/blowfish/assets/lib/zoom/zoom.min.js diff --git a/themes/blowfish/config.toml b/themes/blowfish/config.toml index 8ab1975..71beef3 100644 --- a/themes/blowfish/config.toml +++ b/themes/blowfish/config.toml @@ -2,4 +2,4 @@ [module.hugoVersion] extended = true min = "0.87.0" -max = "0.128.2" +max = "0.133.1" diff --git a/themes/blowfish/config/_default/languages.en.toml b/themes/blowfish/config/_default/languages.en.toml index e334ec9..846a775 100644 --- a/themes/blowfish/config/_default/languages.en.toml +++ b/themes/blowfish/config/_default/languages.en.toml @@ -1,3 +1,4 @@ +disabled = false languageCode = "en" languageName = "English" weight = 1 @@ -13,9 +14,11 @@ title = "Blowfish" # description = "My awesome website" # copyright = "Copy, _right?_ :thinking_face:" -# [author] +# [params.author] # name = "Your name here" +# email = "youremail@example.com" # image = "img/blowfish_logo.png" +# imageQuality = 96 # headline = "I'm only human" # bio = "A little bit about you" # links = [ diff --git a/themes/blowfish/config/_default/params.toml b/themes/blowfish/config/_default/params.toml index fc4edcb..d15943e 100644 --- a/themes/blowfish/config/_default/params.toml +++ b/themes/blowfish/config/_default/params.toml @@ -12,11 +12,14 @@ autoSwitchAppearance = true enableSearch = true enableCodeCopy = false +replyByEmail = false + # mainSections = ["section1", "section2"] # robots = "" disableImageOptimization = false disableTextInHeader = false +# backgroundImageWidth = 1200 # defaultBackgroundImage = "IMAGE.jpg" # used as default for background images # defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles @@ -25,6 +28,9 @@ disableTextInHeader = false # smartTOC = true # smartTOCHideUnfocusedChildren = true +giteaDefaultServer = "https://git.fsfe.org" +forgejoDefaultServer = "https://v8.next.forgejo.org" + [header] layout = "basic" # valid options: basic, fixed, fixed-fill, fixed-gradient, fixed-fill-blur @@ -41,7 +47,7 @@ disableTextInHeader = false showRecent = false showRecentItems = 5 showMoreLink = false - showMoreLinkDest = "/posts" + showMoreLinkDest = "/posts/" cardView = false cardViewScreenWidth = false layoutBackgroundBlur = false # only used when layout equals background @@ -74,7 +80,7 @@ disableTextInHeader = false showTaxonomies = false showAuthorsBadges = false showWordCount = true - # sharingLinks = [ "linkedin", "twitter", "bluesky", "reddit", "pinterest", "facebook", "email", "whatsapp", "telegram"] + # sharingLinks = [ "linkedin", "twitter", "bluesky", "mastodon", "reddit", "pinterest", "facebook", "email", "whatsapp", "telegram"] showZenMode = false [list] @@ -135,6 +141,11 @@ disableTextInHeader = false # websiteid = "ABC12345" # domain = "llama.yoursite.com" # dataDomains = "yoursite.com,yoursite2.com" + # enableTrackEvent = true + +[selineAnalytics] + # token = "XXXXXX" + # enableTrackEvent = true [buymeacoffee] # identifier = "" diff --git a/themes/blowfish/data/forgejoColors.json b/themes/blowfish/data/forgejoColors.json new file mode 100644 index 0000000..7f272e7 --- /dev/null +++ b/themes/blowfish/data/forgejoColors.json @@ -0,0 +1,533 @@ +{ + "1C Enterprise": "#814CCC", + "4D": "#004289", + "ABAP": "#E8274B", + "ABAP CDS": "#555e25", + "ActionScript": "#882B0F", + "Ada": "#02f88c", + "Adobe Font Metrics": "#fa0f00", + "Agda": "#315665", + "AGS Script": "#B9D9FF", + "AIDL": "#34EB6B", + "AL": "#3AA2B5", + "Alloy": "#64C800", + "Alpine Abuild": "#0D597F", + "Altium Designer": "#A89663", + "AMPL": "#E6EFBB", + "AngelScript": "#C7D7DC", + "Ant Build System": "#A9157E", + "ANTLR": "#9DC3FF", + "ApacheConf": "#d12127", + "Apex": "#1797c0", + "API Blueprint": "#2ACCA8", + "APL": "#5A8164", + "Apollo Guidance Computer": "#0B3D91", + "AppleScript": "#101F1F", + "Arc": "#aa2afe", + "AsciiDoc": "#73a0c5", + "ASL": null, + "ASP.NET": "#9400ff", + "AspectJ": "#a957b0", + "Assembly": "#6E4C13", + "Astro": "#ff5a03", + "Asymptote": "#ff0000", + "ATS": "#1ac620", + "Augeas": "#9CC134", + "AutoHotkey": "#6594b9", + "AutoIt": "#1C3552", + "Avro IDL": "#0040FF", + "Awk": "#c30e9b", + "Ballerina": "#FF5000", + "BASIC": "#ff0000", + "Batchfile": "#C1F12E", + "Beef": "#a52f4e", + "Befunge": null, + "BibTeX": "#778899", + "Bicep": "#519aba", + "Bison": "#6A463F", + "BitBake": "#00bce4", + "Blade": "#f7523f", + "BlitzBasic": "#00FFAE", + "BlitzMax": "#cd6400", + "Bluespec": "#12223c", + "Boo": "#d4bec1", + "Boogie": "#c80fa0", + "Brainfuck": "#2F2530", + "Brightscript": "#662D91", + "Browserslist": "#ffd539", + "C": "#555555", + "C#": "#178600", + "C++": "#f34b7d", + "C2hs Haskell": null, + "Cabal Config": "#483465", + "Cap'n Proto": "#c42727", + "CartoCSS": null, + "Ceylon": "#dfa535", + "Chapel": "#8dc63f", + "Charity": null, + "ChucK": "#3f8000", + "Cirru": "#ccccff", + "Clarion": "#db901e", + "Classic ASP": "#6a40fd", + "Clean": "#3F85AF", + "Click": "#E4E6F3", + "CLIPS": "#00A300", + "Clojure": "#db5855", + "Closure Templates": "#0d948f", + "Cloud Firestore Security Rules": "#FFA000", + "CMake": "#DA3434", + "COBOL": null, + "CodeQL": "#140f46", + "CoffeeScript": "#244776", + "ColdFusion": "#ed2cd6", + "ColdFusion CFC": "#ed2cd6", + "COLLADA": "#F1A42B", + "Common Lisp": "#3fb68b", + "Common Workflow Language": "#B5314C", + "Component Pascal": "#B0CE4E", + "Cool": null, + "Coq": "#d0b68c", + "Crystal": "#000100", + "CSON": "#244776", + "Csound": "#1a1a1a", + "Csound Document": "#1a1a1a", + "Csound Score": "#1a1a1a", + "CSS": "#563d7c", + "CSV": "#237346", + "Cuda": "#3A4E3A", + "CUE": "#5886E1", + "CWeb": "#00007a", + "Cycript": null, + "Cython": "#fedf5b", + "D": "#ba595e", + "Dafny": "#FFEC25", + "Darcs Patch": "#8eff23", + "Dart": "#00B4AB", + "DataWeave": "#003a52", + "Dhall": "#dfafff", + "DIGITAL Command Language": null, + "DirectX 3D File": "#aace60", + "DM": "#447265", + "Dockerfile": "#384d54", + "Dogescript": "#cca760", + "DTrace": null, + "Dylan": "#6c616e", + "E": "#ccce35", + "Easybuild": "#069406", + "eC": "#913960", + "Ecere Projects": "#913960", + "ECL": "#8a1267", + "ECLiPSe": "#001d9d", + "EditorConfig": "#fff1f2", + "Eiffel": "#4d6977", + "EJS": "#a91e50", + "Elixir": "#6e4a7e", + "Elm": "#60B5CC", + "Emacs Lisp": "#c065db", + "EmberScript": "#FFF4F3", + "EQ": "#a78649", + "Erlang": "#B83998", + "F#": "#b845fc", + "F*": "#572e30", + "Factor": "#636746", + "Fancy": "#7b9db4", + "Fantom": "#14253c", + "Faust": "#c37240", + "Fennel": "#fff3d7", + "FIGlet Font": "#FFDDBB", + "Filebench WML": "#F6B900", + "Filterscript": null, + "fish": "#4aae47", + "Fluent": "#ffcc33", + "FLUX": "#88ccff", + "Forth": "#341708", + "Fortran": "#4d41b1", + "Fortran Free Form": "#4d41b1", + "FreeBasic": "#867db1", + "FreeMarker": "#0050b2", + "Frege": "#00cafe", + "Futhark": "#5f021f", + "G-code": "#D08CF2", + "Game Maker Language": "#71b417", + "GAML": "#FFC766", + "GAMS": "#f49a22", + "GAP": "#0000cc", + "GCC Machine Description": "#FFCFAB", + "GDB": null, + "GDScript": "#355570", + "GEDCOM": "#003058", + "Gemfile.lock": "#701516", + "Genie": "#fb855d", + "Genshi": "#951531", + "Gentoo Ebuild": "#9400ff", + "Gentoo Eclass": "#9400ff", + "Gerber Image": "#d20b00", + "Gherkin": "#5B2063", + "Git Attributes": "#F44D27", + "Git Config": "#F44D27", + "GLSL": "#5686a5", + "Glyph": "#c1ac7f", + "Gnuplot": "#f0a9f0", + "Go": "#00ADD8", + "Go Checksums": "#00ADD8", + "Go Module": "#00ADD8", + "Golo": "#88562A", + "Gosu": "#82937f", + "Grace": "#615f8b", + "Gradle": "#02303a", + "Grammatical Framework": "#ff0000", + "GraphQL": "#e10098", + "Graphviz (DOT)": "#2596be", + "Groovy": "#4298b8", + "Groovy Server Pages": "#4298b8", + "Hack": "#878787", + "Haml": "#ece2a9", + "Handlebars": "#f7931e", + "HAProxy": "#106da9", + "Harbour": "#0e60e3", + "Haskell": "#5e5086", + "Haxe": "#df7900", + "HCL": null, + "HiveQL": "#dce200", + "HLSL": "#aace60", + "HolyC": "#ffefaf", + "HTML": "#e34c26", + "HTML+ECR": "#2e1052", + "HTML+EEX": "#6e4a7e", + "HTML+ERB": "#701516", + "HTML+PHP": "#4f5d95", + "HTML+Razor": "#512be4", + "HTTP": "#005C9C", + "HXML": "#f68712", + "Hy": "#7790B2", + "HyPhy": null, + "IDL": "#a3522f", + "Idris": "#b30000", + "Ignore List": "#000000", + "IGOR Pro": "#0000cc", + "ImageJ Macro": "#99AAFF", + "Inform 7": null, + "INI": "#d1dbe0", + "Inno Setup": "#264b99", + "Io": "#a9188d", + "Ioke": "#078193", + "Isabelle": "#FEFE00", + "Isabelle ROOT": "#FEFE00", + "J": "#9EEDFF", + "JAR Manifest": "#b07219", + "Jasmin": "#d03600", + "Java": "#b07219", + "Java Properties": "#2A6277", + "Java Server Pages": "#2A6277", + "JavaScript": "#f1e05a", + "JavaScript+ERB": "#f1e05a", + "Jest Snapshot": "#15c213", + "JFlex": "#DBCA00", + "Jinja": "#a52a22", + "Jison": "#56b3cb", + "Jison Lex": "#56b3cb", + "Jolie": "#843179", + "jq": "#c7254e", + "JSON": "#292929", + "JSON with Comments": "#292929", + "JSON5": "#267CB9", + "JSONiq": "#40d47e", + "JSONLD": "#0c479c", + "Jsonnet": "#0064bd", + "Julia": "#a270ba", + "Jupyter Notebook": "#DA5B0B", + "Kaitai Struct": "#773b37", + "KakouneScript": "#6f8042", + "KiCad Layout": "#2f4aab", + "KiCad Legacy Layout": "#2f4aab", + "KiCad Schematic": "#2f4aab", + "Kotlin": "#A97BFF", + "KRL": "#28430A", + "LabVIEW": "#fede06", + "Lark": "#2980B9", + "Lasso": "#999999", + "Latte": "#f2a542", + "Lean": null, + "Less": "#1d365d", + "Lex": "#DBCA00", + "LFE": "#4C3023", + "LilyPond": "#9ccc7c", + "Limbo": null, + "Liquid": "#67b8de", + "Literate Agda": "#315665", + "Literate CoffeeScript": "#244776", + "Literate Haskell": "#5e5086", + "LiveScript": "#499886", + "LLVM": "#185619", + "Logos": null, + "Logtalk": "#295b9a", + "LOLCODE": "#cc9900", + "LookML": "#652B81", + "LoomScript": null, + "LSL": "#3d9970", + "Lua": "#000080", + "M": null, + "M4": null, + "M4Sugar": null, + "Macaulay2": "#d8ffff", + "Makefile": "#427819", + "Mako": "#7e858d", + "Markdown": "#083fa1", + "Marko": "#42bff2", + "Mask": "#f97732", + "Mathematica": "#dd1100", + "MATLAB": "#e16737", + "Max": "#c4a79c", + "MAXScript": "#00a6a6", + "mcfunction": "#E22837", + "Mercury": "#ff2b2b", + "Meson": "#007800", + "Metal": "#8f14e9", + "MiniD": null, + "Mirah": "#c7a938", + "mIRC Script": "#3d57c3", + "MLIR": "#5EC8DB", + "Modelica": "#de1d31", + "Modula-2": "#10253f", + "Modula-3": "#223388", + "Module Management System": null, + "Monkey": null, + "Moocode": null, + "MoonScript": "#ff4585", + "Motorola 68K Assembly": "#005daa", + "MQL4": "#62A8D6", + "MQL5": "#4A76B8", + "MTML": "#b7e1f4", + "MUF": null, + "mupad": "#244963", + "Mustache": "#724b3b", + "Myghty": null, + "nanorc": "#2d004d", + "NASL": null, + "NCL": "#28431f", + "Nearley": "#990000", + "Nemerle": "#3d3c6e", + "nesC": "#94B0C7", + "NetLinx": "#0aa0ff", + "NetLinx+ERB": "#747faa", + "NetLogo": "#ff6375", + "NewLisp": "#87AED7", + "Nextflow": "#3ac486", + "Nginx": "#009639", + "Nim": "#ffc200", + "Nit": "#009917", + "Nix": "#7e7eff", + "NPM Config": "#cb3837", + "NSIS": null, + "Nu": "#c9df40", + "NumPy": "#9C8AF9", + "Nunjucks": "#3d8137", + "NWScript": "#111522", + "Objective-C": "#438eff", + "Objective-C++": "#6866fb", + "Objective-J": "#ff0c5a", + "ObjectScript": "#424893", + "OCaml": "#3be133", + "Odin": "#60AFFE", + "Omgrofl": "#cabbff", + "ooc": "#b0b77e", + "Opa": null, + "Opal": "#f7ede0", + "Open Policy Agent": "#7d9199", + "OpenCL": "#ed2e2d", + "OpenEdge ABL": "#5ce600", + "OpenQASM": "#AA70FF", + "OpenRC runscript": null, + "OpenSCAD": "#e5cd45", + "Org": "#77aa99", + "Ox": null, + "Oxygene": "#cdd0e3", + "Oz": "#fab738", + "P4": "#7055b5", + "Pan": "#cc0000", + "Papyrus": "#6600cc", + "Parrot": "#f3ca0a", + "Parrot Assembly": null, + "Parrot Internal Representation": null, + "Pascal": "#E3F171", + "Pawn": "#dbb284", + "PEG.js": "#234d6b", + "Pep8": "#C76F5B", + "Perl": "#0298c3", + "PHP": "#4F5D95", + "PicoLisp": "#6067af", + "PigLatin": "#fcd7de", + "Pike": "#005390", + "PLpgSQL": "#336790", + "PLSQL": "#dad8d8", + "PogoScript": "#d80074", + "Pony": null, + "PostCSS": "#dc3a0c", + "PostScript": "#da291c", + "POV-Ray SDL": "#6bac65", + "PowerBuilder": "#8f0f8d", + "PowerShell": "#012456", + "Prisma": "#0c344b", + "Processing": "#0096D8", + "Prolog": "#74283c", + "Propeller Spin": "#7fa2a7", + "Pug": "#a86454", + "Puppet": "#302B6D", + "PureBasic": "#5a6986", + "PureScript": "#1D222D", + "Python": "#3572A5", + "Python console": "#3572A5", + "Python traceback": "#3572A5", + "q": "#0040cd", + "Q#": "#fed659", + "QMake": null, + "QML": "#44a51c", + "Qt Script": "#00b841", + "Quake": "#882233", + "R": "#198CE7", + "Racket": "#3c5caa", + "Ragel": "#9d5200", + "Raku": "#0000fb", + "RAML": "#77d9fb", + "Rascal": "#fffaa0", + "RDoc": "#701516", + "REALbasic": null, + "Reason": "#ff5847", + "Rebol": "#358a5b", + "Record Jar": "#0673ba", + "Red": "#f50000", + "Redcode": null, + "Regular Expression": "#009a00", + "Ren'Py": "#ff7f7f", + "RenderScript": null, + "ReScript": "#ed5051", + "reStructuredText": "#141414", + "REXX": "#d90e09", + "Ring": "#2D54CB", + "Riot": "#A71E49", + "RMarkdown": "#198ce7", + "RobotFramework": "#00c0b5", + "Roff": "#ecdebe", + "Roff Manpage": "#ecdebe", + "Rouge": "#cc0088", + "RPC": null, + "Ruby": "#701516", + "RUNOFF": "#665a4e", + "Rust": "#dea584", + "Sage": null, + "SaltStack": "#646464", + "SAS": "#B34936", + "Sass": "#a53b70", + "Scala": "#c22d40", + "Scaml": "#bd181a", + "Scheme": "#1e4aec", + "Scilab": "#ca0f21", + "SCSS": "#c6538c", + "sed": "#64b970", + "Self": "#0579aa", + "ShaderLab": "#222c37", + "Shell": "#89e051", + "ShellSession": null, + "Shen": "#120F14", + "Sieve": null, + "Singularity": "#64E6AD", + "Slash": "#007eff", + "Slice": "#003fa2", + "Slim": "#2b2b2b", + "Smali": null, + "Smalltalk": "#596706", + "Smarty": "#f0c040", + "SmPL": "#c94949", + "SMT": null, + "Solidity": "#AA6746", + "SourcePawn": "#f69e1d", + "SPARQL": "#0C4597", + "SQF": "#3F3F3F", + "SQL": "#e38c00", + "SQLPL": "#e38c00", + "Squirrel": "#800000", + "SRecode Template": "#348a34", + "Stan": "#b2011d", + "Standard ML": "#dc566d", + "Starlark": "#76d275", + "Stata": "#1a5f91", + "StringTemplate": "#3fb34f", + "Stylus": "#ff6347", + "SubRip Text": "#9e0101", + "SugarSS": "#2fcc9f", + "SuperCollider": "#46390b", + "Svelte": "#ff3e00", + "SVG": "#ff9900", + "Swift": "#F05138", + "SWIG": null, + "SystemVerilog": "#DAE1C2", + "Tcl": "#e4cc98", + "Tcsh": null, + "Terra": "#00004c", + "TeX": "#3D6117", + "Textile": "#ffe7ac", + "TextMate Properties": "#df66e4", + "Thrift": "#D12127", + "TI Program": "#A0AA87", + "TLA": "#4b0079", + "TOML": "#9c4221", + "TSQL": "#e38c00", + "TSV": "#237346", + "TSX": "#2b7489", + "Turing": "#cf142b", + "Twig": "#c1d026", + "TXL": "#0178b8", + "TypeScript": "#2b7489", + "Unified Parallel C": "#4e3617", + "Unity3D Asset": "#222c37", + "Unix Assembly": null, + "Uno": "#9933cc", + "UnrealScript": "#a54c4d", + "UrWeb": "#ccccee", + "V": "#4f87c4", + "Vala": "#fbe5cd", + "Valve Data Format": "#f26025", + "VBA": "#867db1", + "VBScript": "#15dcdc", + "VCL": "#148AA8", + "Verilog": "#b2b7f8", + "VHDL": "#adb2cb", + "Vim Help File": "#199f4b", + "Vim Script": "#199f4b", + "Vim Snippet": "#199f4b", + "Visual Basic .NET": "#945db7", + "Volt": "#1F1F1F", + "Vue": "#41b883", + "wdl": "#42f1f4", + "Web Ontology Language": "#5b70bd", + "WebAssembly": "#04133b", + "WebIDL": null, + "Wikitext": "#fc5757", + "Windows Registry Entries": "#52d5ff", + "wisp": "#7582D1", + "Wollok": "#a23738", + "World of Warcraft Addon Data": "#f7e43f", + "X10": "#4B6BEF", + "xBase": "#403a40", + "XC": "#99DA07", + "XML": "#0060ac", + "XML Property List": "#0060ac", + "Xojo": "#81bd41", + "Xonsh": "#285EEF", + "XProc": null, + "XQuery": "#5232e7", + "XS": null, + "XSLT": "#EB8CEB", + "Xtend": "#24255d", + "Yacc": "#4B6C4B", + "YAML": "#cb171e", + "YARA": "#220000", + "YASnippet": "#32AB90", + "ZAP": "#0d665e", + "Zeek": null, + "ZenScript": "#00BCD1", + "Zephir": "#118f9e", + "Zig": "#ec915c", + "ZIL": "#dc75e5", + "Zimpl": "#d67711" +}
\ No newline at end of file diff --git a/themes/blowfish/data/giteaColors.json b/themes/blowfish/data/giteaColors.json new file mode 100644 index 0000000..7f272e7 --- /dev/null +++ b/themes/blowfish/data/giteaColors.json @@ -0,0 +1,533 @@ +{ + "1C Enterprise": "#814CCC", + "4D": "#004289", + "ABAP": "#E8274B", + "ABAP CDS": "#555e25", + "ActionScript": "#882B0F", + "Ada": "#02f88c", + "Adobe Font Metrics": "#fa0f00", + "Agda": "#315665", + "AGS Script": "#B9D9FF", + "AIDL": "#34EB6B", + "AL": "#3AA2B5", + "Alloy": "#64C800", + "Alpine Abuild": "#0D597F", + "Altium Designer": "#A89663", + "AMPL": "#E6EFBB", + "AngelScript": "#C7D7DC", + "Ant Build System": "#A9157E", + "ANTLR": "#9DC3FF", + "ApacheConf": "#d12127", + "Apex": "#1797c0", + "API Blueprint": "#2ACCA8", + "APL": "#5A8164", + "Apollo Guidance Computer": "#0B3D91", + "AppleScript": "#101F1F", + "Arc": "#aa2afe", + "AsciiDoc": "#73a0c5", + "ASL": null, + "ASP.NET": "#9400ff", + "AspectJ": "#a957b0", + "Assembly": "#6E4C13", + "Astro": "#ff5a03", + "Asymptote": "#ff0000", + "ATS": "#1ac620", + "Augeas": "#9CC134", + "AutoHotkey": "#6594b9", + "AutoIt": "#1C3552", + "Avro IDL": "#0040FF", + "Awk": "#c30e9b", + "Ballerina": "#FF5000", + "BASIC": "#ff0000", + "Batchfile": "#C1F12E", + "Beef": "#a52f4e", + "Befunge": null, + "BibTeX": "#778899", + "Bicep": "#519aba", + "Bison": "#6A463F", + "BitBake": "#00bce4", + "Blade": "#f7523f", + "BlitzBasic": "#00FFAE", + "BlitzMax": "#cd6400", + "Bluespec": "#12223c", + "Boo": "#d4bec1", + "Boogie": "#c80fa0", + "Brainfuck": "#2F2530", + "Brightscript": "#662D91", + "Browserslist": "#ffd539", + "C": "#555555", + "C#": "#178600", + "C++": "#f34b7d", + "C2hs Haskell": null, + "Cabal Config": "#483465", + "Cap'n Proto": "#c42727", + "CartoCSS": null, + "Ceylon": "#dfa535", + "Chapel": "#8dc63f", + "Charity": null, + "ChucK": "#3f8000", + "Cirru": "#ccccff", + "Clarion": "#db901e", + "Classic ASP": "#6a40fd", + "Clean": "#3F85AF", + "Click": "#E4E6F3", + "CLIPS": "#00A300", + "Clojure": "#db5855", + "Closure Templates": "#0d948f", + "Cloud Firestore Security Rules": "#FFA000", + "CMake": "#DA3434", + "COBOL": null, + "CodeQL": "#140f46", + "CoffeeScript": "#244776", + "ColdFusion": "#ed2cd6", + "ColdFusion CFC": "#ed2cd6", + "COLLADA": "#F1A42B", + "Common Lisp": "#3fb68b", + "Common Workflow Language": "#B5314C", + "Component Pascal": "#B0CE4E", + "Cool": null, + "Coq": "#d0b68c", + "Crystal": "#000100", + "CSON": "#244776", + "Csound": "#1a1a1a", + "Csound Document": "#1a1a1a", + "Csound Score": "#1a1a1a", + "CSS": "#563d7c", + "CSV": "#237346", + "Cuda": "#3A4E3A", + "CUE": "#5886E1", + "CWeb": "#00007a", + "Cycript": null, + "Cython": "#fedf5b", + "D": "#ba595e", + "Dafny": "#FFEC25", + "Darcs Patch": "#8eff23", + "Dart": "#00B4AB", + "DataWeave": "#003a52", + "Dhall": "#dfafff", + "DIGITAL Command Language": null, + "DirectX 3D File": "#aace60", + "DM": "#447265", + "Dockerfile": "#384d54", + "Dogescript": "#cca760", + "DTrace": null, + "Dylan": "#6c616e", + "E": "#ccce35", + "Easybuild": "#069406", + "eC": "#913960", + "Ecere Projects": "#913960", + "ECL": "#8a1267", + "ECLiPSe": "#001d9d", + "EditorConfig": "#fff1f2", + "Eiffel": "#4d6977", + "EJS": "#a91e50", + "Elixir": "#6e4a7e", + "Elm": "#60B5CC", + "Emacs Lisp": "#c065db", + "EmberScript": "#FFF4F3", + "EQ": "#a78649", + "Erlang": "#B83998", + "F#": "#b845fc", + "F*": "#572e30", + "Factor": "#636746", + "Fancy": "#7b9db4", + "Fantom": "#14253c", + "Faust": "#c37240", + "Fennel": "#fff3d7", + "FIGlet Font": "#FFDDBB", + "Filebench WML": "#F6B900", + "Filterscript": null, + "fish": "#4aae47", + "Fluent": "#ffcc33", + "FLUX": "#88ccff", + "Forth": "#341708", + "Fortran": "#4d41b1", + "Fortran Free Form": "#4d41b1", + "FreeBasic": "#867db1", + "FreeMarker": "#0050b2", + "Frege": "#00cafe", + "Futhark": "#5f021f", + "G-code": "#D08CF2", + "Game Maker Language": "#71b417", + "GAML": "#FFC766", + "GAMS": "#f49a22", + "GAP": "#0000cc", + "GCC Machine Description": "#FFCFAB", + "GDB": null, + "GDScript": "#355570", + "GEDCOM": "#003058", + "Gemfile.lock": "#701516", + "Genie": "#fb855d", + "Genshi": "#951531", + "Gentoo Ebuild": "#9400ff", + "Gentoo Eclass": "#9400ff", + "Gerber Image": "#d20b00", + "Gherkin": "#5B2063", + "Git Attributes": "#F44D27", + "Git Config": "#F44D27", + "GLSL": "#5686a5", + "Glyph": "#c1ac7f", + "Gnuplot": "#f0a9f0", + "Go": "#00ADD8", + "Go Checksums": "#00ADD8", + "Go Module": "#00ADD8", + "Golo": "#88562A", + "Gosu": "#82937f", + "Grace": "#615f8b", + "Gradle": "#02303a", + "Grammatical Framework": "#ff0000", + "GraphQL": "#e10098", + "Graphviz (DOT)": "#2596be", + "Groovy": "#4298b8", + "Groovy Server Pages": "#4298b8", + "Hack": "#878787", + "Haml": "#ece2a9", + "Handlebars": "#f7931e", + "HAProxy": "#106da9", + "Harbour": "#0e60e3", + "Haskell": "#5e5086", + "Haxe": "#df7900", + "HCL": null, + "HiveQL": "#dce200", + "HLSL": "#aace60", + "HolyC": "#ffefaf", + "HTML": "#e34c26", + "HTML+ECR": "#2e1052", + "HTML+EEX": "#6e4a7e", + "HTML+ERB": "#701516", + "HTML+PHP": "#4f5d95", + "HTML+Razor": "#512be4", + "HTTP": "#005C9C", + "HXML": "#f68712", + "Hy": "#7790B2", + "HyPhy": null, + "IDL": "#a3522f", + "Idris": "#b30000", + "Ignore List": "#000000", + "IGOR Pro": "#0000cc", + "ImageJ Macro": "#99AAFF", + "Inform 7": null, + "INI": "#d1dbe0", + "Inno Setup": "#264b99", + "Io": "#a9188d", + "Ioke": "#078193", + "Isabelle": "#FEFE00", + "Isabelle ROOT": "#FEFE00", + "J": "#9EEDFF", + "JAR Manifest": "#b07219", + "Jasmin": "#d03600", + "Java": "#b07219", + "Java Properties": "#2A6277", + "Java Server Pages": "#2A6277", + "JavaScript": "#f1e05a", + "JavaScript+ERB": "#f1e05a", + "Jest Snapshot": "#15c213", + "JFlex": "#DBCA00", + "Jinja": "#a52a22", + "Jison": "#56b3cb", + "Jison Lex": "#56b3cb", + "Jolie": "#843179", + "jq": "#c7254e", + "JSON": "#292929", + "JSON with Comments": "#292929", + "JSON5": "#267CB9", + "JSONiq": "#40d47e", + "JSONLD": "#0c479c", + "Jsonnet": "#0064bd", + "Julia": "#a270ba", + "Jupyter Notebook": "#DA5B0B", + "Kaitai Struct": "#773b37", + "KakouneScript": "#6f8042", + "KiCad Layout": "#2f4aab", + "KiCad Legacy Layout": "#2f4aab", + "KiCad Schematic": "#2f4aab", + "Kotlin": "#A97BFF", + "KRL": "#28430A", + "LabVIEW": "#fede06", + "Lark": "#2980B9", + "Lasso": "#999999", + "Latte": "#f2a542", + "Lean": null, + "Less": "#1d365d", + "Lex": "#DBCA00", + "LFE": "#4C3023", + "LilyPond": "#9ccc7c", + "Limbo": null, + "Liquid": "#67b8de", + "Literate Agda": "#315665", + "Literate CoffeeScript": "#244776", + "Literate Haskell": "#5e5086", + "LiveScript": "#499886", + "LLVM": "#185619", + "Logos": null, + "Logtalk": "#295b9a", + "LOLCODE": "#cc9900", + "LookML": "#652B81", + "LoomScript": null, + "LSL": "#3d9970", + "Lua": "#000080", + "M": null, + "M4": null, + "M4Sugar": null, + "Macaulay2": "#d8ffff", + "Makefile": "#427819", + "Mako": "#7e858d", + "Markdown": "#083fa1", + "Marko": "#42bff2", + "Mask": "#f97732", + "Mathematica": "#dd1100", + "MATLAB": "#e16737", + "Max": "#c4a79c", + "MAXScript": "#00a6a6", + "mcfunction": "#E22837", + "Mercury": "#ff2b2b", + "Meson": "#007800", + "Metal": "#8f14e9", + "MiniD": null, + "Mirah": "#c7a938", + "mIRC Script": "#3d57c3", + "MLIR": "#5EC8DB", + "Modelica": "#de1d31", + "Modula-2": "#10253f", + "Modula-3": "#223388", + "Module Management System": null, + "Monkey": null, + "Moocode": null, + "MoonScript": "#ff4585", + "Motorola 68K Assembly": "#005daa", + "MQL4": "#62A8D6", + "MQL5": "#4A76B8", + "MTML": "#b7e1f4", + "MUF": null, + "mupad": "#244963", + "Mustache": "#724b3b", + "Myghty": null, + "nanorc": "#2d004d", + "NASL": null, + "NCL": "#28431f", + "Nearley": "#990000", + "Nemerle": "#3d3c6e", + "nesC": "#94B0C7", + "NetLinx": "#0aa0ff", + "NetLinx+ERB": "#747faa", + "NetLogo": "#ff6375", + "NewLisp": "#87AED7", + "Nextflow": "#3ac486", + "Nginx": "#009639", + "Nim": "#ffc200", + "Nit": "#009917", + "Nix": "#7e7eff", + "NPM Config": "#cb3837", + "NSIS": null, + "Nu": "#c9df40", + "NumPy": "#9C8AF9", + "Nunjucks": "#3d8137", + "NWScript": "#111522", + "Objective-C": "#438eff", + "Objective-C++": "#6866fb", + "Objective-J": "#ff0c5a", + "ObjectScript": "#424893", + "OCaml": "#3be133", + "Odin": "#60AFFE", + "Omgrofl": "#cabbff", + "ooc": "#b0b77e", + "Opa": null, + "Opal": "#f7ede0", + "Open Policy Agent": "#7d9199", + "OpenCL": "#ed2e2d", + "OpenEdge ABL": "#5ce600", + "OpenQASM": "#AA70FF", + "OpenRC runscript": null, + "OpenSCAD": "#e5cd45", + "Org": "#77aa99", + "Ox": null, + "Oxygene": "#cdd0e3", + "Oz": "#fab738", + "P4": "#7055b5", + "Pan": "#cc0000", + "Papyrus": "#6600cc", + "Parrot": "#f3ca0a", + "Parrot Assembly": null, + "Parrot Internal Representation": null, + "Pascal": "#E3F171", + "Pawn": "#dbb284", + "PEG.js": "#234d6b", + "Pep8": "#C76F5B", + "Perl": "#0298c3", + "PHP": "#4F5D95", + "PicoLisp": "#6067af", + "PigLatin": "#fcd7de", + "Pike": "#005390", + "PLpgSQL": "#336790", + "PLSQL": "#dad8d8", + "PogoScript": "#d80074", + "Pony": null, + "PostCSS": "#dc3a0c", + "PostScript": "#da291c", + "POV-Ray SDL": "#6bac65", + "PowerBuilder": "#8f0f8d", + "PowerShell": "#012456", + "Prisma": "#0c344b", + "Processing": "#0096D8", + "Prolog": "#74283c", + "Propeller Spin": "#7fa2a7", + "Pug": "#a86454", + "Puppet": "#302B6D", + "PureBasic": "#5a6986", + "PureScript": "#1D222D", + "Python": "#3572A5", + "Python console": "#3572A5", + "Python traceback": "#3572A5", + "q": "#0040cd", + "Q#": "#fed659", + "QMake": null, + "QML": "#44a51c", + "Qt Script": "#00b841", + "Quake": "#882233", + "R": "#198CE7", + "Racket": "#3c5caa", + "Ragel": "#9d5200", + "Raku": "#0000fb", + "RAML": "#77d9fb", + "Rascal": "#fffaa0", + "RDoc": "#701516", + "REALbasic": null, + "Reason": "#ff5847", + "Rebol": "#358a5b", + "Record Jar": "#0673ba", + "Red": "#f50000", + "Redcode": null, + "Regular Expression": "#009a00", + "Ren'Py": "#ff7f7f", + "RenderScript": null, + "ReScript": "#ed5051", + "reStructuredText": "#141414", + "REXX": "#d90e09", + "Ring": "#2D54CB", + "Riot": "#A71E49", + "RMarkdown": "#198ce7", + "RobotFramework": "#00c0b5", + "Roff": "#ecdebe", + "Roff Manpage": "#ecdebe", + "Rouge": "#cc0088", + "RPC": null, + "Ruby": "#701516", + "RUNOFF": "#665a4e", + "Rust": "#dea584", + "Sage": null, + "SaltStack": "#646464", + "SAS": "#B34936", + "Sass": "#a53b70", + "Scala": "#c22d40", + "Scaml": "#bd181a", + "Scheme": "#1e4aec", + "Scilab": "#ca0f21", + "SCSS": "#c6538c", + "sed": "#64b970", + "Self": "#0579aa", + "ShaderLab": "#222c37", + "Shell": "#89e051", + "ShellSession": null, + "Shen": "#120F14", + "Sieve": null, + "Singularity": "#64E6AD", + "Slash": "#007eff", + "Slice": "#003fa2", + "Slim": "#2b2b2b", + "Smali": null, + "Smalltalk": "#596706", + "Smarty": "#f0c040", + "SmPL": "#c94949", + "SMT": null, + "Solidity": "#AA6746", + "SourcePawn": "#f69e1d", + "SPARQL": "#0C4597", + "SQF": "#3F3F3F", + "SQL": "#e38c00", + "SQLPL": "#e38c00", + "Squirrel": "#800000", + "SRecode Template": "#348a34", + "Stan": "#b2011d", + "Standard ML": "#dc566d", + "Starlark": "#76d275", + "Stata": "#1a5f91", + "StringTemplate": "#3fb34f", + "Stylus": "#ff6347", + "SubRip Text": "#9e0101", + "SugarSS": "#2fcc9f", + "SuperCollider": "#46390b", + "Svelte": "#ff3e00", + "SVG": "#ff9900", + "Swift": "#F05138", + "SWIG": null, + "SystemVerilog": "#DAE1C2", + "Tcl": "#e4cc98", + "Tcsh": null, + "Terra": "#00004c", + "TeX": "#3D6117", + "Textile": "#ffe7ac", + "TextMate Properties": "#df66e4", + "Thrift": "#D12127", + "TI Program": "#A0AA87", + "TLA": "#4b0079", + "TOML": "#9c4221", + "TSQL": "#e38c00", + "TSV": "#237346", + "TSX": "#2b7489", + "Turing": "#cf142b", + "Twig": "#c1d026", + "TXL": "#0178b8", + "TypeScript": "#2b7489", + "Unified Parallel C": "#4e3617", + "Unity3D Asset": "#222c37", + "Unix Assembly": null, + "Uno": "#9933cc", + "UnrealScript": "#a54c4d", + "UrWeb": "#ccccee", + "V": "#4f87c4", + "Vala": "#fbe5cd", + "Valve Data Format": "#f26025", + "VBA": "#867db1", + "VBScript": "#15dcdc", + "VCL": "#148AA8", + "Verilog": "#b2b7f8", + "VHDL": "#adb2cb", + "Vim Help File": "#199f4b", + "Vim Script": "#199f4b", + "Vim Snippet": "#199f4b", + "Visual Basic .NET": "#945db7", + "Volt": "#1F1F1F", + "Vue": "#41b883", + "wdl": "#42f1f4", + "Web Ontology Language": "#5b70bd", + "WebAssembly": "#04133b", + "WebIDL": null, + "Wikitext": "#fc5757", + "Windows Registry Entries": "#52d5ff", + "wisp": "#7582D1", + "Wollok": "#a23738", + "World of Warcraft Addon Data": "#f7e43f", + "X10": "#4B6BEF", + "xBase": "#403a40", + "XC": "#99DA07", + "XML": "#0060ac", + "XML Property List": "#0060ac", + "Xojo": "#81bd41", + "Xonsh": "#285EEF", + "XProc": null, + "XQuery": "#5232e7", + "XS": null, + "XSLT": "#EB8CEB", + "Xtend": "#24255d", + "Yacc": "#4B6C4B", + "YAML": "#cb171e", + "YARA": "#220000", + "YASnippet": "#32AB90", + "ZAP": "#0d665e", + "Zeek": null, + "ZenScript": "#00BCD1", + "Zephir": "#118f9e", + "Zig": "#ec915c", + "ZIL": "#dc75e5", + "Zimpl": "#d67711" +}
\ No newline at end of file diff --git a/themes/blowfish/data/sharing.json b/themes/blowfish/data/sharing.json index f176a2c..18aa4e6 100644 --- a/themes/blowfish/data/sharing.json +++ b/themes/blowfish/data/sharing.json @@ -43,5 +43,10 @@ "icon": "bluesky", "title": "sharing.bluesky", "url": "https://bsky.app/intent/compose?text=%[2]s+%[1]s" - } -}
\ No newline at end of file + }, + "mastodon": { + "icon": "mastodon", + "title": "sharing.mastodon", + "url": "https://s2f.kytta.dev/?text=%[2]s %[1]s" + } +} diff --git a/themes/blowfish/i18n/fa.yaml b/themes/blowfish/i18n/fa.yaml new file mode 100644 index 0000000..9a9dcb9 --- /dev/null +++ b/themes/blowfish/i18n/fa.yaml @@ -0,0 +1,75 @@ +global: + language: "FA" + +article: + anchor_label: "لنگر" + date: "{{ .Date }}" + date_updated: "آخرین تغییر: {{ .Date }}" + draft: "پیشنویس" + edit_title: "ویرایش محتوا" + reading_time: + one: "{{ .Count }} دقیقه" + other: "{{ .Count }} دقیقه" + reading_time_title: "زمان مطالعه" + table_of_contents: "فهرست مطالب" + word_count: + one: "{{ .Count }} کلمه" + other: "{{ .Count }} کلمه" + views: + one: "{{ .Count }} بازدید" + other: "{{ .Count }} بازدید" + likes: + one: "{{ .Count }} لایک" + other: "{{ .Count }} لایک" + part_of_series: "این مقاله بخشی از یک مجموعه مقالات است." + part: "بخش" + this_article: "همین مقاله" + related_articles: "مقالههای مرتبط" + zen_mode_title: + enable: "فعال کردن حالت تمام متن" + disable: "غیر فعال کردن حالت تمام متن" + +author: + byline_title: "نویسنده" + +code: + copy: "کپی کردن" + copied: "کپی شد" + +error: + 404_title: "صفحه مورد نظر یافت نشد :confused:" + 404_error: "ارور 404" + 404_description: "به نظر میرسد صفحهای که درخواست کردهاید وجود ندارد." + +footer: + dark_appearance: "حالت تاریک" + light_appearance: "حالت روشن" + powered_by: "قدرت گرفته از {{ .Hugo }} و {{ .Theme }}" + +list: + externalurl_title: "لینک به سایت خارجی" + no_articles: "هیچ مقالهای برای نمایش وجود ندارد." + +nav: + scroll_to_top_title: "بازگشت به بالا" + skip_to_main: "رفتن به محتوای اصلی" + +search: + open_button_title: "جستجو (/)" + close_button_title: "بستن (Esc)" + input_placeholder: "جستجو" + +sharing: + email: "ارسال ایمیل" + facebook: "اشتراک گذاری در فیسبوک" + linkedin: "اشتراک گذاری در لینکداین" + pinterest: "اشتراک گذاری در پینترست" + reddit: "اشتراک گذاری در ردیت" + twitter: "اشتراک گذاری در توییتر" + bluesky: "اشتراک گذاری در بلواسکای" + +shortcode: + recent_articles: "مقالههای اخیر" + +recent: + show_more: "نمایش بیشتر" diff --git a/themes/blowfish/i18n/ja.yaml b/themes/blowfish/i18n/ja.yaml index d5f6cec..a47aa21 100644 --- a/themes/blowfish/i18n/ja.yaml +++ b/themes/blowfish/i18n/ja.yaml @@ -15,10 +15,10 @@ article: word_count: one: "{{ .Count }} 文字" other: "{{ .Count }} 文字" - part_of_series: "This article is part of a series." - part: "Part" - this_article: "This Article" - related_articles: "Related" + part_of_series: "この記事は連載の一部です" + part: "パート" + this_article: "この記事" + related_articles: "関連記事" author: byline_title: "著者" diff --git a/themes/blowfish/layouts/_default/list.html b/themes/blowfish/layouts/_default/list.html index 9720468..7cc9238 100644 --- a/themes/blowfish/layouts/_default/list.html +++ b/themes/blowfish/layouts/_default/list.html @@ -30,10 +30,10 @@ var oid = "views_{{ $path }}" var oid_likes = "likes_{{ $path }}" </script> - {{ end }} {{ $jsPage := resources.Get "js/page.js" }} {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }} <script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script> + {{ end }} </header> <section class="{{ if $toc -}} mt-12 diff --git a/themes/blowfish/layouts/_default/rss.xml b/themes/blowfish/layouts/_default/rss.xml index 741dcd7..eab2409 100644 --- a/themes/blowfish/layouts/_default/rss.xml +++ b/themes/blowfish/layouts/_default/rss.xml @@ -17,11 +17,11 @@ <link>{{ .Permalink }}</link> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <generator>Hugo -- gohugo.io</generator> - <language>{{ site.LanguageCode }}</language>{{ with .Site.Author.email }} - <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} - <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}} + <language>{{ site.LanguageCode }}</language>{{ with .Site.Params.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }} + <webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}} {{ if .Site.Params.footer.showCopyright | default true -}} - <copyright>{{ with replace .Site.Params.copyright "{ year }" now.Year }}{{.}}{{ else }}© {{ now.Format "2006" }} {{ .Site.Author.name }}{{- end }}</copyright> + <copyright>{{ with replace .Site.Params.copyright "{ year }" now.Year }}{{.}}{{ else }}© {{ now.Format "2006" }} {{ .Site.Params.Author.name }}{{- end }}</copyright> {{- end }} {{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} {{- with .OutputFormats.Get "RSS" -}} @@ -32,7 +32,7 @@ <title>{{ .Title }}</title> <link>{{ .Permalink }}</link> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> - {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + {{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}} <guid>{{ .Permalink }}</guid> <description>{{ .Summary | html }}</description> {{ range ( where .Site.RegularPages ".RelPermalink" .RelPermalink | first 1 ) }} diff --git a/themes/blowfish/layouts/_default/single.html b/themes/blowfish/layouts/_default/single.html index ad07f7d..c0de7c4 100644 --- a/themes/blowfish/layouts/_default/single.html +++ b/themes/blowfish/layouts/_default/single.html @@ -46,7 +46,7 @@ {{- if $authorData -}} {{ range $taxonomyname, $taxonomy := $taxonomies }} {{ if (eq $taxonomyname $author) }} - {{ $taxonomyLink = delimit (slice $baseURL "/authors/" $author) "" }} + {{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }} {{ end }} {{ end }} {{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }} @@ -81,6 +81,17 @@ <div class="article-content max-w-prose mb-20"> {{ .Content }} + {{ $defaultReplyByEmail := .Site.Params.replyByEmail }} + {{ $replyByEmail := default $defaultReplyByEmail .Params.replyByEmail }} + {{ if $replyByEmail }} + <strong class="block mt-8"> + <a target="_blank" + class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800" + href="mailto:{{ .Site.Params.Author.email }}?subject={{ replace (printf "Reply to %s" .Title) "\"" "'" }}"> + Reply by Email + </a> + </strong> + {{ end }} </div> {{ if (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }} @@ -95,7 +106,7 @@ {{- if $authorData -}} {{ range $taxonomyname, $taxonomy := $taxonomies }} {{ if (eq $taxonomyname $author) }} - {{ $taxonomyLink = delimit (slice $baseURL "/authors/" $author) "" }} + {{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }} {{ end }} {{ end }} {{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }} @@ -124,10 +135,10 @@ var oid = "views_{{ $path }}" var oid_likes = "likes_{{ $path }}" </script> - {{ end }} {{ $jsPage := resources.Get "js/page.js" }} {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }} <script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script> + {{ end }} </section> <footer class="pt-8 max-w-prose print:hidden"> diff --git a/themes/blowfish/layouts/_default/taxonomy.html b/themes/blowfish/layouts/_default/taxonomy.html index b7a38c8..94859a6 100644 --- a/themes/blowfish/layouts/_default/taxonomy.html +++ b/themes/blowfish/layouts/_default/taxonomy.html @@ -28,7 +28,6 @@ {{ .Content }} </div> </section> - {{ end }} <script> var oid = "views_taxonomy_{{ .Data.Plural }}" var oid_likes = "likes_taxonomy_{{ .Data.Plural }}" @@ -36,7 +35,7 @@ {{ $jsPage := resources.Get "js/page.js" }} {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }} <script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script> - + {{ end }} {{ if .Site.Params.taxonomy.cardView }} diff --git a/themes/blowfish/layouts/_default/term.html b/themes/blowfish/layouts/_default/term.html index db33bd7..ae8c702 100644 --- a/themes/blowfish/layouts/_default/term.html +++ b/themes/blowfish/layouts/_default/term.html @@ -1,6 +1,6 @@ {{ define "main" }} -{{ .Scratch.Set "scope" "list" }} +{{ .Scratch.Set "scope" "term" }} {{ if .Site.Params.term.showHero | default false }} {{ $heroStyle := print "partials/hero/" .Site.Params.term.heroStyle ".html" }} {{ if templates.Exists $heroStyle }} @@ -26,7 +26,6 @@ <div class="min-w-0 min-h-0 max-w-prose"> {{ .Content }} </div> - {{ end }} <script> var oid = "views_term_{{ .Data.Term }}" var oid_likes = "likes_term_{{ .Data.Term }}" @@ -34,14 +33,15 @@ {{ $jsPage := resources.Get "js/page.js" }} {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }} <script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script> + {{ end }} </section> {{ if gt .Pages 0 }} - {{ $cardView := .Params.cardView | default (.Site.Params.list.cardView | default false) }} - {{ $cardViewScreenWidth := .Site.Params.list.cardViewScreenWidth | default false }} - {{ $groupByYear := .Params.groupByYear | default ($.Site.Params.list.groupByYear | default false) }} + {{ $cardView := .Params.cardView | default (.Site.Params.term.cardView | default false) }} + {{ $cardViewScreenWidth := .Site.Params.term.cardViewScreenWidth | default false }} + {{ $groupByYear := .Params.groupByYear | default ($.Site.Params.term.groupByYear | default false) }} {{ if not $cardView }} @@ -121,7 +121,7 @@ {{ else }} <section class="mt-10 prose dark:prose-invert"> <p class="py-8 border-t"> - <em>{{ i18n "list.no_articles" | emojify }}</em> + <em>{{ i18n "term.no_articles" | emojify }}</em> </p> </section> {{ end }} diff --git a/themes/blowfish/layouts/partials/analytics/main.html b/themes/blowfish/layouts/partials/analytics/main.html index 5db13e5..ab39496 100644 --- a/themes/blowfish/layouts/partials/analytics/main.html +++ b/themes/blowfish/layouts/partials/analytics/main.html @@ -6,4 +6,7 @@ {{ end }} {{ with site.Params.umamiAnalytics.websiteid }} {{ partial "analytics/umami.html" }} +{{ end }} +{{ with site.Params.selineAnalytics.token }} +{{ partial "analytics/seline.html" }} {{ end }}
\ No newline at end of file diff --git a/themes/blowfish/layouts/partials/analytics/seline.html b/themes/blowfish/layouts/partials/analytics/seline.html new file mode 100644 index 0000000..955d40a --- /dev/null +++ b/themes/blowfish/layouts/partials/analytics/seline.html @@ -0,0 +1,18 @@ +<script async src="https://cdn.seline.so/seline.js" data-token="{{ site.Params.selineAnalytics.token }}" data-id="seline-script"></script> + +{{ if .Site.Params.selineAnalytics.enableTrackEvent | default true }} +<script type="text/javascript"> + document.querySelector('script[data-id="seline-script"]') + .addEventListener('load', function () { + const type = document.head.querySelector('meta[property = "og:type"]').getAttribute('content'); + let title = document.head.querySelector('meta[property = "og:title"]').getAttribute('content'); + let url = document.head.querySelector('meta[property = "og:url"]').getAttribute('content'); + + seline.track("user:" + type + ':' + title, { + type: type, + title: title, + url: url + }); + }); +</script> +{{ end }} diff --git a/themes/blowfish/layouts/partials/analytics/umami.html b/themes/blowfish/layouts/partials/analytics/umami.html index f9fb041..96b6cb2 100644 --- a/themes/blowfish/layouts/partials/analytics/umami.html +++ b/themes/blowfish/layouts/partials/analytics/umami.html @@ -10,6 +10,7 @@ </script> {{ end }} +{{ if .Site.Params.umamiAnalytics.enableTrackEvent | default true }} <script type="text/javascript"> document.querySelector('script[data-id="umami-script"]') .addEventListener('load', function () { @@ -18,4 +19,5 @@ let url = document.head.querySelector('meta[property = "og:url"]').getAttribute('content'); umami.track(type + ':' + title, {'url': url}); }); -</script>
\ No newline at end of file +</script> +{{ end }}
\ No newline at end of file diff --git a/themes/blowfish/layouts/partials/article-meta/basic.html b/themes/blowfish/layouts/partials/article-meta/basic.html index 40d12d5..2bfcd25 100644 --- a/themes/blowfish/layouts/partials/article-meta/basic.html +++ b/themes/blowfish/layouts/partials/article-meta/basic.html @@ -19,7 +19,7 @@ {{ end }} {{ if and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial -"functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) }} +"functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) (gt (.Lastmod | time.Format "2006") 1) }} {{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }} {{ end }} @@ -96,4 +96,4 @@ </div> {{ end }} -{{ end }}
\ No newline at end of file +{{ end }} diff --git a/themes/blowfish/layouts/partials/author-links.html b/themes/blowfish/layouts/partials/author-links.html index 745c0d1..7ea84e6 100644 --- a/themes/blowfish/layouts/partials/author-links.html +++ b/themes/blowfish/layouts/partials/author-links.html @@ -1,4 +1,4 @@ -{{ with .Site.Author.links }} +{{ with .Site.Params.Author.links }} <div class="flex flex-wrap text-neutral-400 dark:text-neutral-500"> {{ range $links := . }} {{ range $name, $url := $links }} diff --git a/themes/blowfish/layouts/partials/author.html b/themes/blowfish/layouts/partials/author.html index 53fd9be..233f0e1 100644 --- a/themes/blowfish/layouts/partials/author.html +++ b/themes/blowfish/layouts/partials/author.html @@ -1,6 +1,6 @@ {{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }} <div class="flex author"> - {{ with .Site.Author.image }} + {{ with .Site.Params.Author.image }} {{ $authorImage := "" }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $authorImage = resources.GetRemote . }} @@ -12,18 +12,18 @@ {{ $authorImage = $authorImage.Fill "192x192" }} {{ end }} <img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96" - alt="{{ $.Site.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> + alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> {{ else }} {{ $authorImage := resources.GetRemote . }} {{ if not $disableImageOptimization }} {{ $authorImage = $authorImage.Fill "192x192" }} {{ end }} <img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96" - alt="{{ $.Site.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> + alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> {{ end }} {{ end }} <div class="place-self-center"> - {{ with .Site.Author.name | markdownify }} + {{ with .Site.Params.Author.name | markdownify }} <div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400"> {{ i18n "author.byline_title" | markdownify }} </div> @@ -31,7 +31,7 @@ {{ . }} </div> {{ end }} - {{ with .Site.Author.bio | markdownify }} + {{ with .Site.Params.Author.bio | markdownify }} <div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div> {{ end }} <div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div> diff --git a/themes/blowfish/layouts/partials/footer.html b/themes/blowfish/layouts/partials/footer.html index d31cecd..cce8ae9 100644 --- a/themes/blowfish/layouts/partials/footer.html +++ b/themes/blowfish/layouts/partials/footer.html @@ -31,7 +31,7 @@ {{- else }} © {{ now.Format "2006" }} - {{ .Site.Author.name | markdownify }} + {{ .Site.Params.Author.name | markdownify }} {{- end }} </p> {{ end }} diff --git a/themes/blowfish/layouts/partials/head.html b/themes/blowfish/layouts/partials/head.html index f59e9dc..a1c4b30 100644 --- a/themes/blowfish/layouts/partials/head.html +++ b/themes/blowfish/layouts/partials/head.html @@ -74,7 +74,8 @@ }}"></script> {{ end }} {{ if not .Site.Params.disableImageZoom | default true }} - <script src="{{ "js/zoom.min.js" | relURL }}"></script> + {{ $zoomJS := resources.Get "lib/zoom/zoom.min.js" | resources.Fingerprint "sha512" }} + <script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script> {{ end }} {{/* Icons */}} {{ if templates.Exists "partials/favicons.html" }} @@ -104,9 +105,9 @@ {{/* Schema */}} {{ partial "schema.html" . }} {{/* Me */}} - {{ with .Site.Author.name }} + {{ with .Site.Params.Author.name }} <meta name="author" content="{{ . }}" />{{ end }} - {{ with .Site.Author.links }} + {{ with .Site.Params.Author.links }} {{ range $links := . }} {{ range $name, $url := $links }} <link href="{{ $url }}" rel="me" />{{ end }} diff --git a/themes/blowfish/layouts/partials/header/basic.html b/themes/blowfish/layouts/partials/header/basic.html index 6b2c6fa..caf69fa 100644 --- a/themes/blowfish/layouts/partials/header/basic.html +++ b/themes/blowfish/layouts/partials/header/basic.html @@ -7,8 +7,14 @@ <a href="{{ "" | relLangURL }}" class="flex"> <span class="sr-only">{{ .Site.Title | markdownify }}</span> + {{ if eq $logo.MediaType.SubType "svg" }} + <span class="logo object-scale-down object-left nozoom"> + {{ $logo.Content | safeHTML }} + </span> + {{ else }} <img src="{{ $logo.RelPermalink }}" width="{{ div $logo.Width 2 }}" height="{{ div $logo.Height 2 }}" class="logo max-h-[5rem] max-w-[5rem] object-scale-down object-left nozoom" alt="{{ .Site.Title }}" /> + {{ end }} </a> </div> diff --git a/themes/blowfish/layouts/partials/hero/background.html b/themes/blowfish/layouts/partials/hero/background.html index 1f6e3fb..6679950 100644 --- a/themes/blowfish/layouts/partials/hero/background.html +++ b/themes/blowfish/layouts/partials/hero/background.html @@ -41,7 +41,7 @@ style="background-image:url({{ .RelPermalink }});"> {{ end }} {{ else }} - {{ with .Resize "1200x" }} + {{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }} <div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom" style="background-image:url({{ .RelPermalink }});"> {{ end }} diff --git a/themes/blowfish/layouts/partials/hero/basic.html b/themes/blowfish/layouts/partials/hero/basic.html index 4d01bb2..f192800 100644 --- a/themes/blowfish/layouts/partials/hero/basic.html +++ b/themes/blowfish/layouts/partials/hero/basic.html @@ -26,7 +26,7 @@ <div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div> {{ end }} {{ else }} - {{ with .Resize "1200x" }} + {{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }} <div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div> {{ end }} {{ end }} diff --git a/themes/blowfish/layouts/partials/hero/big.html b/themes/blowfish/layouts/partials/hero/big.html index 4b61b83..60e5977 100644 --- a/themes/blowfish/layouts/partials/hero/big.html +++ b/themes/blowfish/layouts/partials/hero/big.html @@ -48,7 +48,7 @@ </figure> {{ end }} {{ else }} - {{ with .Resize "1200x" }} + {{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }} <figure> <img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}"> {{ if $caption }} diff --git a/themes/blowfish/layouts/partials/hero/thumbAndBackground.html b/themes/blowfish/layouts/partials/hero/thumbAndBackground.html index 4b807ac..5f974c4 100644 --- a/themes/blowfish/layouts/partials/hero/thumbAndBackground.html +++ b/themes/blowfish/layouts/partials/hero/thumbAndBackground.html @@ -25,7 +25,7 @@ <div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div> {{ end }} {{ else }} -{{ with .Resize "1200x" }} +{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }} <div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div> {{ end }} {{ end }} @@ -44,7 +44,7 @@ </div> </div>{{ end }} {{ else }} -{{ with .Resize "1200x" }} +{{ with .Resize (print ($.Site.Params.backgroundImageWidth | default "1200") "x") }} <div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom" style="background-image:url({{ .RelPermalink }});"> <div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"> diff --git a/themes/blowfish/layouts/partials/home/background.html b/themes/blowfish/layouts/partials/home/background.html index 2746eea..3ba55dc 100644 --- a/themes/blowfish/layouts/partials/home/background.html +++ b/themes/blowfish/layouts/partials/home/background.html @@ -31,7 +31,7 @@ {{ end }} </div> <div class="relative px-1 py-1 flex flex-col items-center justify-center text-center"> - {{ with .Site.Author.image }} + {{ with .Site.Params.Author.image }} {{ $authorImage := "" }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $authorImage = resources.GetRemote . }} @@ -40,22 +40,22 @@ {{ end }} {{ if $authorImage }} {{ if not $disableImageOptimization }} - {{ $authorImage = $authorImage.Fill "288x288" }} + {{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }} {{ end }} <img class="mb-2 rounded-full h-36 w-36" width="144" height="144" - alt="{{ $.Site.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> + alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> {{ end }} {{ end }} <h1 class="mb-2 text-4xl font-extrabold text-neutral-800 dark:text-neutral-200"> - {{ .Site.Author.name | default .Site.Title }} + {{ .Site.Params.Author.name | default .Site.Title }} </h1> - {{ with .Site.Author.headline }} + {{ with .Site.Params.Author.headline }} <h2 class="mt-0 mb-0 text-xl text-neutral-800 dark:text-neutral-300"> {{ . | markdownify }} </h2> {{ end }} <div class="mt-3 mb-10 text-2xl"> - {{ with .Site.Author.links }} + {{ with .Site.Params.Author.links }} <div class="flex flex-wrap"> {{ range $links := . }} {{ range $name, $url := $links }} diff --git a/themes/blowfish/layouts/partials/home/hero.html b/themes/blowfish/layouts/partials/home/hero.html index 7a0a511..6f5be3a 100644 --- a/themes/blowfish/layouts/partials/home/hero.html +++ b/themes/blowfish/layouts/partials/home/hero.html @@ -28,7 +28,7 @@ {{ end }} </div> <div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center justify-center text-center"> - {{ with .Site.Author.image }} + {{ with .Site.Params.Author.image }} {{ $authorImage := "" }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $authorImage = resources.GetRemote . }} @@ -37,22 +37,22 @@ {{ end }} {{ if $authorImage }} {{ if not $disableImageOptimization }} - {{ $authorImage = $authorImage.Fill "288x288" }} + {{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }} {{ end }} <img class="mb-2 rounded-full h-36 w-36" width="144" height="144" - alt="{{ $.Site.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> + alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> {{ end }} {{ end }} <h1 class="mb-2 text-4xl font-extrabold text-neutral-200"> - {{ .Site.Author.name | default .Site.Title }} + {{ .Site.Params.Author.name | default .Site.Title }} </h1> - {{ with .Site.Author.headline }} + {{ with .Site.Params.Author.headline }} <h2 class="mt-0 mb-0 text-xl text-neutral-300"> {{ . | markdownify }} </h2> {{ end }} <div class="mt-3 mb-10 text-2xl"> - {{ with .Site.Author.links }} + {{ with .Site.Params.Author.links }} <div class="flex flex-wrap"> {{ range $links := . }} {{ range $name, $url := $links }} diff --git a/themes/blowfish/layouts/partials/home/profile.html b/themes/blowfish/layouts/partials/home/profile.html index 09e8ada..e415db1 100644 --- a/themes/blowfish/layouts/partials/home/profile.html +++ b/themes/blowfish/layouts/partials/home/profile.html @@ -3,7 +3,7 @@ h-full {{ end }} flex flex-col items-center justify-center text-center"> <header class="relative px-1 py-1 flex flex-col items-center mb-3"> - {{ with .Site.Author.image }} + {{ with .Site.Params.Author.image }} {{ $authorImage := "" }} {{ if or (strings.HasPrefix . "http:") (strings.HasPrefix . "https:") }} {{ $authorImage = resources.GetRemote . }} @@ -12,16 +12,16 @@ {{ end }} {{ if $authorImage }} {{ if not $disableImageOptimization }} - {{ $authorImage = $authorImage.Fill "288x288" }} + {{ $authorImage = $authorImage.Fill (print "288x288 q" ( $.Site.Params.Author.imagequality | default "96" )) }} {{ end }} - <img class="mb-2 rounded-full h-36 w-36" width="144" height="144" alt="{{ $.Site.Author.name | default " Author" }}" + <img class="mb-2 rounded-full h-36 w-36" width="144" height="144" alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> {{ end }} {{ end }} <h1 class="text-4xl font-extrabold"> - {{ .Site.Author.name | default .Site.Title }} + {{ .Site.Params.Author.name | default .Site.Title }} </h1> - {{ with .Site.Author.headline }} + {{ with .Site.Params.Author.headline }} <h2 class="text-xl text-neutral-500 dark:text-neutral-400"> {{ . | markdownify }} </h2> diff --git a/themes/blowfish/layouts/partials/meta/date-updated.html b/themes/blowfish/layouts/partials/meta/date-updated.html index e0fca35..949a172 100644 --- a/themes/blowfish/layouts/partials/meta/date-updated.html +++ b/themes/blowfish/layouts/partials/meta/date-updated.html @@ -1,4 +1,4 @@ -<time datetime="{{ . }}"> - {{- i18n "article.date_updated" (dict "Date" (partial "functions/date.html" .)) | markdownify -}} +<time datetime="{{ . | time.Format "2006-01-02T15:04:05-07:00" }}"> + {{- i18n "article.date_updated" (dict "Date" (partial "functions/date.html" .)) -}} </time> {{- /* Trim EOF */ -}} diff --git a/themes/blowfish/layouts/partials/meta/date.html b/themes/blowfish/layouts/partials/meta/date.html index 10a639e..1454d0b 100644 --- a/themes/blowfish/layouts/partials/meta/date.html +++ b/themes/blowfish/layouts/partials/meta/date.html @@ -1,4 +1,4 @@ -<time datetime="{{ . }}"> - {{- i18n "article.date" (dict "Date" (partial "functions/date.html" .)) | markdownify -}} +<time datetime="{{ . | time.Format "2006-01-02T15:04:05-07:00" }}"> + {{- i18n "article.date" (dict "Date" (partial "functions/date.html" .)) -}} </time> {{- /* Trim EOF */ -}} diff --git a/themes/blowfish/layouts/partials/recent-articles/main.html b/themes/blowfish/layouts/partials/recent-articles/main.html index 856cb3f..65d722b 100644 --- a/themes/blowfish/layouts/partials/recent-articles/main.html +++ b/themes/blowfish/layouts/partials/recent-articles/main.html @@ -1,5 +1,5 @@ {{ $recentArticles := 5 }} -{{ $showMoreLinkDest := "/posts" }} +{{ $showMoreLinkDest := "/posts/" }} {{ if .Site.Params.homepage.showRecent | default false }} {{ if index .Site.Params.homepage "showRecentItems" }} {{ $recentArticles = .Site.Params.homepage.showRecentItems }} diff --git a/themes/blowfish/layouts/partials/schema.html b/themes/blowfish/layouts/partials/schema.html index 77ecfa3..04e4e7a 100644 --- a/themes/blowfish/layouts/partials/schema.html +++ b/themes/blowfish/layouts/partials/schema.html @@ -11,7 +11,7 @@ {{ with .Site.Params.keywords }}"keywords": {{ . }},{{ end }} "publisher" : { "@type": "Person", - "name": "{{ .Site.Author.name | safeJS }}" + "name": "{{ .Site.Params.Author.name | safeJS }}" } } </script> @@ -30,7 +30,7 @@ "url" : "{{ .Permalink }}", "author" : { "@type": "Person", - "name": "{{ .Site.Author.name | safeJS }}" + "name": "{{ .Site.Params.Author.name | safeJS }}" }, {{ with .PublishDate }}"copyrightYear": "{{ .Format "2006" }}",{{ end }} {{ with .Date }}"dateCreated": "{{ .Format $iso8601 }}",{{ end }} diff --git a/themes/blowfish/layouts/partials/vendor.html b/themes/blowfish/layouts/partials/vendor.html index d1e77f8..b273cf3 100644 --- a/themes/blowfish/layouts/partials/vendor.html +++ b/themes/blowfish/layouts/partials/vendor.html @@ -1,5 +1,5 @@ {{/* jQuery */}} -{{ $jqueryLib := resources.Get "lib/jquery/jquery.slim.min.js" }} +{{ $jqueryLib := resources.Get "lib/jquery/jquery.slim.min.js" | resources.Fingerprint "sha512" }} <script src="{{ $jqueryLib.RelPermalink }}" integrity="{{ $jqueryLib.Data.Integrity }}"></script> {{/* Mermaid */}} @@ -46,7 +46,7 @@ {{/* TypeIt */}} {{ if .Page.HasShortcode "typeit" }} -{{ $typeitLib := resources.Get "lib/typeit/typeit.umd.js" }} +{{ $typeitLib := resources.Get "lib/typeit/typeit.umd.js" | resources.Fingerprint "sha512" }} <script defer src="{{ $typeitLib.RelPermalink }}" integrity="{{ $typeitLib.Data.Integrity }}"></script> {{ end }} @@ -68,8 +68,8 @@ {{/* youtubeLite */}} {{ if .Page.HasShortcode "youtubeLite" }} -{{ $youtubeLiteJS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.js" }} +{{ $youtubeLiteJS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.js" | resources.Fingerprint "sha512" }} {{ $youtubeLiteCSS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.css" }} <link rel="stylesheet" href="{{ $youtubeLiteCSS.RelPermalink }}" integrity="{{ $youtubeLiteCSS.Data.Integrity }}"/> <script src="{{ $youtubeLiteJS.RelPermalink }}" integrity="{{ $youtubeLiteJS.Data.Integrity }}"></script> -{{ end }}
\ No newline at end of file +{{ end }} diff --git a/themes/blowfish/layouts/shortcodes/button.html b/themes/blowfish/layouts/shortcodes/button.html index c6a4c36..8bddea1 100644 --- a/themes/blowfish/layouts/shortcodes/button.html +++ b/themes/blowfish/layouts/shortcodes/button.html @@ -2,6 +2,7 @@ class="!rounded-md bg-primary-600 px-4 py-2 !text-neutral !no-underline hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700" {{ with .Get "href" }}href="{{ . }}"{{ end }} {{ with .Get "target" }}target="{{ . }}"{{ end }} + {{ with .Get "rel" }}rel="{{ . }}"{{ end }} role="button" > {{ .Inner }} diff --git a/themes/blowfish/layouts/shortcodes/codeberg.html b/themes/blowfish/layouts/shortcodes/codeberg.html index bd52323..a6a8efa 100644 --- a/themes/blowfish/layouts/shortcodes/codeberg.html +++ b/themes/blowfish/layouts/shortcodes/codeberg.html @@ -1,6 +1,6 @@ {{ $id := delimit (slice "codeberg" (partial "functions/uid.html" .)) "-" }} {{- $codebergURL := print "https://codeberg.org/api/v1/repos/" (.Get "repo") -}} -{{- $codebergData := getJSON ($codebergURL) -}} +{{- $codebergData := resources.GetRemote $codebergURL | transform.Unmarshal -}} {{- $codebergColors := .Site.Data.codebergColors -}} {{- with $codebergData -}} @@ -34,14 +34,14 @@ <span class="text-md mr-1 text-neutral-800 dark:text-neutral"> {{ partial "icon.html" "star" }} </span> - <div id="{{ $id }}-stargazers" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> + <div id="{{ $id }}-stars_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> {{ .stars_count }} </div> <span class="text-md mr-1 text-neutral-800 dark:text-neutral"> {{ partial "icon.html" "fork" }} </span> - <div id="{{ $id }}-forks" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> + <div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> {{ .forks_count }} </div> @@ -58,7 +58,7 @@ .then(data => { document.getElementById('{{ $id }}-full_name').innerHTML = data.full_name; document.getElementById('{{ $id }}-description').innerHTML = data.description; - document.getElementById('{{ $id }}-stars_count').innerHTML = data.starts_count; + document.getElementById('{{ $id }}-stars_count').innerHTML = data.stars_count; document.getElementById('{{ $id }}-forks_count').innerHTML = data.forks_count; }) .catch(error => console.error(error)) diff --git a/themes/blowfish/layouts/shortcodes/forgejo.html b/themes/blowfish/layouts/shortcodes/forgejo.html new file mode 100644 index 0000000..689dbf8 --- /dev/null +++ b/themes/blowfish/layouts/shortcodes/forgejo.html @@ -0,0 +1,67 @@ +{{ $id := delimit (slice "forgejo" (partial "functions/uid.html" .)) "-" }} +{{- $forgejoURL := print (.Get "server" | default .Site.Params.forgejoDefaultServer) "/api/v1/repos/" (.Get "repo") -}} +{{- $forgejoData := resources.GetRemote $forgejoURL | transform.Unmarshal -}} +{{- $forgejoColors := .Site.Data.forgejoColors -}} +{{- with $forgejoData -}} + +<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer"> + <div + class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl"> + + <div class="flex items-center"> + <span class="text-2xl text-neutral-800 dark:text-neutral" style="margin-right:10px;"> + {{ partial "icon.html" "forgejo" }} + </span> + <div + id="{{ $id }}-full_name" + class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"> + {{ .full_name | markdownify }} + </div> + </div> + + <p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral"> + {{ .description | markdownify }} + </p> + + <div class="m-0 mt-2 flex items-center"> + + <span class="mr-1 inline-block h-3 w-3 rounded-full" + style="background-color: {{ if .language }} {{- index $forgejoColors .language -}} {{ else }} #0077b6 {{ end }}"></span> + <div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> + {{ if .language }} {{ .language }} {{ else }} null {{ end }} + </div> + + <span class="text-md mr-1 text-neutral-800 dark:text-neutral"> + {{ partial "icon.html" "star" }} + </span> + <div id="{{ $id }}-stars_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> + {{ .stars_count }} + </div> + + <span class="text-md mr-1 text-neutral-800 dark:text-neutral"> + {{ partial "icon.html" "fork" }} + </span> + <div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> + {{ .forks_count }} + </div> + + </div> + + </div> + <script> + fetch({{ $forgejoURL }}, { + headers: new Headers({ + 'User-agent': 'Mozilla/4.0 Custom User Agent' + }) + }) + .then(response => response.json()) + .then(data => { + document.getElementById('{{ $id }}-full_name').innerHTML = data.full_name; + document.getElementById('{{ $id }}-description').innerHTML = data.description; + document.getElementById('{{ $id }}-stars_count').innerHTML = data.stars_count; + document.getElementById('{{ $id }}-forks_count').innerHTML = data.forks_count; + }) + .catch(error => console.error(error)) + </script> +</a> +{{- end -}} diff --git a/themes/blowfish/layouts/shortcodes/gitea.html b/themes/blowfish/layouts/shortcodes/gitea.html new file mode 100644 index 0000000..f4e15d7 --- /dev/null +++ b/themes/blowfish/layouts/shortcodes/gitea.html @@ -0,0 +1,67 @@ +{{ $id := delimit (slice "gitea" (partial "functions/uid.html" .)) "-" }} +{{- $giteaURL := print (.Get "server" | default .Site.Params.giteaDefaultServer) "/api/v1/repos/" (.Get "repo") -}} +{{- $giteaData := resources.GetRemote $giteaURL | transform.Unmarshal -}} +{{- $giteaColors := .Site.Data.giteaColors -}} +{{- with $giteaData -}} + +<a id="{{ $id }}" target="_blank" href="{{ .html_url }}" class="cursor-pointer"> + <div + class="w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl"> + + <div class="flex items-center"> + <span class="text-2xl text-neutral-800 dark:text-neutral" style="margin-right:10px;"> + {{ partial "icon.html" "gitea" }} + </span> + <div + id="{{ $id }}-full_name" + class="m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"> + {{ .full_name | markdownify }} + </div> + </div> + + <p id="{{ $id }}-description" class="m-0 mt-2 text-md text-neutral-800 dark:text-neutral"> + {{ .description | markdownify }} + </p> + + <div class="m-0 mt-2 flex items-center"> + + <span class="mr-1 inline-block h-3 w-3 rounded-full" + style="background-color: {{ if .language }} {{- index $giteaColors .language -}} {{ else }} #0077b6 {{ end }}"></span> + <div class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> + {{ if .language }} {{ .language }} {{ else }} null {{ end }} + </div> + + <span class="text-md mr-1 text-neutral-800 dark:text-neutral"> + {{ partial "icon.html" "star" }} + </span> + <div id="{{ $id }}-stars_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> + {{ .stars_count }} + </div> + + <span class="text-md mr-1 text-neutral-800 dark:text-neutral"> + {{ partial "icon.html" "fork" }} + </span> + <div id="{{ $id }}-forks_count" class="m-0 mr-5 text-md text-neutral-800 dark:text-neutral"> + {{ .forks_count }} + </div> + + </div> + + </div> + <script> + fetch({{ $giteaURL }}, { + headers: new Headers({ + 'User-agent': 'Mozilla/4.0 Custom User Agent' + }) + }) + .then(response => response.json()) + .then(data => { + document.getElementById('{{ $id }}-full_name').innerHTML = data.full_name; + document.getElementById('{{ $id }}-description').innerHTML = data.description; + document.getElementById('{{ $id }}-stars_count').innerHTML = data.stars_count; + document.getElementById('{{ $id }}-forks_count').innerHTML = data.forks_count; + }) + .catch(error => console.error(error)) + </script> +</a> +{{- end -}} diff --git a/themes/blowfish/layouts/shortcodes/github.html b/themes/blowfish/layouts/shortcodes/github.html index 2daecd6..5614697 100644 --- a/themes/blowfish/layouts/shortcodes/github.html +++ b/themes/blowfish/layouts/shortcodes/github.html @@ -1,6 +1,6 @@ {{ $id := delimit (slice "github" (partial "functions/uid.html" .)) "-" }} {{- $githubURL := print "https://api.github.com/repos/" (.Get "repo") -}} -{{- $githubData := getJSON ($githubURL) -}} +{{- $githubData := resources.GetRemote $githubURL | transform.Unmarshal -}} {{- $githubColors := .Site.Data.githubColors -}} {{- with $githubData -}} diff --git a/themes/blowfish/layouts/shortcodes/gitlab.html b/themes/blowfish/layouts/shortcodes/gitlab.html index 5b6153c..12f0880 100644 --- a/themes/blowfish/layouts/shortcodes/gitlab.html +++ b/themes/blowfish/layouts/shortcodes/gitlab.html @@ -1,7 +1,7 @@ {{ $id := delimit (slice "gitlab" (partial "functions/uid.html" .)) "-" }} {{- $gitlabURL := print (default "https://gitlab.com/" (.Get "baseURL")) "api/v4/projects/" (.Get "projectID") -}} -{{- $gitLabData := getJSON ($gitlabURL) -}} +{{- $gitLabData := resources.GetRemote $gitlabURL | transform.Unmarshal -}} {{- with $gitLabData -}} <a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer"> diff --git a/themes/blowfish/package-lock.json b/themes/blowfish/package-lock.json index 2bb3569..55b793f 100644 --- a/themes/blowfish/package-lock.json +++ b/themes/blowfish/package-lock.json @@ -1,12 +1,12 @@ { "name": "hugo-blowfish-theme", - "version": "2.74.0", + "version": "2.76.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hugo-blowfish-theme", - "version": "2.74.0", + "version": "2.76.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -17,23 +17,23 @@ "commander": "^12.1.0" }, "devDependencies": { - "@tailwindcss/typography": "^0.5.13", + "@tailwindcss/typography": "^0.5.14", "chart.js": "^4.4.3", "fuse.js": "^7.0.0", "jquery": "^3.7.1", "katex": "^0.16.11", - "lite-youtube-embed": "^0.3.2", + "lite-youtube-embed": "^0.3.3", "mermaid": "^10.9.1", "packery": "^2.1.2", - "prettier": "^3.3.2", + "prettier": "^3.3.3", "prettier-plugin-go-template": "^0.0.15", - "prettier-plugin-tailwindcss": "^0.6.5", - "puppeteer": "^22.13.0", + "prettier-plugin-tailwindcss": "^0.6.6", + "puppeteer": "^23.2.0", "rimraf": "^6.0.1", "tailwind-scrollbar": "^3.1.0", - "tailwindcss": "^3.4.6", + "tailwindcss": "^3.4.10", "tw-elements": "2.0.0", - "typeit": "^8.8.3", + "typeit": "^8.8.4", "vendor-copy": "^3.0.1" } }, @@ -297,19 +297,19 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.3.tgz", - "integrity": "sha512-bJ0UBsk0ESOs6RFcLXOt99a3yTDcOKlzfjad+rhFwdaG1Lu/Wzq58GHYCDTlZ9z6mldf4g+NTb+TXEfe0PpnsQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.1.tgz", + "integrity": "sha512-uK7o3hHkK+naEobMSJ+2ySYyXtQkBxIH8Gn4MK9ciePjNV+Pf+PgY/W7iPzn2MTjl3stcYB5AlcTmPYw7AXDwA==", "dev": true, "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.4.0", - "semver": "7.6.0", - "tar-fs": "3.0.5", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.2" + "debug": "^4.3.6", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" @@ -415,9 +415,9 @@ } }, "node_modules/@tailwindcss/typography": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.13.tgz", - "integrity": "sha512-ADGcJ8dX21dVVHIwTRgzrcunY6YY9uSlAHHGVKvkA+vLc5qLwEszvKts40lx7z0qc4clpjclwLeK5rVCV2P/uw==", + "version": "0.5.14", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.14.tgz", + "integrity": "sha512-ZvOCjUbsJBjL9CxQBn+VEnFpouzuKhxh2dH8xMIWHILL+HfOYtlAkWcyoon8LlzE53d2Yo6YO6pahKKNW3q1YQ==", "dev": true, "dependencies": { "lodash.castarray": "^4.4.0", @@ -506,13 +506,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.14.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", - "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "version": "22.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.1.tgz", + "integrity": "sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==", "dev": true, "optional": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/unist": { @@ -661,9 +661,9 @@ } }, "node_modules/bare-stream": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.1.3.tgz", - "integrity": "sha512-tiDAH9H/kP+tvNO5sczyn9ZAA7utrSMobyDchsnyyXBuUe2FSQWbxhtuHB8jwpHYYevVo2UJpcmvvjrbHboUUQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.2.0.tgz", + "integrity": "sha512-+o9MG5bPRRBlkVSpfFlMag3n7wMaIZb4YZasU2+/96f+3HTQ4F9DKQeu3K/Sjz1W0umu6xvVq1ON0ipWdMlr3A==", "dev": true, "optional": true, "dependencies": { @@ -878,9 +878,9 @@ } }, "node_modules/chromium-bidi": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.0.tgz", - "integrity": "sha512-VnxVrpGojAjkiGFN2I+KtsDILFAjiGWVEDizOEnKzEDkT93eQT1cqTfUkqmOyLq33i1q4a1KDYbH+52CUe4Ufw==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.4.tgz", + "integrity": "sha512-8zoq6ogmhQQkAKZVKO2ObFTl4uOkqoX1PlKQX3hZQ5E9cbUotcAb7h4pTNVAGGv8Z36PF3CtdOriEp/Rz82JqQ==", "dev": true, "dependencies": { "mitt": "3.0.1", @@ -1578,9 +1578,9 @@ "dev": true }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1646,9 +1646,9 @@ "dev": true }, "node_modules/devtools-protocol": { - "version": "0.0.1299070", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz", - "integrity": "sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg==", + "version": "0.0.1330662", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1330662.tgz", + "integrity": "sha512-pzh6YQ8zZfz3iKlCvgzVCu22NdpZ8hNmwU6WnQjNVquh0A9iVosPtNLWDwaWVGyrntQlltPFztTMK5Cg6lfCuw==", "dev": true }, "node_modules/didyoumean": { @@ -2372,9 +2372,9 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/lite-youtube-embed": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/lite-youtube-embed/-/lite-youtube-embed-0.3.2.tgz", - "integrity": "sha512-b1dgKyF4PHhinonmr3PB172Nj0qQgA/7DE9EmeIXHR1ksnFEC2olWjNJyJGdsN2cleKHRjjsmrziKlwXtPlmLQ==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lite-youtube-embed/-/lite-youtube-embed-0.3.3.tgz", + "integrity": "sha512-gFfVVnj6NRjxVfJKo3qoLtpi0v5mn3AcR4eKD45wrxQuxzveFJUb+7Cr6uV6n+DjO8X3p0UzPPquhGt0H/y+NA==", "dev": true }, "node_modules/lodash": { @@ -3320,9 +3320,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/prettier": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", - "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -3350,9 +3350,9 @@ } }, "node_modules/prettier-plugin-tailwindcss": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.5.tgz", - "integrity": "sha512-axfeOArc/RiGHjOIy9HytehlC0ZLeMaqY09mm8YCkMzznKiDkwFzOpBvtuhuv3xG5qB73+Mj7OCe2j/L1ryfuQ==", + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.6.tgz", + "integrity": "sha512-OPva5S7WAsPLEsOuOWXATi13QrCKACCiIonFgIR6V4lYv4QLp++UXVhZSzRbZxXGimkQtQT86CC6fQqTOybGng==", "dev": true, "engines": { "node": ">=14.21.3" @@ -3369,6 +3369,7 @@ "prettier-plugin-import-sort": "*", "prettier-plugin-jsdoc": "*", "prettier-plugin-marko": "*", + "prettier-plugin-multiline-arrays": "*", "prettier-plugin-organize-attributes": "*", "prettier-plugin-organize-imports": "*", "prettier-plugin-sort-imports": "*", @@ -3406,6 +3407,9 @@ "prettier-plugin-marko": { "optional": true }, + "prettier-plugin-multiline-arrays": { + "optional": true + }, "prettier-plugin-organize-attributes": { "optional": true }, @@ -3477,57 +3481,43 @@ } }, "node_modules/puppeteer": { - "version": "22.13.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.13.0.tgz", - "integrity": "sha512-nmICzeHTBtZiu+y4vs0fboe/NKIFwH5W8RZuxmEVAKNfBQg/8u5FEQAvPlWmyVpJoAVM5kXD5PEl3GlK3F9pPA==", + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.2.0.tgz", + "integrity": "sha512-MP7kLOdCfx1BJaGN5sgRo5fTYwAyGrlwWtrNphjKcwv/HO91+m90gbbwpRHbGl0rCvrmylq6vljn+zrjukniVg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@puppeteer/browsers": "2.2.3", + "@puppeteer/browsers": "2.3.1", + "chromium-bidi": "0.6.4", "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1299070", - "puppeteer-core": "22.13.0" + "devtools-protocol": "0.0.1330662", + "puppeteer-core": "23.2.0", + "typed-query-selector": "^2.12.0" }, "bin": { - "puppeteer": "lib/esm/puppeteer/node/cli.js" + "puppeteer": "lib/cjs/puppeteer/node/cli.js" }, "engines": { "node": ">=18" } }, "node_modules/puppeteer-core": { - "version": "22.13.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.13.0.tgz", - "integrity": "sha512-ZkpRX8nm/S39BnpcCverMzIc6oGWBPOUeOeaWRLKHqiKVCZ1l28HxPTYLitJlDiB16xZATSKpjul+sl+ZEm0HQ==", + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.2.0.tgz", + "integrity": "sha512-OFyPp2oolGSesx6ZrpmorE5tCaCKY1Z5e/h8f6sB0NpiezenB72jdWBdOrvBO/bUXyq14XyGJsDRUsv0ZOPdZA==", "dev": true, "dependencies": { - "@puppeteer/browsers": "2.2.3", - "chromium-bidi": "0.6.0", - "debug": "^4.3.5", - "devtools-protocol": "0.0.1299070", + "@puppeteer/browsers": "2.3.1", + "chromium-bidi": "0.6.4", + "debug": "^4.3.6", + "devtools-protocol": "0.0.1330662", + "typed-query-selector": "^2.12.0", "ws": "^8.18.0" }, "engines": { "node": ">=18" } }, - "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3721,13 +3711,10 @@ } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -3735,18 +3722,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -3843,9 +3818,9 @@ "dev": true }, "node_modules/streamx": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz", - "integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.19.0.tgz", + "integrity": "sha512-5z6CNR4gtkPbwlxyEqoDGDmWIzoNJqCBt4Eac1ICP9YaIT08ct712cFj0u1rx4F8luAuL+3Qc+RFIdI4OX00kg==", "dev": true, "dependencies": { "fast-fifo": "^1.3.2", @@ -4067,9 +4042,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.4.6", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.6.tgz", - "integrity": "sha512-1uRHzPB+Vzu57ocybfZ4jh5Q3SdlH7XW23J5sQoM9LhE9eIOlzxer/3XPSsycvih3rboRsvt0QCmzSrqyOYUIA==", + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.10.tgz", + "integrity": "sha512-KWZkVPm7yJRhdu4SRSl9d4AK2wM3a50UsvgHZO7xY77NQr2V+fIrEuoDGQcbvswWvFGbS2f6e+jC/6WJm1Dl0w==", "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -4185,9 +4160,9 @@ } }, "node_modules/tar-fs": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", - "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dev": true, "dependencies": { "pump": "^3.0.0", @@ -4279,10 +4254,16 @@ "integrity": "sha512-aiitkqzmCZIZ9zJr3V6ErVzU/CrKoAkptpv94t0pEKnVn2Ah4jOplXOO/v6Fo9jr3PoTA5dxvlyS4w8rnW/iag==", "dev": true }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "dev": true + }, "node_modules/typeit": { - "version": "8.8.3", - "resolved": "https://registry.npmjs.org/typeit/-/typeit-8.8.3.tgz", - "integrity": "sha512-K7nChkj6iyylUi713VBDULUXXLF0pfB6nFPVhNnXTKO2An7NzVz5fjoAHk2FAC3TFLiSnU+QsqhDmap17oBELw==", + "version": "8.8.4", + "resolved": "https://registry.npmjs.org/typeit/-/typeit-8.8.4.tgz", + "integrity": "sha512-bD4/PNthsYj5ObPKqkARnYA7NStbYzZDe8g5odXACmFw2HKEDWSUPv275lblz6E8REr+Ji6oll/AHKmD2ONMYA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -4320,9 +4301,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true, "optional": true }, @@ -4552,12 +4533,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/themes/blowfish/package.json b/themes/blowfish/package.json index 17355bc..8e3e361 100644 --- a/themes/blowfish/package.json +++ b/themes/blowfish/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.74.0", + "version": "2.76.0", "description": "Blowfish theme for Hugo.", "scripts": { "postinstall": "vendor-copy", @@ -34,23 +34,23 @@ }, "homepage": "https://github.com/nunocoracao/blowfish#readme", "devDependencies": { - "@tailwindcss/typography": "^0.5.13", + "@tailwindcss/typography": "^0.5.14", "chart.js": "^4.4.3", "fuse.js": "^7.0.0", "jquery": "^3.7.1", "katex": "^0.16.11", - "lite-youtube-embed": "^0.3.2", + "lite-youtube-embed": "^0.3.3", "mermaid": "^10.9.1", "packery": "^2.1.2", - "prettier": "^3.3.2", + "prettier": "^3.3.3", "prettier-plugin-go-template": "^0.0.15", - "prettier-plugin-tailwindcss": "^0.6.5", - "puppeteer": "^22.13.0", + "prettier-plugin-tailwindcss": "^0.6.6", + "puppeteer": "^23.2.0", "rimraf": "^6.0.1", "tailwind-scrollbar": "^3.1.0", - "tailwindcss": "^3.4.6", + "tailwindcss": "^3.4.10", "tw-elements": "2.0.0", - "typeit": "^8.8.3", + "typeit": "^8.8.4", "vendor-copy": "^3.0.1" }, "vendorCopy": [], diff --git a/themes/blowfish/release-versions/hugo-latest.txt b/themes/blowfish/release-versions/hugo-latest.txt index b0a3cb6..6518afc 100644 --- a/themes/blowfish/release-versions/hugo-latest.txt +++ b/themes/blowfish/release-versions/hugo-latest.txt @@ -1 +1 @@ -v0.128.2 +v0.133.1 |