Compare commits

...

27 Commits

Author SHA1 Message Date
Nuno Coração
165ee8c230 Merge pull request #256 from nunocoracao/dev
🔖 Release new version v2.14.0
2022-11-18 23:10:24 +00:00
Nuno Coração
ae18817eb0 final 2022-11-18 23:07:59 +00:00
Nuno Coração
aa4f5aa80b Merge pull request #263 from nunocoracao/260-fixed-bug-create-by-httpsgithubcomnunocoracaoblowfishpull249
🐛 Fixed bug create by https://github.com/nunocoracao/blowfish/pull/249
2022-11-18 22:59:40 +00:00
Nuno Coração
981204d58e fixed bug 2022-11-18 22:58:59 +00:00
Nuno Coração
51adb817fa Merge pull request #262 from nunocoracao/252-show-more-is-not-being-pulled-from-i18n-dictionaries
🐛 Show more is not being pulled from i18n dictionaries
2022-11-18 22:31:45 +00:00
Nuno Coração
fc81fa2130 updated reference to dict 2022-11-18 22:30:21 +00:00
Nuno Coração
460c0b76e3 Merge pull request #261 from nunocoracao/259-add-new-workflows
🚧 Add new workflows
2022-11-18 22:28:02 +00:00
Nuno Coração
051c303e6c added build and test actions 2022-11-18 22:25:59 +00:00
Nuno Coração
0caa9b899e Merge pull request #258 from nunocoracao/255-arrow_up-support-for-new-hugo-version-01060
⬆️ Support for new Hugo version 0.106.0
2022-11-18 22:17:58 +00:00
Nuno Coração
c6fe30b029 updated hugo version 2022-11-18 22:17:07 +00:00
Nuno Coração
2cb7d96bc7 updated version 2022-11-18 22:03:49 +00:00
Nuno Coração
dacb87679a Merge pull request #253 from Moonlington/patch-1
👥 ADD: User to user list
2022-11-18 11:06:29 +00:00
Moonlington
1409d376f6 ADD: User to user list
I wanted to add my personal site to the list as well.
2022-11-17 22:31:30 +01:00
Nuno Coração
dcf72e72bf Merge pull request #249 from chrisbanes/cb/sharing-links-ui
Improve visuals of sharing links
2022-11-17 12:46:29 +00:00
Chris Banes
ff0f9d122f Use p-1.5 instead 2022-11-17 10:19:08 +00:00
Chris Banes
9993c53476 Update icons to use p-2 2022-11-17 10:05:20 +00:00
Chris Banes
3a4e976273 Improve visuals of sharing links 2022-11-16 13:46:39 +00:00
Nuno Coração
6f594b5c2b Merge pull request #248 from nunocoracao/dependabot/npm_and_yarn/dev/chart.js-4.0.1 2022-11-15 08:01:12 +00:00
dependabot[bot]
686ec53f92 📌 Bump chart.js from 3.9.1 to 4.0.1
Bumps [chart.js](https://github.com/chartjs/Chart.js) from 3.9.1 to 4.0.1.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v3.9.1...v4.0.1)

---
updated-dependencies:
- dependency-name: chart.js
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 05:13:21 +00:00
Nuno Coração
ea0a6c3698 Merge pull request #247 from nunocoracao/dev
Dev
2022-11-14 20:54:42 +00:00
Nuno Coração
6e4ed17ab7 tested and prepd release version 2022-11-14 20:53:56 +00:00
Nuno Coração
d889efa6d4 Merge pull request #246 from chrisbanes/cb/sharing-links
Allow overwriting of sharing links
2022-11-14 20:45:19 +00:00
Nuno Coração
0d9f458c52 Merge pull request #244 from nunocoracao/dependabot/npm_and_yarn/dev/tailwindcss-3.2.4
📌 Bump tailwindcss from 3.2.3 to 3.2.4
2022-11-14 20:44:44 +00:00
Nuno Coração
7e3a8c1226 Merge pull request #243 from vorons/patch-1
Create ru.yaml
2022-11-14 20:44:26 +00:00
Chris Banes
cc1c2d70e0 Allow overwriting of sharing links
This PR changes this by grouping the links within an object key: `Site.Data.sharing.links`. This means that sites can provide their own
`data/sharing.json` file and overwrite the `links` key, to provide links of their own links.
2022-11-14 09:53:48 +00:00
dependabot[bot]
de2d75eee9 📌 Bump tailwindcss from 3.2.3 to 3.2.4
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 05:12:02 +00:00
Сергей Ворон
dbcce7f34b Create ru.yaml 2022-11-14 07:46:55 +03:00
19 changed files with 228 additions and 76 deletions

54
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Build Theme
on: [pull_request_target]
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: "${{ github.head_ref }}"
- name: Install dependencies and Build Theme
uses: actions/setup-node@v3
- run: npm install
- run: npm run assets
- name: Commit and push Chart.js changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: "${{ github.head_ref }}"
push_options: "--dry-run"
file_pattern: "assets/lib/chart/*"
commit_message: "📦 Update packaged ChartJS"
- name: Commit Fuse changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: "${{ github.head_ref }}"
push_options: "--dry-run"
file_pattern: "assets/lib/fuse/*"
commit_message: "📦 Update packaged FuseJS"
- name: Commit KaTeX changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: "${{ github.head_ref }}"
push_options: "--dry-run"
file_pattern: "assets/lib/katex/*"
commit_message: "📦 Update packaged KaTeX"
- name: Commit Mermaid changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: "${{ github.head_ref }}"
push_options: "--dry-run"
file_pattern: "assets/lib/mermaid/*"
commit_message: "📦 Update packaged Mermaid"
- run: npm run build
- name: Commit CSS changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: "${{ github.head_ref }}"
push_options: "--dry-run"
file_pattern: "assets/css/compiled/main.css"
commit_message: "💄 Rebuild CSS"
- run: git push

25
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Test Build
on: [push]
jobs:
build:
name: Build Example Site
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
- name: Build
working-directory: ./exampleSite
run: hugo --minify --themesDir ../.. --baseURL https://nunocoracao.github.io/blowfish/

View File

@@ -1,6 +1,6 @@
/*! Blowfish | MIT License | https://github.com/nunocoracao/blowfish */
/*! tailwindcss v3.2.3 | MIT License | https://tailwindcss.com */
/*! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com */
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
@@ -1550,10 +1550,6 @@ select {
min-width: 1.8rem;
}
.min-w-\[2\.4rem\] {
min-width: 2.4rem;
}
.min-w-\[220px\] {
min-width: 220px;
}
@@ -1870,6 +1866,10 @@ select {
padding: 1rem;
}
.p-1\.5 {
padding: 0.375rem;
}
.p-1 {
padding: 0.25rem;
}

File diff suppressed because one or more lines are too long

View File

@@ -2,4 +2,4 @@
[module.hugoVersion]
extended = true
min = "0.87.0 "
max = "0.105.0"
max = "0.106.0"

View File

@@ -1,32 +1,34 @@
{
"email": {
"icon": "email",
"title": "sharing.email",
"url": "mailto:?body=%s&subject=%s"
},
"facebook": {
"icon": "facebook",
"title": "sharing.facebook",
"url": "https://www.facebook.com/sharer/sharer.php?u=%s&quote=%s"
},
"linkedin": {
"icon": "linkedin",
"title": "sharing.linkedin",
"url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
},
"pinterest": {
"icon": "pinterest",
"title": "sharing.pinterest",
"url": "https://pinterest.com/pin/create/bookmarklet/?url=%s&description=%s"
},
"reddit": {
"icon": "reddit",
"title": "sharing.reddit",
"url": "https://reddit.com/submit/?url=%s&resubmit=true&title=%s"
},
"twitter": {
"icon": "twitter",
"title": "sharing.twitter",
"url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
"links": {
"email": {
"icon": "email",
"title": "sharing.email",
"url": "mailto:?body=%s&subject=%s"
},
"facebook": {
"icon": "facebook",
"title": "sharing.facebook",
"url": "https://www.facebook.com/sharer/sharer.php?u=%s&quote=%s"
},
"linkedin": {
"icon": "linkedin",
"title": "sharing.linkedin",
"url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
},
"pinterest": {
"icon": "pinterest",
"title": "sharing.pinterest",
"url": "https://pinterest.com/pin/create/bookmarklet/?url=%s&description=%s"
},
"reddit": {
"icon": "reddit",
"title": "sharing.reddit",
"url": "https://reddit.com/submit/?url=%s&resubmit=true&title=%s"
},
"twitter": {
"icon": "twitter",
"title": "sharing.twitter",
"url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
}
}
}

View File

@@ -97,7 +97,7 @@ mainSections = ["docs"]
[buymeacoffee]
identifier = "nunocoracao"
globalWidget = true
globalWidgetMessage = "Thank you for visiting."
globalWidgetMessage = ""
globalWidgetColor = "#FFDD00"
globalWidgetPosition = "Right"

64
i18n/ru.yaml Normal file
View File

@@ -0,0 +1,64 @@
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 }} нравится"
author:
byline_title: "Автор"
code:
copy: "Копировать"
copied: "Скопировано"
error:
404_title: "Страница не найдена: в замешательстве:"
404_error: "Ошибка 404"
404_description: "Похоже, запрошенная вами страница не существует."
footer:
dark_appearance: "Переключить на темный вид"
light_appearance: "Переключить на светлый вид"
powered_by: "Работает на {{ .Hugo }} &amp; {{ .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: "Поделиться через Facebook"
linkedin: "Поделиться через LinkedIn"
pinterest: "PДобавить в Pinterest"
reddit: "Отправить в Reddit"
twitter: "Твитнуть в Twitter"
shortcode:
recent_articles: "Недавние"
recent:
show_more: "Показать еще"

