Преглед изворни кода

Add hero_body YAML and update skeleton.Rmd

master
Garrick Aden-Buie пре 7 година
родитељ
комит
7ed4d74a12
5 измењених фајлова са 33 додато и 17 уклоњено
  1. +2
    -1
      R/bulma_document.R
  2. +2
    -2
      inst/bulma/bulma.html
  3. +10
    -6
      inst/rmarkdown/templates/bulma_document/skeleton/skeleton.Rmd
  4. +2
    -1
      man/bulma_document.Rd
  5. +17
    -7
      tests/manual/layout/level/bulma_layout_level.Rmd

+ 2
- 1
R/bulma_document.R Прегледај датотеку

#' You can pass additional options to the underlying template via the `bulma` #' You can pass additional options to the underlying template via the `bulma`
#' YAML item. The following options can be specified there. #' YAML item. The following options can be specified there.
#' \itemize{ #' \itemize{
#' \item{`hero`: Classes applied to the hero containing the title}
#' \item{`hero`: Classes applied to the hero containing the title.}
#' \item{`hero_body`: Classes applied to the hero body container.}
#' \item{`hero_button`: Classes applied to the `header_links` buttons} #' \item{`hero_button`: Classes applied to the `header_links` buttons}
#' \item{`hero_links`: Links that will be displayed under title as buttons. #' \item{`hero_links`: Links that will be displayed under title as buttons.
#' Formatted as a list, each element having entries for `name`, `url`, #' Formatted as a list, each element having entries for `name`, `url`,

+ 2
- 2
inst/bulma/bulma.html Прегледај датотеку

<body> <body>
<section class="hero$if(bulma.hero)$$for(bulma.hero)$ is-$bulma.hero$$endfor$$else$ is-primary$endif$"> <section class="hero$if(bulma.hero)$$for(bulma.hero)$ is-$bulma.hero$$endfor$$else$ is-primary$endif$">
<div class="hero-body"> <div class="hero-body">
<div class="container">
<div class="container$if(bulma.hero_body)$$for(bulma.hero_body)$ $bulma.hero_body$$endfor$$endif$">
$if(title)$ $if(title)$
<h1 class="title is-1 toc-ignore">$title$</h1> <h1 class="title is-1 toc-ignore">$title$</h1>
$endif$ $endif$
$if(bulma.hero_links)$ $if(bulma.hero_links)$
<div class="buttons"> <div class="buttons">
$for(bulma.hero_links)$ $for(bulma.hero_links)$
<a class="button $if(bulma.hero_button)$$for(bulma.hero_button)$ is-$bulma.hero_button$$endfor$$else$is-primary is-inverted is-outlined$endif$" href="$bulma.hero_links.url$">
<a class="button$if(bulma.hero_button)$$for(bulma.hero_button)$ is-$bulma.hero_button$$endfor$$else$is-primary is-inverted is-outlined$endif$" href="$bulma.hero_links.url$">
$if(bulma.hero_links.icon)$ $if(bulma.hero_links.icon)$
<span class="icon is-small"> <span class="icon is-small">
<i class="$bulma.hero_links.icon$"></i> <i class="$bulma.hero_links.icon$"></i>

+ 10
- 6
inst/rmarkdown/templates/bulma_document/skeleton/skeleton.Rmd Прегледај датотеку

- "Second Affiliation" - "Second Affiliation"
- "Very Cool Guy" - "Very Cool Guy"
date: '`r strftime(Sys.time(), "%F %T")`' date: '`r strftime(Sys.time(), "%F %T")`'
header-links:
- name: Github
url: https://github.com/gerkelab
- name: Home
url: https://gerkelab.com
bulma: bulma:
hero: ["info", "bold"]
hero: ["info"]
hero_body: "has-text-left"
hero_button: "outlined"
hero_links:
- name: Github
url: https://github.com/gerkelab
icon: '`r bulma::fa_icon("github")`'
- name: Home
url: https://gerkelab.com
icon: '`r bulma::fa_icon("home")`'
output: bulma::bulma_document output: bulma::bulma_document
--- ---



+ 2
- 1
man/bulma_document.Rd Прегледај датотеку

You can pass additional options to the underlying template via the \code{bulma} You can pass additional options to the underlying template via the \code{bulma}
YAML item. The following options can be specified there. YAML item. The following options can be specified there.
\itemize{ \itemize{
\item{\code{hero}: Classes applied to the hero containing the title}
\item{\code{hero}: Classes applied to the hero containing the title.}
\item{\code{hero_body}: Classes applied to the hero body container.}
\item{\code{hero_button}: Classes applied to the \code{header_links} buttons} \item{\code{hero_button}: Classes applied to the \code{header_links} buttons}
\item{\code{hero_links}: Links that will be displayed under title as buttons. \item{\code{hero_links}: Links that will be displayed under title as buttons.
Formatted as a list, each element having entries for \code{name}, \code{url}, Formatted as a list, each element having entries for \code{name}, \code{url},

+ 17
- 7
tests/manual/layout/level/bulma_layout_level.Rmd Прегледај датотеку

- "Second Affiliation" - "Second Affiliation"
- "Very Cool Guy" - "Very Cool Guy"
date: '`r strftime(Sys.time(), "%A, %B %e, %Y")`' date: '`r strftime(Sys.time(), "%A, %B %e, %Y")`'
header-links:
- name: Github
url: https://github.com/gerkelab
- name: Home
url: https://gerkelab.com
bulma: bulma:
hero: ["dark"]
hero_button: ["is-secondary"]
hero: ["primary"]
hero_body: "has-text-left"
hero_button: ["primary", "outlined", "inverted"]
hero_links:
- name: Github
url: https://github.com/gerkelab
icon: '`r bulma::fa_icon("github")`'
- name: Home
url: https://gerkelab.com
icon: '`r bulma::fa_icon("home")`'
output: bulma::bulma_document output: bulma::bulma_document
editor_options: editor_options:
chunk_output_type: console chunk_output_type: console
library(bulma) library(bulma)
``` ```


<a class="button is-primary">
<span class="icon is-small">
`r bulma::fa_icon("r-project", as_html = TRUE)`
</span>
<span>Souce Code</span>
</a>

## Level ## Level


### Basic ### Basic

Loading…
Откажи
Сачувај