frankcollins3 / ASPokedex

Pokedex with ASP backend / razor pages, and VanillaJS front end
1 stars 0 forks source link

dataset consumed from code-behind file starts at middle indeces [9:05pm] #4

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attempting to do: // sidenote: could've posted another issue but it's ok. got list working. had to initialize the list that holds the image src. PokemonSrc = new List<string>();

then another error was the client loop: Screen Shot 2023-09-18 at 9 04 10 PM

error: Screen Shot 2023-09-18 at 9 01 09 PM

proposed approach: lazy loading? pagination?

possible improvements:

frankcollins3 commented 1 year ago

onload () => scrollTop

<script>
    // Scroll to the top of the container when the page loads
    window.onload = function() {
        var container = document.querySelector('.pokemon-list-container');
        container.scrollTop = 0;
    };
</script>

[9:22pm]

frankcollins3 commented 1 year ago

{space-between} surprised chatGPT didn't advise this. realized the solution since padding-top: 200px helps for smaller datasets but still creates problem for same so putting more space over the top would help. that's when space-between became obvious [9:38pm]