AdrianArtiles / MediumFox

A theme for Octopress that is simple, focused, and clean. Influenced by the clean style of Medium and FoxSlide
MIT License
148 stars 45 forks source link

About changing the background image height to 100% #10

Open weiwangdavid opened 10 years ago

weiwangdavid commented 10 years ago

Hi there,

I wanna change my blog's background image height to 100%. I have modify the .themes/MediumFox/sass/base/_layout.scss to change the .hero.height: 100% but it has no effect. Could you please tell me how can I achieve my purpose?

Great thanks!

aribajahan commented 10 years ago

If you are trying to just increase the entire size of your background image you have to edit two places in the _layout.scss file : First place: background height: height: Then the homepage margin: .home-page { margin-top:

Mine is pretty wide and tall: aribajahangithub.io My values are: height: 750px and margin top is 750px

weiwangdavid commented 10 years ago

Hi aribajahan,

I have modify base/_layout.scss like:

.hero {
  position: fixed;
  top: 0;
  width: 100%;
  background-attachment: scroll;
  background-clip: border-box;
  background-color: #323232;
  background-image: url("/images/background.jpg");
  background-origin: padding-box;
  background-position: 0 0;
  background-repeat: repeat;
  background-size: cover;
  margin: 0px;
  padding: 200px 0px;
  z-index: -1;
  height: 850px;
  text-align: center;
  color: white;

  > h1 {
    font-weight: 700;
    font-style: normal;
    font-size: 50px;
    line-height: 1;
    margin-bottom: 8px;
    outline: 0;
    word-break: break-word;
  }

  > p {
    letter-spacing: .01rem;
    font-weight: 400;
    font-style: normal;
    font-size: 22px;
  }
}

.home-page {
  margin-top: 750px;
}

And I have executed "rake generate", but nothing changed in _depoly/stylesheets/screen.scss...

Should I modify it in the /custom/_layout.scss?

aribajahan commented 10 years ago

Change the home page margin to have the same value.

Also, you should do rake preview and then view your changes locally on your local host server. Then you don't have to go through the entire git commit process until you are satisfied with the changes.

Do rake preview and see if you your changes? If you do then there may be something up with the steps.

The usual process (just in case) rake generate rake deploy git add . git commit -m 'Update yada yada' git push

weiwangdavid commented 10 years ago

Thanks aribajahan!

The problem have worked out. I have re-install the MediumFox after I modify the _layout file. The template file should be copied to work dir.