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

Size of logo image #23

Open
RodrigoCerqueira opened this issue Jan 19, 2021 · 5 comments
Open

Size of logo image #23

RodrigoCerqueira opened this issue Jan 19, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@RodrigoCerqueira
Copy link

RodrigoCerqueira commented Jan 19, 2021

Hi guys,

Is there any way of control the size of a logo?
I was trying to put an .png image as my doc logo on a grid teamplate and the result was a very small logo as you can se bellow:
image

@tvroylandt tvroylandt added the enhancement New feature or request label Jan 20, 2021
@tvroylandt
Copy link
Collaborator

Hi Rodrigo,

The size of the logo is hardcoded in the CSS to be 2cm (https://github.com/rfortherestofus/pagedreport/blob/main/inst/resources/css/style_grid.css#L215).

I take the idea to make it changeable as an improvment.

In the middle, you can change it in the file (putting the value you want) and re-install the package from your local change. It will works.

@RodrigoCerqueira
Copy link
Author

Thanks, Thomas

That will be a good improvment.

Hi Rodrigo,

The size of the logo is hardcoded in the CSS to be 2cm (https://github.com/rfortherestofus/pagedreport/blob/main/inst/resources/css/style_grid.css#L215).

I take the idea to make it changeable as an improvment.

In the middle, you can change it in the file (putting the value you want) and re-install the package from your local change. It will works.

@morganlig
Copy link

Hi Rodrigo,

The size of the logo is hardcoded in the CSS to be 2cm (https://github.com/rfortherestofus/pagedreport/blob/main/inst/resources/css/style_grid.css#L215).

I take the idea to make it changeable as an improvment.

In the middle, you can change it in the file (putting the value you want) and re-install the package from your local change. It will works.

In case anyone has trouble figuring out where change the size in the .css file (like me):

  • The front page logo size is on line 231 - "background-size:"
  • The back page logo size is on line 297 - "background-size:"

And then you will need to change the position:

  • line 230 for the front
  • line 296 for the back (and lines 279 and 289 if you're having issues with your logo getting cut off on the right like I did)

My personal adjustments by line:

230 background-position: 30% 10%;
231 background-size: 5cm;
279 margin-left: 90%;
289 margin-right: -100%;
296 background-position: 85% 30%;
297 background-size: 5cm;

I don't know .css so that was a bit of a headache for me, but thank you so much Thomas for this beautiful package! It's going to make my reports look so good!

@tchatterton
Copy link

Hi - does anyone know the/any constraints on the image size or format for the front_img and back_img please?

I have had it work with a small image (37KB) that gets expanded to look rubbish, but I cant get it to load my higher quality image (11MB) - no error message - the covers just come up blank.
Thanks,
TIm

@dgkeyes
Copy link
Member

dgkeyes commented Jul 12, 2023

I don't know if there are constraints per se, but I would suggest making your 11mb image smaller before trying it with pagedreport.

@tvroylandt tvroylandt self-assigned this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants