vlang / docs

14 stars 4 forks source link

mobile support #2

Closed xenoken closed 5 months ago

xenoken commented 5 months ago

Improves the user experience on mobile.

This pull request introduces controls and logic that enable users to toggle the visibility of the topics menu. This improves the website's navigation, particularly on mobile.

medvednikov commented 5 months ago

Thanks a lot!

The header is now a bit off:

image

Here's how it used to be:

image

Also the hamburger is not clickable on desktop, will test on a phone.

medvednikov commented 5 months ago

Never mind, I misunderstood. It works fine :)

xenoken commented 5 months ago

I tried to open the website and saw that the layout is a bit different than the one I see while debugging. After checking with DevTools, I noticed that the website's stylesheet 'style.css' is different from the one that sass creates on my end. Does it need to be updated manually, or is it rebuilt along with the other assets and web pages?

spytheman commented 5 months ago

main.v does call:

        os.system('sass --style compressed templates/assets/styles/style.scss:templates/assets/styles/style.css')

but it should be sassc (on the vps that generates the docs, there is not sass, but there is sassc .

It was changed 2 days ago in b95024a .

spytheman commented 5 months ago

In effect, since the command failed, the .css on the site was not updated since b95024a .

spytheman commented 5 months ago

I'll make a symlink from sassc to sass on the vps to make it more robust, assuming that both do the same.

spytheman commented 5 months ago

However, they are not the same 🤔 .

On my local linux machine, sassc is a wrapper to libsass.so from https://sass-lang.com/libsass/, https://github.com/sass/sassc , while sass is https://sass-lang.com/dart-sass/ .

spytheman commented 5 months ago

sass has a JS transpilation, available through npm.

I've installed this version with npm install -g sass on the vps: 1.76.0 compiled with dart2js 3.3.4

spytheman commented 5 months ago

The generated css on the main branch is now updated in 5e07988 .

The generator template is also updated in eccd866 .

spytheman commented 5 months ago

image

and

image

I think it looks fine now.

spytheman commented 5 months ago

The desktop version also looks fine to me now: image

xenoken commented 5 months ago

That's awesome 👍