View File

@@ -25,7 +25,7 @@
{{ range .data.social }}
{{ range $name, $link := . }}
<a class="px-1 hover:text-primary-700 dark:hover:text-primary-400" href="{{ $link }}" target="_blank"
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial "icon.html" $name }}</a>
aria-label="{{ $name | title }}" rel="me noopener noreferrer"><span class="inline-block align-text-bottom">{{ partial "icon.html" $name }}</span></a>
{{ end }}
{{ end }}
</div>

View File

@@ -8,7 +8,7 @@
target="_blank"
aria-label="{{ $name | title }}"
rel="me noopener noreferrer"
>{{ partial "icon.html" $name }}</a
><span class="inline-block align-text-bottom">{{ partial "icon.html" $name }}</span></a
>
{{ end }}
{{ end }}

View File

@@ -1,6 +1,6 @@
{{ $icon := resources.Get (print "icons/" . ".svg") }}
{{ if $icon }}
<span class="relative inline-block align-text-bottom icon">
<span class="relative block icon">
{{ $icon.Content | safeHTML }}
</span>
{{ end }}

View File

@@ -13,7 +13,7 @@
rel="noopener noreferrer"
target="_blank"
title="{{ i18n "article.edit_title" }}"
>{{ partial "icon.html" "edit" }}</a
><span class="inline-block align-text-bottom">{{ partial "icon.html" "edit" }}</span></a
>
</span>
{{- /* Trim EOF */ -}}

