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

Ability to disable left sidebar in single layout #1322

Closed
kbl opened this issue Oct 26, 2017 · 10 comments
Closed

Ability to disable left sidebar in single layout #1322

kbl opened this issue Oct 26, 2017 · 10 comments

Comments

@kbl
Copy link
Contributor

kbl commented Oct 26, 2017

[x] This is a question about using the theme.

Environment informations

  • Minimal Mistakes version: 4.6.0
  • Jekyll version: 3.6.0
  • GitHub Pages hosted: no
  • Operating system: ubuntu 17.04

Expected behavior

I'd like to remove the left column in single page layout whatsoever. I know that it's possible by removing author's bio etc. but then page content is really narrow. What I would like to achieve is to have "2 columns" - left, wider for ~2/3 of the page width for an article and right where toc is being inserted. How can I achieve such behaviour?

I've been fiddling with scss - I've been able to achieve it on some resolutions (mobile, x-large), but other looked just bad :( (large, 4k).

@mmistakes
Copy link
Owner

Have a search through the closed issues for things like "grid", "layout", "wide", etc.

I've covered this numerous times before with detailed directions on the Sass you need to modify to widen the main content container.

@mmistakes
Copy link
Owner

Related: #1265, #1155, #1298, #623, #384, #74

@kbl
Copy link
Contributor Author

kbl commented Oct 31, 2017

Thank you, indeed I must have been blind. If anybody is interested following changes did the job:
SamouczekProgramisty/samouczekprogramisty.github.io@9f9c082
SamouczekProgramisty/samouczekprogramisty.github.io@f129d68

@kbl kbl closed this as completed Oct 31, 2017
@charleshan
Copy link

Looks like lots of people are looking to do this. Maybe we could add a enable/disable sidebar feature.

@StefanoCecere
Copy link

indeed.. an "full-wide" class to be used when the author left column is disabled.

@JustinGrote
Copy link

For anyone coming here from google like I did, I just copied the _sass/minimal-mistakes.scss to my project and added this to the top of the file (preserving all the includes below it:

article.page {
    float: left;
    width: 100%;
}

And changed my _config.yml defaults to not show author_profile on posts (author_profile: false)

defaults:
  # _posts
  - scope:
      path: ""
      type: posts
    values:
      layout: single
      author_profile: false
      read_time: true
      comments: true
      share: true
      related: true

And now my article posts are "full wide"

@mmistakes, your documentation https://mmistakes.github.io/minimal-mistakes/docs/stylesheets/ says you have to copy the complete _sass folder, however I just changed the one file and it seems to all be working fine with Github Pages and Jekyll 3.8.5. Is this information still accurate?

@mmistakes
Copy link
Owner

@JustinGrote How you've done it is correct since you are overriding the main file that imports all the partials.

The only reason I mentioned copying the entire _sass folder was I got a lot of questions and issues when someone tried to override a single Sass partials (like _variables.scss). The way Jekyll handle's bundle theme assets that doesn't work. So the note is there as a work around.

The way you've done it is the preferred way since you're only touching one file. It's the same issue where people fork the entire theme and then it's instantly out of date and hard to manage updates.

@pascal-winter
Copy link

pascal-winter commented Jan 6, 2020

For anyone coming here from google like I did, I just copied the _sass/minimal-mistakes.scss to my project and added this to the top of the file (preserving all the includes below it:

article.page {
    float: left;
    width: 100%;
}

@mmistakes, your documentation https://mmistakes.github.io/minimal-mistakes/docs/stylesheets/ says you have to copy the complete _sass folder, however I just changed the one file and it seems to all be working fine with Github Pages and Jekyll 3.8.5. Is this information still accurate?

Thanks.
Using your reply, I added the following lines of code to the _sass/minimal-mistakes.scss.
By calling classes: wide2 in the YAML of the page it seems to be working.

.wide2 {
  .page {
    float: left;
    width: 100%;
    @include breakpoint($large) {
      padding-left: 0;
    }

    @include breakpoint($x-large) {
      padding-left: 0;
    }
  }

  .page__related {
    @include breakpoint($large) {
      padding-left: 0;
    }

    @include breakpoint($x-large) {
      padding-left: 0;
    }
  }
}

@mmistakes
Copy link
Owner

mmistakes commented Jan 6, 2020

@wiloo82 Yes that info is correct. The preferred way of installing the theme is as a gem (or remote_theme). When doing so you won't have a _sass folder (or _layouts, _includes, etc.) in your repo as it comes directly from the bundled theme.

I'm guessing you forked the theme, which is why you were able to simply update the one file. This is fine, just more work as you'll have to make sure you're always in sync with the them going forward and pull in any changes I make in the future.

If you install as a remote_theme you don't have to do any of that.

@pascal-winter
Copy link

@wiloo82 Yes that info is correct. The preferred way of installing the theme is as a gem (or remote_theme). When doing so you won't have a _sass folder (or _layouts, _includes, etc.) in your repo as it comes directly from the bundled theme.

I'm guessing you forked the theme, which is why you were able to simply update the one file. This is fine, just more work as you'll have to make sure you're always in sync with the them going forward and pull in any changes I make in the future.

If you install as a remote_theme you don't have to do any of that.

Thanks, I did install it as a remote theme and added a _sass folder to override this specifc classes: wide2.

NaanProphet added a commit to NaanProphet/tripodvideoninja that referenced this issue Mar 8, 2022
- took a lot of circuitous searching on https://github.com/mmistakes/minimal-mistakes/issues
- finally found mmistakes/minimal-mistakes#1322 (comment)
- some additional customization with the padding
nikkijhart added a commit to nikkijhart/nikkijhart.github.io that referenced this issue Sep 25, 2023
yanghuikang added a commit to yanghuikang/yanghuikang.github.io that referenced this issue Aug 22, 2024
add a wide2 class to disable sidebar (solution from mmistakes/minimal-mistakes#1322 (comment))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants