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

Add options to remove borders and titles #240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add options to remove borders and titles #240

wants to merge 1 commit into from

Conversation

celiopassos
Copy link

The page looks better to print to a pdf when running with both options. The remove borders option ('-B') doesn't work with '--user-content', although it should be easy to make it work.

@CWempe
Copy link

CWempe commented Nov 28, 2017

Any update about merging this PR?

@mbound
Copy link

mbound commented Jun 20, 2018

+1 on this feature, would be quite neat to have

@0x-2a
Copy link

0x-2a commented Aug 21, 2019

Annoying to do this, but workaround:

create a file like grip.css and throw it out on a github repo somewhere with:

    .preview-page {margin-top: 8px !important;}  #readme > h3 {display:none;}

create a file ~/.grip/settings.py with

STYLE_URLS = ["https://raw.githubusercontent.com/USERNAME/REPO_NAME/master/grip.css"]

then run grip foo.md --export foo.html

@ZNielsen
Copy link

ZNielsen commented Apr 3, 2020

I would really love this feature! Is there any plan to bring this in?

@y3sh, does that workaround only work when exporting, or should it work for the live rendering too?

@ASL07
Copy link

ASL07 commented Jun 25, 2020

Annoying to do this, but workaround:

create a file like grip.css and throw it out on a github repo somewhere with:

    .preview-page {margin-top: 8px !important;}  #readme > h3 {display:none;}

create a file ~/.grip/settings.py with

STYLE_URLS = ["https://raw.githubusercontent.com/USERNAME/REPO_NAME/master/grip.css"]

then run grip foo.md --export foo.html

Hi,
This doesn't seem to work for me.
I tried both using a public github repo and a local css file, but the styles are not loaded
I added

pre {
    white-space: pre-wrap !important;
    white-space: -moz-pre-wrap !important;
    white-space: -pre-wrap !important;
    white-space: -o-pre-wrap !important;
    word-wrap: break-word !important;
    overflow: hidden !important;
}

to ~/.grip/settings.py

But the styles are not applying. How can I check wether grip is loading the css file?

BTW: I just want to remove scroll from the html code blocks (or maybe reduce the font size), because it cuts up the code up when I convert the html to pdf. Maybe there is a better way to achieve it

Thank you

@KillianGDK-FDTI
Copy link

KillianGDK-FDTI commented Sep 12, 2020

Annoying to do this, but workaround:

create a file like grip.css and throw it out on a github repo somewhere with:

    .preview-page {margin-top: 8px !important;}  #readme > h3 {display:none;}

create a file ~/.grip/settings.py with

STYLE_URLS = ["https://raw.githubusercontent.com/USERNAME/REPO_NAME/master/grip.css"]

then run grip foo.md --export foo.html

If you are lazy to host your own grip.css you can use mine here : https://raw.githubusercontent.com/KillianGDK-FDTI/grip_remove_header/master/grip.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants