carpentries-incubator / bioc-rnaseq

Analysis and Interpretation of Bulk RNA-Seq Data using Bioconductor
https://carpentries-incubator.github.io/bioc-rnaseq
Other
21 stars 29 forks source link

To Do before BioC2023 workshop #58

Open jdrnevich opened 1 year ago

jdrnevich commented 1 year ago

List of things still needing to be done:

### Tasks
jokergoo commented 1 year ago

I have a solution for task 4: "Check on callout box types - varnish package"

Basically you add a small piece of Javascript code to the end of the Rmarkdown document. I also added the usage as comments in the following code:

<script>
$(function() {
    // this part is for the "pre-defind callouts", including
    //   callout prereq
    //   callout challenge
    //   callout keypoints
    //   callout checklist
    //   callout testimonial
    //   callout discussion
    var callout_class = "challenge";  // here pick one predefined callout class, e.g. "challenge"
    var callout = $(".callout." + callout_class);
    callout.css("border-color", "red");  // select a color, this is for the left border of the box
    callout.find(".callout-square").css("background", "red"); // this is the background of the icon

    // if it is a general "callout", we need to filter the callout title
    // value for callout_title can be partial from the complete title
    var callout_title = "reading";  // short for "further reading"

    // then we select those callouts with the specified title
    var callout = $(".callout").filter(function(index) {
        var title = $(this).find(".callout-title").text();
        return title.indexOf(callout_title) >= 0;
    });
    callout.css("border-color", "blue"); // select a color, this is for the left border of the box
    callout.find(".callout-square").css("background", "blue"); // select a color, this is for the left border of the box

    // if you want to replace the default icon, go to https://feathericons.com/, and get the source of the svg icon.
    // here something is very important is you must add 'callout-icon' to the class of this svg
    var svg = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-award callout-icon"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>';
    // then update it with the new icon
    callout.find(".callout-square").html(svg);

});
</script>

Validation: I changed the default icon to the "award" and the color from "deep green purple" to blue

Before:

image

After:

image
jokergoo commented 1 year ago

And for task 3, you can add a knitr global option in the beginning of the rmarkdown document:

 ```{r, echo = FALSE, message = FALSE}
library(knitr)
knitr::opts_chunk$set(
    warning = FALSE
)
 \```
jdrnevich commented 1 year ago

Thanks, @jokergoo ! This last worked to get rid of warnings