Compare commits

..

11 Commits

Author SHA1 Message Date
Nuno Coração
7087e71d9a Merge pull request #151 from nunocoracao/150-fix-prose-width
improved readibilit of content
2022-10-20 22:04:46 +01:00
Nuno Coração
539cfd6443 improved readibilit of content 2022-10-20 22:03:49 +01:00
Nuno Coração
4b45ff114f Update package.json 2022-10-20 12:16:36 +01:00
Nuno Coração
0253344873 Merge pull request #149 from nunocoracao/148-images-in-both-hero-card-and-background-are-not-loaded-from-assets-folder
fixed bug in homepage image loading
2022-10-20 12:16:18 +01:00
Nuno Coração
c64eac525a fixed bug 2022-10-20 12:15:37 +01:00
Nuno Coração
03cf3aec76 updated installation instructions for hugo 2022-10-18 22:03:33 +01:00
Nuno Coração
2ef97effed Update package.json 2022-10-18 21:58:45 +01:00
Nuno Coração
803f7dcc52 Update go.mod 2022-10-18 21:57:44 +01:00
Nuno Coração
76e7fbdeb0 Merge pull request #141 from lukapiplica/main
Slight fix for the name.
2022-10-18 08:14:31 +01:00
lukapiplica
5d992f1719 Fixed docs for Croatian
Slight change from Hrvatski to Croatian.
2022-10-18 03:03:12 +02:00
Nuno Coração
c88306afad fixed bug in series 2022-10-17 22:50:08 +01:00
16 changed files with 64 additions and 44 deletions

View File

@@ -1570,8 +1570,12 @@ select {
margin-left: 0.5rem;
}
.ml-0 {
margin-left: 0px;
.mt-2 {
margin-top: 0.5rem;
}
.mb-5 {
margin-bottom: 1.25rem;
}
.\!mb-9 {
@@ -1666,14 +1670,14 @@ select {
width: 3rem;
}
.w-36 {
width: 9rem;
}
.w-full {
width: 100%;
}
.w-36 {
width: 9rem;
}
.w-24 {
width: 6rem;
}
@@ -3069,10 +3073,6 @@ body:has(#menu-controller:checked) {
}
}
.max-w-prose {
max-width: 75ch;
}
.first\:mt-8:first-child {
margin-top: 2rem;
}
@@ -3519,6 +3519,10 @@ body:has(#menu-controller:checked) {
width: 50%;
}
.sm\:max-w-prose {
max-width: 65ch;
}
.sm\:flex-row {
flex-direction: row;
}
@@ -3672,6 +3676,10 @@ body:has(#menu-controller:checked) {
margin-right: 0px;
}
.lg\:ml-auto {
margin-left: auto;
}
.lg\:mt-0 {
margin-top: 0px;
}

View File

@@ -395,8 +395,4 @@ body:has(#menu-controller:checked) {
.article {
flex-wrap: nowrap;
}
}
.max-w-prose {
max-width: 75ch;
}

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 4.8 MiB

After

Width:  |  Height:  |  Size: 4.8 MiB

View File

@@ -23,7 +23,7 @@ mainSections = ["docs"]
[homepage]
layout = "custom" # valid options: page, profile, hero, card, background, custom
homepageImage = "iceland.jpg" # used in: hero, and card
homepageImage = "/img/iceland.jpg" # used in: hero, and card
showRecent = true
showRecentItems = 5
showMoreLink = true
@@ -57,7 +57,7 @@ mainSections = ["docs"]
[list]
showBreadcrumbs = false
showSummary = true
showTableOfContents = false
showTableOfContents = true
showCards = true
groupByYear = false

View File

@@ -74,7 +74,7 @@ The theme currently supports the following languages by default:
| :romania: Romanian | `ro` |
| :es: Spanish (Spain) | `es` |
| :tr: Turkish | `tr` |
| 🇭🇷 Hrvatski | `hr` |
| 🇭🇷 Croatian | `hr` |
The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/nunocoracao/blowfish/pulls).

View File

@@ -67,7 +67,7 @@ This method is the quickest and easiest for keeping the theme up-to-date. Hugo u
```toml
[[imports]]
path = "github.com/nunocoracao/blowfish"
path = "github.com/nunocoracao/blowfish/v2"
```
4. Start your server using `hugo server` and the theme will be downloaded automatically.

2
go.mod
View File

@@ -1,3 +1,3 @@
module github.com/nunocoracao/blowfish
module github.com/nunocoracao/blowfish/v2
go 1.16

View File

@@ -25,7 +25,7 @@
</div>
</section>
{{ if gt .Pages 0 }}
<section class="space-y-10 max-w-prose">
<section class="space-y-10 w-full">
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">

View File

@@ -21,7 +21,8 @@
</header>
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
.TableOfContents "<ul") }} <div class="order-first px-0 lg:order-last lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8">
.TableOfContents "<ul") }}
<div class="order-first sm:max-w-prose lg:ml-auto px-0 lg:order-last lg:max-w-xs ltr:lg:pl-8 rtl:lg:pr-8">
<div class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky lg:top-10">
{{ partial "toc.html" . }}
</div>

View File

