Neeko
Neeko
Explore posts from servers
NNuxt
Created by Neeko on 4/4/2024 in #❓・help
Show "preload" before website fully loaded
Hi, I have Nuxt 3 app with fullscreen carousel (lazy load images) and I want to know how can I show "preload" (background color with text 'loading...') before all site is loaded (dom fully complete) ? Thanks!
1 replies
CC#
Created by Neeko on 3/4/2024 in #help
Parts of string to special json format
Hi, I need to transform array of string to a special json format. I don't know where to start to achieve this.
c#
foreach (var word in words) {
Console.WriteLine($"word = {word}");

// word = string of characters like :

// hello
// hello world
// hello world test
// world
// w (alias of world)
// ...
}
c#
foreach (var word in words) {
Console.WriteLine($"word = {word}");

// word = string of characters like :

// hello
// hello world
// hello world test
// world
// w (alias of world)
// ...
}
And I need to transform to json like this :
{
"hello": {
"world": {
"_usage": "hello world",
"test": {
"_usage": "hello world test"
}
}
},
"world": {
"_alias": "w",
"_usage": "(w)orld"
},
// etc ...
}
{
"hello": {
"world": {
"_usage": "hello world",
"test": {
"_usage": "hello world test"
}
}
},
"world": {
"_alias": "w",
"_usage": "(w)orld"
},
// etc ...
}
Thanks for you help!
2 replies
NNuxt
Created by Neeko on 3/6/2023 in #❓・help
HTMLElement is not defined - VueUse
Hi, i'm trying to use https://vueuse.org/core/useScroll/#usescroll from VueUse const el = ref<HTMLElement | null>(null) const { x, y, isScrolling, arrivedState, directions } = useScroll(el) But I got this HTMLElement is not defined Do you know how can use global window element? Thank you 🙂
24 replies