-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
noaa-onms/cinms#69 added test site functionality
- Loading branch information
Showing
143 changed files
with
23,693 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#' Create new site from template | ||
#' | ||
#' This function creates a new site from a template stored within the package. | ||
#' | ||
#' @param directory_name The directory where the new site should be located. | ||
#' @return The output is a directory containing the template version of a site. | ||
#' @export | ||
#' @examples \dontrun{ | ||
#' directory_name("test_location") | ||
#' } | ||
#' | ||
|
||
initial_build <- function(directory_name){ | ||
if (dir.exists(directory_name)){ | ||
stop(paste("Error: the directory -", directory_name, "- already exists.")) | ||
|
||
} | ||
directory_to_copy <- system.file("template", package = "nms4r") | ||
dir.create(directory_name) | ||
file.copy(directory_to_copy, directory_name, recursive = T) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Template info" | ||
output_dir: "." | ||
description: | | ||
Template info | ||
navbar: | ||
title: "Template" | ||
icon: fa-info | ||
left: | ||
- text: "Subject 1" | ||
href: index.html | ||
- text: "Subject 2" | ||
href: subject2.html | ||
right: | ||
- text: "About" | ||
href: https://marinebon.org/sanctuaries/ | ||
output: | ||
html_document: | ||
theme: lumen # darkly # cosmo # https://bootswatch.com | ||
self_contained: no | ||
css: libs/styles.css | ||
mathjax: null | ||
anchor_sections: FALSE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script src="libs/d3.v5.min.js"></script> | ||
<script src="libs/infographiq.js"></script> | ||
<link href="libs/bootstrap-toggle.min.css" rel="stylesheet"> | ||
<script src="libs/bootstrap-toggle.min.js"></script> | ||
|
||
|
||
<div class = "col-md-9"> | ||
<div id = "svg"></div> | ||
</div> | ||
|
||
<div class = "col-md-3"> | ||
|
||
Text: <input id="toggle-text" type="checkbox" data-toggle="toggle" data-size="mini"> | ||
<div id="toggle-text-event"></div> | ||
<ul id = "svg_list"></ul> | ||
</div> | ||
|
||
<script> | ||
link_svg(svg = "`r params$svg`", csv = "`r params$csv`", debug = true); | ||
</script> | ||
|
||
<script> | ||
$(function() { | ||
$('#toggle-text').change(function() { | ||
display = this.checked ? "inline" : "none"; | ||
d3.select("#text").attr("display", display); | ||
}) | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "Subject 1" | ||
params: | ||
csv: "svg/svg_links_template.csv" | ||
svg: "svg/example1.svg" | ||
--- | ||
|
||
Replace with your text. | ||
|
||
```{r svg, child = '_svg-html_child.Rmd'} | ||
``` | ||
|
Oops, something went wrong.