Skip to content

Commit

Permalink
Extract rmdgallery include_before/_after as files (fix inline depreca…
Browse files Browse the repository at this point in the history
…tion)
  • Loading branch information
riccardoporreca committed Nov 29, 2022
1 parent 6ca6d78 commit e3ec529
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
10 changes: 10 additions & 0 deletions _includes/after_gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<hr/><div class="row">
<span>
&copy; {{format(Sys.Date(), "%Y")}}
<a href="https://mirai-solutions.ch" target="_blank">Mirai Solutions GmbH</a>
</span>
<span style="float: right;"><em>
Created with <a href="https://riccardoporreca.github.io/rmdgallery" target="_blank">rmdgallery</a>
{{utils::packageVersion("rmdgallery")}}
</em></span>
</div><hr/>
12 changes: 12 additions & 0 deletions _includes/before_gallery.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{htmltools::tagList(
htmltools::tags$script(src="main.js"),
htmltools::div(
class = "row",
htmltools::h3(title, style = htmltools::css(display = "inline")),
htmltools::tags$em("by", author),
htmltools::tags$sup(
"[", htmltools::a("source", href = url, target = "_blank", .noWS = "outside"), "]"
)
),
htmltools::hr()
)}}
26 changes: 2 additions & 24 deletions _site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,5 @@ gallery:
left:
- text: "Gallery"
icon: fa-gear
include_before: |
{{htmltools::tagList(
htmltools::tags$script(src="main.js"),
htmltools::div(
class = "row",
htmltools::h3(title, style = htmltools::css(display = "inline")),
htmltools::tags$em("by", author),
htmltools::tags$sup(
"[", htmltools::a("source", href = url, target = "_blank", .noWS = "outside"), "]"
)
),
htmltools::hr()
)}}
include_after: |
<hr/><div class="row">
<span>
&copy; {{format(Sys.Date(), "%Y")}}
<a href="https://mirai-solutions.ch" target="_blank">Mirai Solutions GmbH</a>
</span>
<span style="float: right;"><em>
Created with <a href="https://riccardoporreca.github.io/rmdgallery" target="_blank">rmdgallery</a>
{{utils::packageVersion("rmdgallery")}}
</em></span>
</div><hr/>
include_before: _includes/before_gallery.R
include_after: _includes/after_gallery.html

0 comments on commit e3ec529

Please sign in to comment.