🚚 Feat: migrate fixit.svg to assets

This commit is contained in:
Cell
2022-09-15 16:37:01 +08:00
parent 8db7727897
commit a5ba1d0c09
11 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
bottom: 0.75rem;
left: 0;
right: 0;
background-image: url('/images/fixit.svg');
background-image: var(--cl-bg-url);
background-repeat: no-repeat;
filter: blur(0.5rem);
opacity: 0.5;

Before

Width:  |  Height:  |  Size: 968 B

After

Width:  |  Height:  |  Size: 968 B

+3 -3
View File
@@ -8,14 +8,14 @@ const BASE_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/images/fixit.svg'
'/fixit.min.svg'
];
const OFFLINE_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/images/fixit.svg',
'/fixit.min.svg',
'/offline/'
];
@@ -23,7 +23,7 @@ const NOT_FOUND_CACHE_FILES = [
'/css/style.min.css',
'/js/theme.min.js',
'/site.webmanifest',
'/images/fixit.svg',
'/fixit.min.svg',
'/404.html'
];
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -116,7 +116,7 @@
# FixIt 0.2.0 | NEW Header title config
[params.header.title]
# URL of the LOGO
logo = "/images/fixit.svg"
logo = "/fixit.min.svg"
# title name
name = "My New Hugo Site"
# you can add extra information before the name (HTML format is supported), such as icons
+1 -1
Submodule docs updated: f00efc2f16...b0b14feb88
+4 -1
View File
@@ -12,7 +12,10 @@
{{- if ne .Site.Params.footer.hugo false -}}
<div class="footer-line powered">
{{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreferrer" title="Hugo %v">Hugo</a>` hugo.Version -}}
{{- $theme := .Scratch.Get "version" | printf `<a href="https://github.com/hugo-fixit/FixIt" target="_blank" rel="external" title="FixIt %v"><img class="fixit-icon" src="/images/fixit.svg" alt="FixIt logo" />&nbsp;FixIt</a>` -}}
{{- $theme := printf `<a href="https://github.com/hugo-fixit/FixIt" target="_blank" rel="external" title="FixIt %v"><img class="fixit-icon" src="%v" alt="FixIt logo" />&nbsp;FixIt</a>`
(.Scratch.Get "version")
(resources.Get "fixit.svg" | minify).RelPermalink
-}}
{{- dict "Hugo" $hugo "Theme" $theme | T "poweredBySome" | safeHTML }}
</div>
{{- end -}}
+1 -1
View File
@@ -40,7 +40,7 @@
{{- dict "Class" "fa-solid fa-download fa-fw ms-1 text-secondary" | partial "plugin/icon.html" -}}
{{- end -}}
{{- else -}}
<span class="cl-backdrop"></span>
<span class="cl-backdrop" {{ printf "style=\"--cl-bg-url: url(%v);\"" (resources.Get "fixit.svg" | minify).RelPermalink | safeHTMLAttr }}></span>
<span class="cl-content">
<span class="cl-text">
<span class="cl-title">
+2 -2
View File
@@ -114,7 +114,7 @@ class FixIt {
initMenuDesktop() {
// This is a dirty hack for fixing sub menu position error in desktop header
this.util.forEach(document.querySelectorAll('.has-children, #header-desktop .language'), ($item) => {
$item.addEventListener('mouseover', function(){
$item.addEventListener('mouseover', function () {
this.querySelector('.sub-menu').style.left= `${this.getBoundingClientRect().left}px`;
})
$item.querySelector('.sub-menu').style.minWidth= `${$item.offsetWidth - 8}px`;
@@ -929,7 +929,7 @@ class FixIt {
initWatermark() {
this.config.watermark?.enable &&
new Watermark({
content: this.config.watermark.content || '<img class="fixit-icon" src="/images/fixit.svg" alt="FixIt logo" /> FixIt Theme',
content: this.config.watermark.content || `${document.querySelector('footer .fixit-icon')?.outerHTML ?? ''} FixIt Theme`,
appendTo: this.config.watermark.appendto || '.wrapper>main',
opacity: this.config.watermark.opacity,
width: this.config.watermark.width,
-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" version="1.1" width="64" height="64"><defs><style>.fixit-ban{opacity:.9;}</style></defs><path d="M159.12 338.69l24.8-16.54a78.87 78.87 0 0 1-6.77-22.72l-30.88 4.41a16 16 0 0 1-4.54-31.68l34.27-4.9v-.76l98.94 98.95a76.89 76.89 0 0 1-71.68-17.73l-26.39 17.59c-.15.11-.31.21-.47.31a16 16 0 0 1-17.28-26.93zm224.72-48.42a16 16 0 0 0-13.57-18.11l-34.27-4.9V244.9l34.27-4.9a16 16 0 1 0-4.54-31.68l-30.54 4.36a79.31 79.31 0 0 0-6.85-22.85l24.54-16.36a16 16 0 1 0-17.29-26.93l-.46.31-26 17.34a79.9 79.9 0 0 0-102.64-3l139.83 139.88 19.41 2.77a16 16 0 0 0 18.11-13.57z" fill="#358C3C" class="fixit-bug"/><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 432c-101.46 0-184-82.54-184-184a182.84 182.84 0 0 1 33.38-105.37l256 256A182.86 182.86 0 0 1 256 440zm150.62-78.63l-256-256A182.84 182.84 0 0 1 256 72c101.46 0 184 82.54 184 184a182.84 182.84 0 0 1-33.38 105.37z" fill="#FF6347" class="fixit-ban"/></svg>

Before

Width:  |  Height:  |  Size: 991 B