Shiny Presentation (ioslides): Custom CSS and logo Windows 7/8
This problem can be fixed by installing version 0.5.2 of the rmarkdown package. Currently this is the development version and can be installed from GitHub using:
install.packages("devtools")
library(devtools)
devtools::install_github("rstudio/rmarkdown")
R Shiny - Paths of logo and CSS file when I split ui and server files
To fix the css include, call setwd(TheFileDirectory)
before calling source
or reference the full path to the css. But note this is not good practice and you will have a lot of renaming to apply whenever the path to the app changes.
(Instead you might want to run the app from its folder and reference the data. Thta wayy all your renaming would be at the same place)
To fix the logo, you can add a prefix to its source :
src = "/foo/logo.png"
Then make this call before starting the app with shinyApp
:
addResourcePath("foo", "www")
It will make shiny start serving the folder www
to the reference /foo
How to add logo to each slide in ioslides in RStudio
Have you tried publishing your slides? I've found on Windows 8.1 that the icon does not appear in the RStudio preview, but it's there when I publish them to shinyapps.io.
If you want to force the icon to show up in the RStudio preview you can use:
---
title: " "
author: " "
date: " "
output:
ioslides_presentation:
widescreen: false
logo: logo_wp.png
runtime: shiny
---
```{r, echo=FALSE}
logo<-"path_to_logo_wp.png"
```
# Caption1
## Caption 2
<IMG style="position:absolute;bottom:2.5%;left:5%;width:35px;"SRC="`r logo`">
Note: you'll have to include this last line of code on each content slide you want the logo to appear. If you choose to publish the slides, this "forced" icon will be placed on top of the "native" icon called out in the YAML header.
ioslides presentation doesn't render png image file
JJ Allaire (CEO of RStudio!) provided answers on GitHub here:
jjallaire answers
I will summarize by saying that if an ioslides presentation contains an embedded shiny application, then it requires that image files be either stored in the same directory as the .Rmd file, or in a subdirectory, not in a separate directory branch. The image files should be referenced using relative file paths, instead of absolute paths. This is because when ioslides presentations are knitted (parsed), they are stored as a directory containing .js and other files, and all images must be copied into that directory. Hard-coding absolute file paths prevents RStudio knitr from copying the image files.
I copied the image file to an "image" subdirectory, and changed my rmarkdown code to this, and it now works:
![smiling_face](image/smile_small.png)
Related Topics
Color for Styled Placeholder Text Is Muted in Firefox
Gotham Book' Font-Family Not Working in Safari Browser and iPhone Devices
How to Config Workspace in Chrome
Asp.Net MVC Navbar-Brand to Header Text Color
How to Apply CSS for Specific Chrome Version
Can't Get My Div to Stay Fixed with Layout
What Does The Smiley Face ":)" Mean in CSS
Flash of Unstyled Content (Fouc) in Firefox Only? Is Ff Slow Renderer
How to Limit The Height of The Modal
Bootstrap 3: Using Img-Circle, How to Get Circle from Non-Square Image
Grid Layout: Create CSS So Elements Keep Position When Adjacent Element Gets Resized
In HTML Table How to Force Cell Text to Truncate and Not Increase The Width of The Cell or Wrap
Aligning Grid Based Form Elements and Their Labels
Style Different Characters Inside: :After Content
Bootstrap 3 - Change Dropdown Background Colour
How to Show/Set Row Names to Matrixinput (Shinyincubator)
Free Tools to Speed Up Web Development
With Webpack, How to Generate CSS Only, Excluding The Output.Js