Compare commits

..

8 Commits

Author SHA1 Message Date
Nuno Coração 1d1488f789 updated version 2022-10-17 10:46:46 +01:00
Nuno Coração 4bafe76e72 Merge pull request #135 from nunocoracao/134-make-views-and-likes-into-icons-vs-text
changed likes and views to icons
2022-10-17 10:46:07 +01:00
Nuno Coração 230f3210cf changed likes and views to icons 2022-10-17 10:44:20 +01:00
Nuno Coração 3cf081ad9e Merge pull request #133 from nunocoracao/132-background-hero-images-improvements
UI improvements to background hero
2022-10-17 10:35:03 +01:00
Nuno Coração dfb4be490d UI improvements to background hero 2022-10-17 10:34:34 +01:00
Nuno Coração 9afae930fd added polish to docs 2022-10-17 10:10:08 +01:00
Nuno Coração d8eee1c5ed updated version 2022-10-16 21:56:59 +01:00
Nuno Coração 82a36a462e commented config files 2022-10-16 21:56:36 +01:00
11 changed files with 43 additions and 32 deletions
+2 -2
View File
@@ -1634,8 +1634,8 @@ select {
height: 2rem; height: 2rem;
} }
.h-\[45vh\] { .h-\[300px\] {
height: 45vh; height: 300px;
} }
.h-36 { .h-36 {
+2
View File
@@ -0,0 +1,2 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
<path fill="currentColor" d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM432 256c0 79.5-64.5 144-144 144s-144-64.5-144-144s64.5-144 144-144s144 64.5 144 144zM288 192c0 35.3-28.7 64-64 64c-11.5 0-22.3-3-31.6-8.4c-.2 2.8-.4 5.5-.4 8.4c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6z"/></svg>

After

Width:  |  Height:  |  Size: 633 B

+2 -2
View File
@@ -12,7 +12,7 @@ if (typeof auth !== 'undefined') {
var data = doc.data(); var data = doc.data();
if (data) { if (data) {
var label = document.querySelectorAll("span[id='" + oid + "']")[0].innerText.split(' ')[1] var label = document.querySelectorAll("span[id='" + oid + "']")[0].innerText.split(' ')[1]
document.querySelectorAll("span[id='" + oid + "']")[0].innerText = numberWithCommas(data.views) + " " + label document.querySelectorAll("span[id='" + oid + "']")[0].innerText = numberWithCommas(data.views)
} }
}) })
} }
@@ -22,7 +22,7 @@ if (typeof auth !== 'undefined') {
var data = doc.data(); var data = doc.data();
if (data) { if (data) {
var label = document.querySelectorAll("span[id='" + oid + "']")[0].innerText.split(' ')[1] var label = document.querySelectorAll("span[id='" + oid + "']")[0].innerText.split(' ')[1]
document.querySelectorAll("span[id='" + oid + "']")[0].innerText = numberWithCommas(data.likes) + " " + label document.querySelectorAll("span[id='" + oid + "']")[0].innerText = numberWithCommas(data.likes)
} }
}) })
} }
+20 -20
View File
@@ -10,20 +10,20 @@
# overridden by providing a weight value. The menu will then be # overridden by providing a weight value. The menu will then be
# ordered by weight from lowest to highest. # ordered by weight from lowest to highest.
[[main]] #[[main]]
name = "Blog" # name = "Blog"
pageRef = "posts" # pageRef = "posts"
weight = 10 # weight = 10
[[main]] #[[main]]
name = "Categories" # name = "Categories"
pageRef = "categories" # pageRef = "categories"
weight = 20 # weight = 20
[[main]] #[[main]]
name = "Tags" # name = "Tags"
pageRef = "tags" # pageRef = "tags"
weight = 30 # weight = 30
# -- Footer Menu -- # -- Footer Menu --
@@ -31,12 +31,12 @@
# the copyright notice. Configure as per the main menu above. # the copyright notice. Configure as per the main menu above.
[[footer]] # [[footer]]
name = "Tags" # name = "Tags"
pageRef = "tags" # pageRef = "tags"
weight = 10 # weight = 10
[[footer]] # [[footer]]
name = "Categories" # name = "Categories"
pageRef = "categories" # pageRef = "categories"
weight = 20 # weight = 20
@@ -68,6 +68,7 @@ The theme currently supports the following languages by default:
| :jp: Japanese | `ja` | | :jp: Japanese | `ja` |
| :brazil: Portuguese (Brazil) | `pt-br` | | :brazil: Portuguese (Brazil) | `pt-br` |
| :portugal: Portuguese (Portugal) | `pt-pt` | | :portugal: Portuguese (Portugal) | `pt-pt` |
| :poland: Polish | `pl` |
| :romania: Romanian | `ro` | | :romania: Romanian | `ro` |
| :es: Spanish (Spain) | `es` | | :es: Spanish (Spain) | `es` |
| :tr: Turkish | `tr` | | :tr: Turkish | `tr` |
@@ -187,4 +188,4 @@ Many of the article defaults here can be overridden on a per article basis by sp
The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Blowfish. The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Blowfish.
Always ensure this file is present in the config directory and that the required values are set. Failure to do so may cause certain features to fucntion incorrectly and could result in unintended behaviour. Always ensure this file is present in the config directory and that the required values are set. Failure to do so may cause certain features to fucntion incorrectly and could result in unintended behaviour.
@@ -35,6 +35,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| dribbble | {{< icon dribbble >}} | | dribbble | {{< icon dribbble >}} |
| edit | {{< icon edit >}} | | edit | {{< icon edit >}} |
| email | {{< icon email >}} | | email | {{< icon email >}} |
| eye | {{< icon eye >}} |
| facebook | {{< icon facebook >}} | | facebook | {{< icon facebook >}} |
| fire | {{< icon fire >}} | | fire | {{< icon fire >}} |
| flickr | {{< icon flickr >}} | | flickr | {{< icon flickr >}} |
+7 -2
View File
@@ -146,10 +146,15 @@
var header = document.getElementById("single_header") var header = document.getElementById("single_header")
var style = getComputedStyle(header); var style = getComputedStyle(header);
var margin = '-'+ (parseInt(style.height) + parseInt(style.marginTop) + parseInt(style.marginBottom) + 20) + 'px'
var hero = document.getElementById('hero') var hero = document.getElementById('hero')
if(hero) if(hero){
var margin = '-'+ (parseInt(style.height) + parseInt(style.marginTop) + parseInt(style.marginBottom) + 20) + 'px'
var height = (-parseInt(margin) + parseInt(getComputedStyle(hero).height)) + "px"
console.log(height)
hero.style["margin-bottom"] = margin; hero.style["margin-bottom"] = margin;
hero.style["height"] = height;
}
</script> </script>
</section> </section>
<footer class="pt-8 max-w-prose print:hidden"> <footer class="pt-8 max-w-prose print:hidden">
+1 -1
View File
@@ -3,7 +3,7 @@
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}} {{- with $featured -}}
{{ with .Resize "1200x" }} {{ with .Resize "1200x" }}
<div id="hero" class="relative h-[45vh] single_hero_background nozoom" style="background-image:url({{ .RelPermalink }});"> <div id="hero" class="relative h-[300px] single_hero_background nozoom" style="background-image:url({{ .RelPermalink }});">
<div class="hero_gradient bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div> <div class="hero_gradient bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal"></div>
</div> </div>
{{ end }} {{ end }}
+2 -1
View File
@@ -1,4 +1,5 @@
<span> <span>
<span id="likes_{{ .File.Path }}" title="likes">{{- i18n "article.likes" 0 | markdownify | emojify -}}</span> <span id="likes_{{ .File.Path }}" title="likes">0</span>
<span>{{ partial "icon.html" "heart" }}</span>
</span> </span>
{{- /* Trim EOF */ -}} {{- /* Trim EOF */ -}}
+3 -2
View File
@@ -1,4 +1,5 @@
<span id="views_{{ .File.Path }}" title="views"> <span>
{{- i18n "article.views" 0 | markdownify | emojify -}} <span id="views_{{ .File.Path }}" title="views">0</span>
<span>{{ partial "icon.html" "eye" }}</span>
</span> </span>
{{- /* Trim EOF */ -}} {{- /* Trim EOF */ -}}
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "hugo-blowfish-theme", "name": "hugo-blowfish-theme",
"version": "2.0.0", "version": "2.1.0",
"description": "Blowfish theme for Hugo", "description": "Blowfish theme for Hugo",
"scripts": { "scripts": {
"preinstall": "rimraf assets/vendor", "preinstall": "rimraf assets/vendor",