diff options
author | amzrk2 | 2020-07-25 18:24:04 +0800 |
---|---|---|
committer | amzrk2 | 2020-07-25 18:24:04 +0800 |
commit | 73a776cccb9d1a993da6910c20166bafdd5c731e (patch) | |
tree | f4b38ce351315df6d13aa45ef303f49b2e2a6986 | |
parent | 62ae83b7513c2c6c8bd857b7ed5f9f2f47512b43 (diff) | |
download | hugo-theme-fuji-73a776cccb9d1a993da6910c20166bafdd5c731e.tar.gz hugo-theme-fuji-73a776cccb9d1a993da6910c20166bafdd5c731e.tar.bz2 hugo-theme-fuji-73a776cccb9d1a993da6910c20166bafdd5c731e.zip |
Update README
-rw-r--r-- | .github/stale.yml | 17 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | README_CN.md | 37 | ||||
-rw-r--r-- | layouts/partials/scripts-front.html | 34 | ||||
-rw-r--r-- | static/ie/favicon.ico | bin | 15086 -> 0 bytes | |||
-rw-r--r-- | static/ie/firefox.png | bin | 39072 -> 0 bytes | |||
-rw-r--r-- | static/ie/index.html | 123 |
7 files changed, 50 insertions, 165 deletions
diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index fbc7b42..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 14 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 5 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security -# Label to use when marking an issue as stale -staleLabel: wontfix -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: true @@ -20,7 +20,7 @@ Now supported i18n langs: en, zh-hans, zh-hant, ja, nl, pt-pt. Check the i18n fo - [🎨 Favicon](#-favicon) - [❌ License, toc und comments](#-license-toc-und-comments) - [🎵 APlayer](#-aplayer) - - [📐 Render LaTeX with KaTex](#-image-zoom-and-lazyload-settings) + - [📐 Render LaTeX with KaTex](#-render-latex-with-katex) - [📷 Image zoom and lazyload settings](#-image-zoom-and-lazyload-settings) - [⚓ Markdown render hook](#-markdown-render-hook) - [📨 Comments area](#-comments-area) @@ -150,6 +150,8 @@ Inline style: {{</ math >}} ``` +Don't forget to add `math = true` in your front matter or `config.toml`. + ### 📷 Image zoom and lazyload settings Zoomable, not lazyloaded: diff --git a/README_CN.md b/README_CN.md index 52200ab..e5a135d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -20,6 +20,7 @@ - [🎨 站点图标](#-站点图标) - [❌ License、目录和评论区](#-license目录和评论区) - [🎵 文章音乐](#-文章音乐) + - [📐 LaTeX 渲染](#-latex-渲染) - [📷 图片放大的设置和 lazyload](#-图片放大的设置和-lazyload) - [⚓ Markdown 钩子](#-markdown-钩子) - [📨 评论区](#-评论区) @@ -105,6 +106,42 @@ showComments = false # 对这篇文章关闭评论 playerCover = "..." ``` +### 📐 LaTeX 渲染 + +You can write LaTeX directly in markdown with escape characters: + +```txt +$$ +\begin{matrix} + a & b \\\\ c & d +\end{matrix} +$$ +``` + +Or use the short code, display style: + +```txt +{{< math >}} +\begin{matrix} + a & b \\ + c & d +\end{matrix} +{{</ math >}} +``` + +Inline style: + +```txt +{{< math "inline" >}} +\begin{matrix} + a & b \\ + c & d +\end{matrix} +{{</ math >}} +``` + +Don't forget to add `math = true` in your front matter or `config.toml`. + ### 📷 图片放大的设置和 lazyload 可放大,非 lazyload: diff --git a/layouts/partials/scripts-front.html b/layouts/partials/scripts-front.html index 6b4d78b..c28912a 100644 --- a/layouts/partials/scripts-front.html +++ b/layouts/partials/scripts-front.html @@ -1,27 +1,13 @@ <script data-cfasync="false"> - // detect theme data in localStorage - var fujiThemeData = localStorage.getItem('fuji_data-theme'); - // if first look, set theme mode to auto - if (!fujiThemeData) { - localStorage.setItem('fuji_data-theme', 'auto'); - } else { - // if not auto mode, change the data-theme attribute of body - if (fujiThemeData !== 'auto') { - document.body.setAttribute('data-theme', fujiThemeData === 'dark' ? 'dark' : 'light'); - } + // detect theme data in localStorage + var fujiThemeData = localStorage.getItem('fuji_data-theme'); + // if first look, set theme mode to auto + if (!fujiThemeData) { + localStorage.setItem('fuji_data-theme', 'auto'); + } else { + // if not auto mode, change the data-theme attribute of body + if (fujiThemeData !== 'auto') { + document.body.setAttribute('data-theme', fujiThemeData === 'dark' ? 'dark' : 'light'); } + } </script> -<script data-cfasync="false"> - // ie detection - function browserDetection(ua) { - if (ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0) { - return true; - } - return false; - } - - var ua = window.navigator.userAgent; - if (browserDetection(ua)) { - window.location.href('{{ "/ie/" | absURL }}'); - } -</script>
\ No newline at end of file diff --git a/static/ie/favicon.ico b/static/ie/favicon.ico Binary files differdeleted file mode 100644 index 9204300..0000000 --- a/static/ie/favicon.ico +++ /dev/null diff --git a/static/ie/firefox.png b/static/ie/firefox.png Binary files differdeleted file mode 100644 index eca759d..0000000 --- a/static/ie/firefox.png +++ /dev/null diff --git a/static/ie/index.html b/static/ie/index.html deleted file mode 100644 index 77528cf..0000000 --- a/static/ie/index.html +++ /dev/null @@ -1,123 +0,0 @@ -<!DOCTYPE html> -<html> - -<head> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> - <meta name="HandheldFriendly" content="True" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta http-equiv="Cache-Control" content="no-transform" /> - <meta http-equiv="Cache-Control" content="no-siteapp" /> - - <link rel="shortcut icon" href="favicon.ico" /> - <title>BROWSER NOT SUPPORT - Fuji</title> - - <style> - body { - text-align: center; - font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Helvetica", "Arial", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "Source Han Sans SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; - font-size: 16px; - background-color: #8aa2d3; - color: #fffffd; - margin: 0 1em; - } - - h1 { - margin: 1em 0; - } - - .browser-meta { - margin: 0 0 2em 0; - font-family: 'Cascadia Code', 'Cascadia Mono', 'SF Mono', 'Fira Code', 'Noto Mono', 'Consolas', monospace; - font-size: 0.875em; - } - - .info { - margin: 0 0 1em 0; - } - - .info p { - margin: 0.25em 0; - } - - .links { - margin: 0.5em 0; - } - - .firefox { - display: inline-block; - cursor: pointer; - border-radius: 5px; - } - - .firefox:hover { - color: #8aa2d3; - background-color: #fffffd; - } - - .firefox img { - display: block; - width: 5em; - margin: 1em 1em 0 1em; - } - - .firefox span { - display: block; - margin: 0 0 1em 0; - } - </style> - <script> - var ua = window.navigator.userAgent; - /* - function browserDetection() { - if (ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0 || ua.indexOf('Edge/') > 0) { - return true; - } - return false; - } - - if (browserDetection()) { - window.location.href('/alert-browser/'); - } - */ - </script> -</head> - -<body> - <main> - <h1>BROWSER NOT SUPPORT</h1> - <div class="browser-meta"> - <span>Checking your browser...</span> - </div> - <div class="info"> - <p>您的网页浏览器已过期</p> - <p>Your web browser is out of date</p> - <p>お使いのブラウザは最新版ではございません</p> - </div> - <div class="info"> - <p>请下载一款免费而优秀的最新版浏览器</p> - <p>Please download one of these up-to-date, free and excellent browsers</p> - <p>以下の最新バージョンで、無料で、素晴らしいブラウザをダウンロードしてください</p> - </div> - <div class="links"> - <div class="firefox"> - <img src="firefox.png" alt="Firefox Logo" /> - <span>Firefox</span> - </div> - </div> - <div class="info"> - <p>我们强烈推荐 Mozilla 基金会提供的 Firefox 浏览器</p> - <p>We highly recommend Firefox browser provided by Mozilla Foundation</p> - <p>Mozilla Foundation が提供する Firefox ブラウザを強くお勧めします</p> - </div> - </main> - - <script> - document.querySelector('.browser-meta span').textContent = ua; - document.querySelector('.firefox').addEventListener('click', function () { - window.location.href = "https://www.mozilla.org/firefox/new/"; - }); - </script> -</body> - -</html>
\ No newline at end of file |