@@ -4,13 +4,18 @@
<div class="mx-auto max-w-7xl p-0">
<div class="relative sm:overflow-hidden">
<div class="absolute inset-0">
<img class="h-full w-full object-cover m-0 nozoom" src="{{ .Site.Params.homepage.homepageImage }}">
{{ with .Site.Params.homepage.homepageImage }}
{{ $homepageImage := resources.Get . }}
{{ if $homepageImage }}
<img class="h-full w-full object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}">
<div
class="absolute inset-0 bg-gradient-to-t from-neutral-100 dark:from-neutral-800 to-transparent dark:to-neutral-300 mix-blend-normal dark:mix-blend-multiply">
</div>
<div
class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
</div>
{{ end }}
{{ 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">
{{ with .Site.Author.image }}

View File

@@ -14,8 +14,13 @@
</div>
<div class="mt-6 sm:mt-16 lg:mt-0">
<div class="-mr-48 pl-4 sm:pl-6 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0">
{{ with .Site.Params.homepage.homepageImage }}
{{ $homepageImage := resources.Get . }}
{{ if $homepageImage }}
<img class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
src="{{ .Site.Params.homepage.homepageImage }}">
src="{{ $homepageImage.RelPermalink }}">
{{ end }}
{{ end }}
</div>
</div>
</div>

View File

@@ -4,10 +4,15 @@
<div class="mx-auto max-w-7xl p-0">
<div class="relative shadow-xl sm:overflow-hidden rounded-2xl">
<div class="absolute inset-0">
<img class="h-full w-full object-cover m-0 nozoom" src="{{ .Site.Params.homepage.homepageImage }}">
{{ with .Site.Params.homepage.homepageImage }}
{{ $homepageImage := resources.Get . }}
{{ if $homepageImage }}
<img class="h-full w-full object-cover m-0 nozoom" src="{{ $homepageImage.RelPermalink }}">
<div
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-700 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
</div>
{{ end }}
{{ 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">
{{ with .Site.Author.image }}

View File

@@ -1,5 +1,5 @@
{{ if .Params.series }}
<details style="margin-left:0px" class="mt-0 ml-0 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{ if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{ if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - This article is part of a series.

34
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "hugo-blowfish-theme",
"version": "1.3.1",
"version": "2.3.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "hugo-blowfish-theme",
"version": "1.3.1",
"version": "2.3.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -20,7 +20,7 @@
"chart.js": "^3.9.1",
"fuse.js": "^6.6.2",
"katex": "^0.16.0",
"mermaid": "^9.1.6",
"mermaid": "^9.1.7",
"prettier": "^2.7.1",
"prettier-plugin-go-template": "^0.0.13",
"prettier-plugin-tailwindcss": "^0.1.13",
@@ -1073,9 +1073,9 @@
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
},
"node_modules/dompurify": {
"version": "2.3.10",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.10.tgz",
"integrity": "sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g==",
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.0.tgz",
"integrity": "sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA==",
"dev": true
},
"node_modules/fast-glob": {
@@ -1383,16 +1383,16 @@
}
},
"node_modules/mermaid": {
"version": "9.1.6",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-9.1.6.tgz",
"integrity": "sha512-oBuQk7s55wQgEgH/AK0GYY8U0kBqOIGK9QlJL+VYxh+1kZQtU9tNwoy0gWCfBJDaFIRdfpc/fm9PagaIXg6XFQ==",
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-9.1.7.tgz",
"integrity": "sha512-MRVHXy5FLjnUQUG7YS3UN9jEN6FXCJbFCXVGJQjVIbiR6Vhw0j/6pLIjqsiah9xoHmQU6DEaKOvB3S1g/1nBPA==",
"dev": true,
"dependencies": {
"@braintree/sanitize-url": "^6.0.0",
"d3": "^7.0.0",
"dagre": "^0.8.5",
"dagre-d3": "^0.6.4",
"dompurify": "2.3.10",
"dompurify": "2.4.0",
"graphlib": "^2.1.8",
"khroma": "^2.0.0",
"moment-mini": "2.24.0",
@@ -2831,9 +2831,9 @@
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
},
"dompurify": {
"version": "2.3.10",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.10.tgz",
"integrity": "sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g==",
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.0.tgz",
"integrity": "sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA==",
"dev": true
},
"fast-glob": {
@@ -3074,16 +3074,16 @@
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="
},
"mermaid": {
"version": "9.1.6",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-9.1.6.tgz",
"integrity": "sha512-oBuQk7s55wQgEgH/AK0GYY8U0kBqOIGK9QlJL+VYxh+1kZQtU9tNwoy0gWCfBJDaFIRdfpc/fm9PagaIXg6XFQ==",
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-9.1.7.tgz",
"integrity": "sha512-MRVHXy5FLjnUQUG7YS3UN9jEN6FXCJbFCXVGJQjVIbiR6Vhw0j/6pLIjqsiah9xoHmQU6DEaKOvB3S1g/1nBPA==",
"dev": true,
"requires": {
"@braintree/sanitize-url": "^6.0.0",
"d3": "^7.0.0",
"dagre": "^0.8.5",
"dagre-d3": "^0.6.4",
"dompurify": "2.3.10",
"dompurify": "2.4.0",
"graphlib": "^2.1.8",
"khroma": "^2.0.0",
"moment-mini": "2.24.0",

View File

@@ -1,6 +1,6 @@
{
"name": "hugo-blowfish-theme",
"version": "2.3.0",
"version": "2.4.2",
"description": "Blowfish theme for Hugo",
"scripts": {
"preinstall": "rimraf assets/vendor",