NiclO1337 / pp4-banana-palace

A website for a restaurant specializing in delicious recipes using bananas. Fourth portfolio project with Code Institute.
0 stars 1 forks source link

[BUG] Visual bug #50

Closed NiclO1337 closed 3 months ago

NiclO1337 commented 3 months ago

Describe the bug Visual bug for header on pageload, looks like navigation bar jumps into position. Must from the "quickfix" solution when designing about page after index page with the javascript.

To Reproduce Steps to reproduce the behavior:

  1. Reload page and watch the header

Expected behavior Smooth load without any "jump"

NiclO1337 commented 3 months ago

Problem: As suspected, in my previous "quickfix" solution I controlled position with bootstrap position by javascript. This meant that on html/css load they are in the "index" position and then after page load they are moved with javascript. Visually this looks like a jumping flash.

Solved by: Used python logic in html to make sure correct position is loaded with html

Remove visibility of the phone number and address in header on page load and add it in on document ready with javascript. Having the it flash on all pages is very disturbing but minor delay on load of index page is barely noticable.

This is a "quickfix" of a "quickfix". A better more thourough solution is probably to control everything in seperate CSS files.