atlas-aai / ratlas

Custom graphics and report generation for @atlas-aai
https://ratlas.netlify.app
28 stars 8 forks source link

Xaringan template #27

Closed noellepablo closed 4 years ago

noellepablo commented 4 years ago

Hi Jake,

I had a breakthrough with the xaringan template this week, and I think I got it to work! :) I didn't add any unit tests because I didn't create any functions, but let me know if you think I should.

Here's what I did: 1) add xaringan package to DESCRIPTION file 2) create "atlas-presentation" folder 3) create "atlas-presentation/template.yaml" file 4) create "atlas-presentation/skeleton" folder 5) created "atlas-fonts.css" and "atlas.css" files and put them in "skeleton" folder 6) created "skeleton.Rmd" template file and put it into the skeleton folder

Please review and let me know what you think. Here is the example presentation I made using the template: S:\Projects\DLM Secure\Staff Projects\Noelle Projects\xaringan stuff\xaringan-test.html

Closes #7

wjakethompson commented 4 years ago

This is crazy good! Very excited this is happening. I've made a few tweaks to the css to more closely match the ppt template. It also looks like the default slide uses the "alternative" slide in the ppt template (i.e., the blue bar on the bottom). Would you be able to add the other slide template as well (i.e., the one with the color bar on the side)?

I also did a little rearranging of the css file to appease my OCD. Hopefully you can see where I put things without too much trouble!

Once we get the templates all figured out, we can start playing around with a wrapper function (something similar to ratlas::topicguide_docx()) so that we don't have to have all that YAML at the top. But that can wait for now.

Great work!

noellepablo commented 4 years ago

Hi Jake,

I replaced the imgbb URLs with imgur URLs and also added a "reg-slide" class in the "atlas.css" file. This "reg-slide" should have the powerpoint background that has the vertical bar and small ATLAS icon on the bottom left.

My original method was saving the blank powerpoint slide as an image, but that made the icon blurry (I tried JPG, PNG, and TIFF-- all blurry). So I saved the slide without the icon, found the actual icon image in the ATLAS Branding folder, uploaded those two files on imgur, then made the "reg-slide" class have two background images. Basically I just pasted the logo on top of the background with the vertical bar. I think it looks clearer than when I saved the whole background as one image, but let me know if you think it still looks fuzzy.

Also, I'm not sure why, but these imgur URLs do not show up in the R window that displays the slides after you click "Knit". However, if you click "open in browser" or just open up the HTML file of the slides, then all the imgur URLs show up.

Thank you! Noelle