Coder Social home page Coder Social logo

Comments (10)

mmistakes avatar mmistakes commented on April 28, 2024

@ozank I think you're on the right track. Remove the {% include author-bio.html %} like you did, and then beef up the margin-left on the #index div to make up for the missing space that the author bio sidebar was occupying. If you make it 25% like below you should be golden.

@media only screen and (min-width: 37.5em)
#index {
    display: inline;
    float: left;
    width: 50%;
    margin-left: 25%; /* change from 0% to 25% */
    margin-right: 0%;
}

from minimal-mistakes.

ozank avatar ozank commented on April 28, 2024

Thanks, that was spot on. What I ended up using is:

@media only screen and (min-width: 37.5em)
#index {
    display: inline;
    float: right;   /* change from left */
    width: 50%;
    margin-left: 0%; 
    margin-right: 25%; /* change from 0% to 25% */
    }

This way, I can add or remove the author info, without changing the layout.

from minimal-mistakes.

stanstrup avatar stanstrup commented on April 28, 2024

I'd like to do this too. But I can only find the right CSS in the generated CSS file. Which source file and where do I change this?

from minimal-mistakes.

mmistakes avatar mmistakes commented on April 28, 2024

@stanstrup The source files are all in /_sass/, you'll probably find what you need in the page.scss partial.

from minimal-mistakes.

stanstrup avatar stanstrup commented on April 28, 2024

Thanks again for your help and patience. I cannot for the life of me figure which line to change. If I simply add

#index {
    margin-left: 25%;
}

to the end of the document it works though.

from minimal-mistakes.

mmistakes avatar mmistakes commented on April 28, 2024

The #index declarations are all around line 248. The media query mixins are probably what are tripping you up. Because the theme is responsive the column widths change depending on the screen size. Depending on where you place margin-left: 25%; will have different results.

You'll probably want to add it here so it pushes the main column over on larger screens only since on mobile the theme defaults to a single tube of content.

@media #{$x-large} {
    @include grid(12,4.5);
    margin-left: 25%;
}

The smarter thing would be to use the prefix mixin to pad the left and fill the space originally occupied by the author sidebar.

@media #{$x-large} {
    @include grid(12,4.5);
    @include prefix(12,3); // adds 3 columns of blank space to the left
}

from minimal-mistakes.

stanstrup avatar stanstrup commented on April 28, 2024

Thanks so much! It works great. And you are right. I thought I had a decent grasp of basic CSS but I am wholly unfamiliar with this syntax.

from minimal-mistakes.

mmistakes avatar mmistakes commented on April 28, 2024

@stanstrup For the most part Sass is CSS, it just has a few tricks up its sleeve like nesting, variables, and mixins to augment things. The basics are documented here if you're interested.

from minimal-mistakes.

stanstrup avatar stanstrup commented on April 28, 2024

Thanks for the pointer. I will read up on this as I move along with my own site.

from minimal-mistakes.

stanstrup avatar stanstrup commented on April 28, 2024

For reference here is a version with no sidebar and more space in the middle based on @srijanshetty's fork (has categorized posts).
It has been cleaned up (stuff deleted) to be a minimal starting point for a new site.

from minimal-mistakes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.