@anglefeint/astro-theme 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -1
- package/src/config/about.ts +1 -1
- package/src/layouts/BlogPost.astro +4 -1
- package/src/layouts/shells/MatrixShell.astro +6 -1
- package/{public → src}/scripts/about-effects.js +2 -10
- package/{public → src}/scripts/blogpost-effects.js +2 -10
- package/{public → src}/scripts/home-matrix.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anglefeint/astro-theme",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Anglefeint core theme package for Astro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"src/config",
|
|
12
12
|
"src/components",
|
|
13
13
|
"src/layouts",
|
|
14
|
+
"src/scripts",
|
|
14
15
|
"src/i18n",
|
|
15
16
|
"src/styles",
|
|
16
17
|
"src/assets/theme",
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
".": "./src/index.ts",
|
|
27
28
|
"./components/*": "./src/components/*",
|
|
28
29
|
"./layouts/*": "./src/layouts/*",
|
|
30
|
+
"./scripts/*": "./src/scripts/*",
|
|
29
31
|
"./i18n/*": "./src/i18n/*",
|
|
30
32
|
"./styles/*": "./src/styles/*",
|
|
31
33
|
"./assets/*": "./src/assets/*",
|
package/src/config/about.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* About page content and runtime behavior configuration.
|
|
3
|
-
* Used by src/pages/[lang]/about.astro and
|
|
3
|
+
* Used by src/pages/[lang]/about.astro and packages/theme/src/scripts/about-effects.js.
|
|
4
4
|
*/
|
|
5
5
|
export const ABOUT_CONFIG = {
|
|
6
6
|
metaLine: '$ profile booted | mode: builder',
|
|
@@ -257,6 +257,9 @@ for (let i = 0; i < pts.length; i++) {
|
|
|
257
257
|
</a>
|
|
258
258
|
</nav>
|
|
259
259
|
<Fragment slot="body-end">
|
|
260
|
-
<script
|
|
260
|
+
<script>
|
|
261
|
+
import { initBlogpostEffects } from '../scripts/blogpost-effects.js';
|
|
262
|
+
initBlogpostEffects();
|
|
263
|
+
</script>
|
|
261
264
|
</Fragment>
|
|
262
265
|
</AiShell>
|
|
@@ -14,6 +14,11 @@ const { locale, title, description } = Astro.props as Props;
|
|
|
14
14
|
<ThemeFrame locale={locale} title={title} description={description} bodyClass="page-home" mainClass="page-main home-content">
|
|
15
15
|
<link slot="head" rel="stylesheet" href="/styles/home-page.css" />
|
|
16
16
|
<canvas slot="body-start" id="matrix-bg" aria-hidden="true"></canvas>
|
|
17
|
-
<
|
|
17
|
+
<Fragment slot="body-end">
|
|
18
|
+
<script>
|
|
19
|
+
import { initHomeMatrix } from '../../scripts/home-matrix.js';
|
|
20
|
+
initHomeMatrix();
|
|
21
|
+
</script>
|
|
22
|
+
</Fragment>
|
|
18
23
|
<slot />
|
|
19
24
|
</ThemeFrame>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function init() {
|
|
1
|
+
export function initAboutEffects() {
|
|
3
2
|
var runtimeConfig = {};
|
|
4
3
|
var runtimeConfigEl = document.getElementById('hacker-runtime-config');
|
|
5
4
|
if (runtimeConfigEl && runtimeConfigEl.textContent) {
|
|
@@ -551,11 +550,4 @@
|
|
|
551
550
|
}, 1200);
|
|
552
551
|
});
|
|
553
552
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
if (document.readyState === 'loading') {
|
|
557
|
-
document.addEventListener('DOMContentLoaded', init);
|
|
558
|
-
} else {
|
|
559
|
-
init();
|
|
560
|
-
}
|
|
561
|
-
})();
|
|
553
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function init() {
|
|
1
|
+
export function initBlogpostEffects() {
|
|
3
2
|
var prefersReducedMotion = false;
|
|
4
3
|
try {
|
|
5
4
|
prefersReducedMotion = !!(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
@@ -972,11 +971,4 @@
|
|
|
972
971
|
}, 1200);
|
|
973
972
|
});
|
|
974
973
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
if (document.readyState === 'loading') {
|
|
978
|
-
document.addEventListener('DOMContentLoaded', init);
|
|
979
|
-
} else {
|
|
980
|
-
init();
|
|
981
|
-
}
|
|
982
|
-
})();
|
|
974
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(
|
|
1
|
+
export function initHomeMatrix() {
|
|
2
2
|
const chars =
|
|
3
3
|
'!"#$%&\'()*+,-./:;<=>?[\\]^_{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
4
4
|
const matrixFont =
|
|
@@ -114,4 +114,4 @@
|
|
|
114
114
|
document.body.style.setProperty('--matrix-mx', `${event.clientX}px`);
|
|
115
115
|
document.body.style.setProperty('--matrix-my', `${event.clientY}px`);
|
|
116
116
|
});
|
|
117
|
-
}
|
|
117
|
+
}
|