Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <github@jimmycai.com>2022-06-12 13:55:57 +0300
committerGitHub <noreply@github.com>2022-06-12 13:55:57 +0300
commitabf0c773aa2e6627ddc44f9984b3079837e273c5 (patch)
treece27c2096f8b777c6733aa48b6b3a6225c896f31
parentba3dbc4163108d160a062ff20ced6374c48914c4 (diff)
refactor: drop linear grandient background feature
remove node-vibrant from dependencies
-rw-r--r--assets/ts/main.ts32
-rw-r--r--data/external.yaml5
-rw-r--r--layouts/partials/footer/components/script.html2
3 files changed, 0 insertions, 39 deletions
diff --git a/assets/ts/main.ts b/assets/ts/main.ts
index f3160ae..e3f5b6a 100644
--- a/assets/ts/main.ts
+++ b/assets/ts/main.ts
@@ -28,38 +28,6 @@ let Stack = {
}
/**
- * Add linear gradient background to tile style article
- */
- const articleTile = document.querySelector('.article-list--tile');
- if (articleTile) {
- let observer = new IntersectionObserver(async (entries, observer) => {
- entries.forEach(entry => {
- if (!entry.isIntersecting) return;
- observer.unobserve(entry.target);
-
- const articles = entry.target.querySelectorAll('article.has-image');
- articles.forEach(async articles => {
- const image = articles.querySelector('img'),
- imageURL = image.src,
- key = image.getAttribute('data-key'),
- hash = image.getAttribute('data-hash'),
- articleDetails: HTMLDivElement = articles.querySelector('.article-details');
-
- const colors = await getColor(key, hash, imageURL);
-
- articleDetails.style.background = `
- linear-gradient(0deg,
- rgba(${colors.DarkMuted.rgb[0]}, ${colors.DarkMuted.rgb[1]}, ${colors.DarkMuted.rgb[2]}, 0.5) 0%,
- rgba(${colors.Vibrant.rgb[0]}, ${colors.Vibrant.rgb[1]}, ${colors.Vibrant.rgb[2]}, 0.75) 100%)`;
- })
- })
- });
-
- observer.observe(articleTile)
- }
-
-
- /**
* Add copy button to code block
*/
const highlights = document.querySelectorAll('.article-content div.highlight');
diff --git a/data/external.yaml b/data/external.yaml
index 777620d..cc1e9df 100644
--- a/data/external.yaml
+++ b/data/external.yaml
@@ -1,8 +1,3 @@
-Vibrant:
- - src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js
- integrity: sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM=
- type: script
-
PhotoSwipe:
- src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js
integrity: sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo=
diff --git a/layouts/partials/footer/components/script.html b/layouts/partials/footer/components/script.html
index 4cb350c..f25dc83 100644
--- a/layouts/partials/footer/components/script.html
+++ b/layouts/partials/footer/components/script.html
@@ -1,5 +1,3 @@
-{{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
-
{{- $opts := dict "minify" hugo.IsProduction -}}
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}