knitr::opts_chunk$set( eval=F, collapse = TRUE, comment = "#>" )
library(econWeb)
Select the UI frame to export then right click to choose Copy/Paste as > Copy as CSS
In R
fig <- Fig()
Adjust frame inner content, if any:
fig$split_innerContent$`card-content-word-title`="Trick" fig$split_innerContent$`card-content-word-pronun`="US /trɪk/ US /trɪk/" fig$split_innerContent$`card-content-word-explain`="adj. 虛弱的;欺詐的 n. 戲法;竅門;訣竅;把戲;特技" fig$split_innerContent$`card-content-teacher-word`="前往VoiceTube 聽 Leila 老師如何應用單字" fig$split_innerContent$`card-content-btn-level`="A2 初級" fig$update_div()
Adjust css, if any:
fig$split_css$`card-content-teacher-word`$remain$width <- "min-content" fig$update_css()
Final check:
fig$ui() |> browseTag2()
Export with a tagname:
fig$export(tagname="card")
tag_ui <-function(){ ... } tag_dependency <- function(){ htmltools::htmlDependency( ... )} ui <- function(){ tagList(tag_ui(), tag_dependency()) } ui() |> browseTag2()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.