MangoTheCat / rmdshower

R Markdown template for shower
http://mangothecat.github.io/rmdshower/skeleton.html
Other
147 stars 42 forks source link

Adjusting title position on a slide. #25

Closed sje30 closed 8 years ago

sje30 commented 8 years ago

I really like the ribbon style for making styles -- it seems quite clean, minimal. My main concern is that I think the title should be much higher on the slide -- otherwise, there is too much space at the top of the slide.

I have manually solved this problem by editing screen.css to reduce the padding on the slide, so that the relevant part of the .slide{} component reads

padding:46px 80px 0;width:1024px;height:768px

whereas before it was:

padding:106px 100px 0;width:1024px;height:768px

(I would ordinarily send a diff, but given the way these files are one long line, it seems hard to do so).

An example of the resulting slides can be found at: http://sje30.github.io/talks/2016/uknode.html

What is the preferred way to add our own customisations to the inbuilt styles?

gaborcsardi commented 8 years ago

You can add your own CSS: http://rmarkdown.rstudio.com/html_document_format.html#custom_css

sje30 commented 8 years ago

Thanks. Do I need the whole edited file, or can I just add a snippet into my own custom.css file, like:

.slide{position:relative;z-index:1;overflow:hidden;padding:46px 80px      0;width:1024px;height:768px;background:#fff;font-size:25px}
sje30 commented 8 years ago

just checked, and yes, I have got this working by adding the following to a local.css file:

/* simply move the title up the page by decreasing padding */
.slide{position:relative;z-index:1;overflow:hidden;padding:46px 80px 0;width:1024px;height:768px;background:#fff;font-size:25px}

and then using the

output:
  rmdshower::shower_presentation:
    self_contained: true
    katex: false
    theme: ribbon
    css: custom.css