View File

@@ -1,5 +1,5 @@
<span>
<span id="likes_{{ .File.Path }}" title="likes">0</span>
<span>{{ partial "icon.html" "heart" }}</span>
<span class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }}</span>
</span>
{{- /* Trim EOF */ -}}

View File

@@ -2,8 +2,8 @@
<button id="likes_button"
class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
onclick="process_article()">
<span id="likes_button_heart" style="display:none">{{ partial "icon.html" "heart" }} </span>
<span id="likes_button_emtpty_heart">{{ partial "icon.html" "heart-empty" }}</span>
<span id="likes_button_heart" style="display:none" class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }} </span>
<span id="likes_button_emtpty_heart" class="inline-block align-text-bottom">{{ partial "icon.html" "heart-empty" }}</span>
<span id="likes_button_text">&nbsp;Like</span>
</button>
</span>

View File

@@ -1,5 +1,5 @@
<span>
<span id="views_{{ .File.Path }}" title="views">0</span>
<span>{{ partial "icon.html" "eye" }}</span>
<span class="inline-block align-text-bottom">{{ partial "icon.html" "eye" }}</span>
</span>
{{- /* Trim EOF */ -}}

View File

@@ -44,8 +44,9 @@
<div class="mt-10 flex justify-center">
<a href="{{ $showMoreLinkDest }}">
<button
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">Show
More</button>
class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-2 px-4 border border-primary-500 hover:border-transparent rounded">
{{ i18n "recent.show_more" | markdownify | emojify }}
</button>
</a>
</div>
{{ end }}

View File

@@ -1,15 +1,16 @@
{{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }}
{{ $links := site.Data.sharing }}
<section class="flex flex-row flex-wrap justify-center pt-4 text-xl">
{{ range . }}
{{ with index $links . }}
{{ range $.Site.Data.sharing.links }}
{{ with . }}
<a
class="m-1 inline-block min-w-[2.4rem] rounded bg-neutral-300 p-1 text-center 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"
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="{{ printf .url $.Permalink $.Title }}"
title="{{ i18n .title }}"
aria-label="{{ i18n .title }}"
>{{ partial "icon.html" .icon }}</a
>
>
{{ partial "icon.html" .icon }}
</a>
{{ end }}
{{ end }}
</section>

37
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "hugo-blowfish-theme",
"version": "2.11.0",
"version": "2.14.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "hugo-blowfish-theme",
"version": "2.11.0",
"version": "2.14.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -17,7 +17,7 @@
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.8",
"chart.js": "^3.9.1",
"chart.js": "^4.0.1",
"fuse.js": "^6.6.2",
"katex": "^0.16.3",
"mermaid": "^9.2.2",
@@ -25,7 +25,7 @@
"prettier-plugin-go-template": "^0.0.13",
"prettier-plugin-tailwindcss": "^0.1.13",
"rimraf": "^3.0.2",
"tailwindcss": "^3.2.3",
"tailwindcss": "^3.2.4",
"vendor-copy": "^3.0.1"
}
},
@@ -206,10 +206,13 @@
}
},
"node_modules/chart.js": {
"version": "3.9.1",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.9.1.tgz",
"integrity": "sha512-Ro2JbLmvg83gXF5F4sniaQ+lTbSv18E+TIf2cOeiH1Iqd2PGFOtem+DUufMZsCJwFE7ywPOpfXFBwRTGq7dh6w==",
"dev": true
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.0.1.tgz",
"integrity": "sha512-5/8/9eBivwBZK81mKvmIwTb2Pmw4D/5h1RK9fBWZLLZ8mCJ+kfYNmV9rMrGoa5Hgy2/wVDBMLSUDudul2/9ihA==",
"dev": true,
"engines": {
"pnpm": "^7.0.0"
}
},
"node_modules/chokidar": {
"version": "3.5.3",
@@ -1900,9 +1903,9 @@
}
},
"node_modules/tailwindcss": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.3.tgz",
"integrity": "sha512-Xt9D4PK4zuuQCEB8bwK9JUCKmTgUwyac/6b0/42Vqhgl6YJkep+Wf5wq+5uXYfmrupdAD0YY2NY1hyZp1HjRrg==",
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.4.tgz",
"integrity": "sha512-AhwtHCKMtR71JgeYDaswmZXhPcW9iuI9Sp2LvZPo9upDZ7231ZJ7eA9RaURbhpXGVlrjX4cFNlB4ieTetEb7hQ==",
"dependencies": {
"arg": "^5.0.2",
"chokidar": "^3.5.3",
@@ -2144,9 +2147,9 @@
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA=="
},
"chart.js": {
"version": "3.9.1",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.9.1.tgz",
"integrity": "sha512-Ro2JbLmvg83gXF5F4sniaQ+lTbSv18E+TIf2cOeiH1Iqd2PGFOtem+DUufMZsCJwFE7ywPOpfXFBwRTGq7dh6w==",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.0.1.tgz",
"integrity": "sha512-5/8/9eBivwBZK81mKvmIwTb2Pmw4D/5h1RK9fBWZLLZ8mCJ+kfYNmV9rMrGoa5Hgy2/wVDBMLSUDudul2/9ihA==",
"dev": true
},
"chokidar": {
@@ -3439,9 +3442,9 @@
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
},
"tailwindcss": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.3.tgz",
"integrity": "sha512-Xt9D4PK4zuuQCEB8bwK9JUCKmTgUwyac/6b0/42Vqhgl6YJkep+Wf5wq+5uXYfmrupdAD0YY2NY1hyZp1HjRrg==",
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.4.tgz",
"integrity": "sha512-AhwtHCKMtR71JgeYDaswmZXhPcW9iuI9Sp2LvZPo9upDZ7231ZJ7eA9RaURbhpXGVlrjX4cFNlB4ieTetEb7hQ==",
"requires": {
"arg": "^5.0.2",
"chokidar": "^3.5.3",

View File

@@ -1,8 +1,9 @@
{
"name": "hugo-blowfish-theme",
"version": "2.12.1",
"version": "2.14.0",
"description": "Blowfish theme for Hugo",
"scripts": {
"fullinstall": "npm run preinstall && npm install && npm run postinstall",
"preinstall": "rimraf assets/vendor",
"postinstall": "vendor-copy",
"assets": "rimraf assets/vendor && vendor-copy",
@@ -34,7 +35,7 @@
"homepage": "https://github.com/nunocoracao/blowfish#readme",
"devDependencies": {
"@tailwindcss/typography": "^0.5.8",
"chart.js": "^3.9.1",
"chart.js": "^4.0.1",
"fuse.js": "^6.6.2",
"katex": "^0.16.3",
"mermaid": "^9.2.2",
@@ -42,7 +43,7 @@
"prettier-plugin-go-template": "^0.0.13",
"prettier-plugin-tailwindcss": "^0.1.13",
"rimraf": "^3.0.2",
"tailwindcss": "^3.2.3",
"tailwindcss": "^3.2.4",
"vendor-copy": "^3.0.1"
},
"vendorCopy": [],
@@ -52,7 +53,7 @@
"to": "assets/lib/mermaid/mermaid.min.js"
},
{
"from": "node_modules/chart.js/dist/chart.min.js",
"from": "node_modules/chart.js/dist/chart.umd.js",
"to": "assets/lib/chart/chart.min.js"
},
{