Website Scaling Issues

I recently created a simple portfolio website in Elm, and whilst i got the site to be responsive and change design based on screen size (display width to be specific), a weird issue occurs where the content of the web page seems to be stuck above ~950 pixels in width, meaning when viewing on a display 500 pixels in width it’s zoomed out / scaled down a bunch making it really hard to read on mobile devices.

The website is currently live at https://dillongeary-github-io.pages.dev/ but let me know if this link goes down, i’m am messing with the hosting of it at the moment.

the source code can be found at GitHub - dillongeary/ElmPortfolioSite

if anyone can help me identify what the issue is then that would be amazing!

Whilst im not new to web development or functional programming, this is my first ever time using Elm so be kind please

Hi, If I’m undestanding correctly you issues, I see a couple of fixes not Elm-related:

Hope this helps.

1 Like

I think that adding a <meta name="viewport"> tag would help with the scaling issue, but might also need to adjust width of some of the content (like allowing flex items to wrap). (This is essentially saying the same as comment above.)

Lighthouse is a good tool for finding issues like this, you can either run in Chrome dev tools if you use Chrome or use PageSpeed Insights

So I think the scaling/responsiveness issue is fixed by HTML & CSS. You might also look into running elm make with a JS output instead of directly generating index.html, something like

elm make src/Main.elm --output elm.js

since otherwise I think elm make without --output will overwrite any changes you’ve made to your index.html. (This would also allow you to minify the JS, addressing the other Lighthouse finding in that screenshot.)

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.