Skip to content

Commit

Permalink
move script around
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Jan 13, 2024
1 parent b7148c8 commit 605135e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


<p align="center">
<img src="man/figures/tinytable_logo.svg" height = "250" class = "center">
</p>
Expand Down
42 changes: 21 additions & 21 deletions inst/templates/bootstrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>$tinytable_TABLE_ID</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script>
function styleCell(i, j, css_id) {
var table = document.getElementById("$tinytable_TABLE_ID");
table.rows[i].cells[j].classList.add(css_id);
}
function insertSpanRow(i, colspan, content) {
var table = document.getElementById('$tinytable_TABLE_ID');
var newRow = table.insertRow(i);
var newCell = newRow.insertCell(0);
newCell.setAttribute("colspan", colspan);
newCell.innerText = content;
}
// tinytable cells before this
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<style>
table {
width: auto;
Expand All @@ -29,27 +50,6 @@
</table>
</div>

<script>
function styleCell(i, j, css_id) {
var table = document.getElementById("$tinytable_TABLE_ID");
table.rows[i].cells[j].classList.add(css_id);
}
function insertSpanRow(i, colspan, content) {
var table = document.getElementById('$tinytable_TABLE_ID');
var newRow = table.insertRow(i);
var newCell = newRow.insertCell(0);
newCell.setAttribute("colspan", colspan);
newCell.innerText = content;
}
// tinytable cells before this
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
</body>

</html>
Expand Down

0 comments on commit 605135e

Please sign in to comment.