diff --git a/src/App.vue b/src/App.vue index 9f9bf57..08e914f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,8 +12,10 @@ import { ref, computed, onMounted } from 'vue' import loadFonts from '@fuzzco/font-loader' import { useWindowSize } from '@vueuse/core' +import useConsoleCredit from '@/composables/useConsoleCredit' const { height } = useWindowSize() +useConsoleCredit() const classes = computed(() => [ 'container', diff --git a/src/composables/useConsoleCredit.js b/src/composables/useConsoleCredit.js new file mode 100644 index 0000000..b339626 --- /dev/null +++ b/src/composables/useConsoleCredit.js @@ -0,0 +1,27 @@ +import { onMounted } from 'vue' +import _kebabCase from 'lodash/kebabCase' +import { themes } from '@/libs/theme' + +export default () => { + const style = { + backgroundColor: themes.red.bg, + color: themes.red.fg, + padding: '8px', + borderRadius: '5px', + fontWeight: 'bold', + } + + const styleToString = (style) => { + return Object.entries(style) + .map(([key, value]) => `${_kebabCase(key)}: ${value}`) + .join('; ') + } + + onMounted(() => { + console.log('%c🪄 nicwands 🪄', styleToString(style)) + console.log( + '%cDesign by: Jeff Kardos https://jeffkardos.com', + styleToString(style), + ) + }) +} diff --git a/src/composables/useInfiniteScroll.js b/src/composables/useInfiniteScroll.js index 9e92f3d..cc08b4c 100644 --- a/src/composables/useInfiniteScroll.js +++ b/src/composables/useInfiniteScroll.js @@ -9,7 +9,7 @@ const { height: wHeight } = useWindowSize() /** * Bidirectional infinite virtual scroll composable * Manages virtual viewports with on-demand content generation. - * The page stays at 100vh — scroll position is tracked via Lenis + * The page stays window height — scroll position is tracked via Lenis * virtual-scroll events and viewports are positioned with CSS transforms. * * @param {Object} options Configuration options @@ -35,7 +35,7 @@ export const useInfiniteScroll = (options = {}) => { // Core state const state = reactive({ - // Accumulated virtual scroll position (not the real DOM scroll) + // Accumulated virtual scroll position scrollY: initialIndex * (viewportHeight || 0), // Active state to stop/start scroll active: true,