Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

big gap on left side when filetree is off. #134

Open
anantshri opened this issue Apr 19, 2023 · 1 comment
Open

big gap on left side when filetree is off. #134

anantshri opened this issue Apr 19, 2023 · 1 comment

Comments

@anantshri
Copy link
Contributor

Can we have a CSS fix when filetree is off the content starts from a bit more left right now the sidebar if it doesn't exists is just left as a empty space with content stuck in middle of a page.
Not very good with CSS hence asking here.

@wiverson
Copy link

FWIW I was able to fix this on my site. The changes:

In digital-garden-base.scss there were two spots with 1400px hard-coded:

@media (max-width: 1400px) {

@media (max-width: 1400px) {

I changed both of these to 800px instead of 1400px.

I also changed the 1400 to 800 on this line:

<div x-init="isDesktop = (window.innerWidth>=1400) ? true: false;"

And then I put the following into my custom-style.scss file:

body {
  @media(min-width: 800px) {
    .content {
      margin-left: 250px;
    }
  }
}

This is giving me a reasonable result.

Unfortunately these changes or similar will need to be reapplied as these changes require updates to both the digital garden base scss and JS. I'm not an expert in scss so it's possible (probable?) that the changes I'm making to the base scss could be done via the custom scss file instead.

The more interesting one is the change to the JavaScript in the .njk files. I am not particularly familiar with .njk files (I think they are Nunjucks) and I'm not sure why this is being done with JS and not CSS media queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants