yulijia / freshman21

Welcome to use Jekyll theme Freshman21.
http://yulijia.net/freshman21/
MIT License
133 stars 90 forks source link

Each page has a class "about" for all images #23

Closed RAlexeev closed 7 years ago

RAlexeev commented 7 years ago

As I understand, in the file _layouts/page.html you apply class "about" to all "page"s:

  <article class="post-content about"> 
    {{ content }}
  </article>

And in case I would like to add new page, for example, "Collections.md" with some images, then all images are in a circle. I delete "about" in the file _layouts/page.html:

  <article class="post-content"> 
    {{ content }}
  </article>

and in case if I would like to make image in circle, like in your example in http://yulijia.net/freshman21/about, I add new class in _sass/_layout.scss:

.img-about
{
  height: 128px;
  width: 128px;
  border-radius:50%;
  margin: 0 auto;
  display: block;
}

And in 2_about.md use markdown syntax:

![麋鹿](https://i.imgur.com/Mdc4szJl.jpg){: .img-about}

Maybe there is more elegant solution for this problem.

yulijia commented 7 years ago

Thanks.