joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.46k stars 424 forks source link

Add an option to remove title and borders #239

Open celiopassos opened 7 years ago

celiopassos commented 7 years ago

Most of the times, the markdown file already possesses a header/title and, as such, it is isn't necessary to show another title.

The borders don't look good when I print the page as a pdf (there is no top or bottom borders when pages are split) and so it would be good to have an option to disable borders.

dylan-robins commented 6 years ago

Was thinking of this yesterday. My current work around is modifying the html/CSS using Inspect Element in my browser, and then printing to pdf, but it's rather cluncky, especially if you have multiple files to print. I'll be taking a look at the source code in a couple of weeks, once I'm out of uni, so I'll try to add this (if I can).

celiopassos commented 6 years ago

@dylan-robins I managed to do it, forgot to mention it here, although the automated tests failed, see #240.

davestewart commented 5 years ago

Surely the default should just be a print stylesheet?

@media print {

  #preview-page {
    margin: 0;
  }

  .repository-content > div > h3 {
    display: none;
  }

  .markdown-body.entry-content {
    padding: 0;
    border: 0;
  }

}