5

I'm attempting to make a CV using R Markdown and the {pagedown} package.

Is it possible to only include the grey aside bar on the first page?

I've tried playing with the page identifiers as described here.

@page :first {
  .aside{
    width: var(--sidebar-width);
    padding: 0.6in var(--sidebar-horizontal-padding);
    font-size: 0.8rem;
    float: right;
    position: absolute;
    right: 0;
  }
}

My hope was that defining the .aside inside :first would make the grey aside bar only appear on page one, but no luck. Any suggestions?

A minimal example is here: https://github.com/wjakethompson/cv-test

Jake Thompson
  • 2,591
  • 1
  • 16
  • 32

2 Answers2

4

with an new package updates, this previous answer wont work, you need to add this code chunk inside the rmd section:

```{css, echo=FALSE}
.pagedjs_page:not(:first-of-type) {
  --sidebar-width: 0rem;
  --sidebar-background-color: #ffffff;
  --main-width: calc(var(--content-width) - var(--sidebar-width));
  --decorator-horizontal-margin: 0.2in;
}
```
yuliaUU
  • 1,581
  • 2
  • 12
  • 33
3

This question got solved here.

This can be achieved by adding the following to the css file:

.pagedjs_page:not(:first-of-type) {
  --sidebar-width: 0rem;
  --sidebar-background-color: #ffffff;
  --main-width: calc(var(--content-width) - var(--sidebar-width));
  --decorator-horizontal-margin: 0.2in;
}
Jake Thompson
  • 2,591
  • 1
  • 16
  • 32