Skip to content

Commit

Permalink
Merge pull request #5 from fhdsl/4-rstudio-project-template
Browse files Browse the repository at this point in the history
4 rstudio project template
  • Loading branch information
howardbaik authored Apr 11, 2024
2 parents c26ef14 + cfea0e6 commit 706d94a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 64 deletions.
8 changes: 7 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,16 @@ bibliography: references.bib
format:
html:
css: style.css
linkcolor: "#00C1D5"
mainfont: "Karla"

code-link: true
code-copy: true

link-external-newwindow: true
linkcolor: "#00C1D5"

image: img/favicon.ico
license: "CC BY"
knitr:
opts_chunk:
fig.path: "resources/images/figure/"
Expand Down
83 changes: 20 additions & 63 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pre {
word-break: normal;
word-wrap: normal;
}

/* Inherits the white-space property for consistent code formatting */
pre code {
white-space: inherit;
Expand All @@ -25,6 +26,8 @@ pre code {

/* Next 3 rules are for setting wide image at the top of each page and pushing down the book content to appear beneath the image */

/* TODO: Do we need this CSS for hero images? Do we want to put a hero image? */

/* Styles for a large image container at the top of each page */
.hero-image-container {
position: absolute;
Expand All @@ -49,24 +52,14 @@ pre code {
}


/* ------------Links------------------ */
/* Sets the color for links within a specific context */
.book .book-body .page-wrapper .page-inner section.normal a {
color: #68ace5;
}


/*------------- Body and header text---------------- */

.book.font-family-1 {
font-family: 'Karla', arial, sans-serif;
}
/*------------- Header text---------------- */

h1, h2, h3, h4 {
font-family: 'Lora', arial, sans-serif;
font-family: 'Lora', arial, sans-serif; /* TODO: Do we need arial, sans-serif? */
}


/* TODO: Do we need this? */
/* Can we use the margin-XXX fields in https://quarto.org/docs/reference/formats/html.html#layout */
.book .book-body .page-wrapper .page-inner section.normal h1,
.book .book-body .page-wrapper .page-inner section.normal h2,
.book .book-body .page-wrapper .page-inner section.normal h3,
Expand Down Expand Up @@ -107,6 +100,8 @@ h1, h2, h3, h4 {
}
*/


/* TODO: This doesnt work */
.section.level1 > p:first-of-type:first-letter { /*drop cap for first p beneath level 1 headers only within class .section*/
color: #012d72;
float: left;
Expand All @@ -119,26 +114,10 @@ h1, h2, h3, h4 {
margin-bottom: 9px;
}

/* add drop cap to first paragraph that follows the first 2nd level header*/
/*
.section.level2:first-of-type > p:first-of-type:first-letter {
color: #3fb5bd;
float: left;
font-family: 'Abril Fatface', serif;
font-size: 7em;
line-height: 65px;
padding-top: 4px;
padding-right: 8px;
padding-left: 3px;
margin-bottom: 9px;
}
*/



/*------------ TOC --------------*/


/* TODO: This doesnt work */
.book .book-summary {
background: white;
border-right: none;
Expand Down Expand Up @@ -188,6 +167,7 @@ li.appendix span, li.part span { /* for TOC part names */
}


/* TODO: This doesnt work */
/* The next two rules make the horizontal line go straight across in top navbar */

.summary > li:first-child {
Expand All @@ -202,6 +182,7 @@ li.appendix span, li.part span { /* for TOC part names */


/*--- LOGO ---*/
/* TODO: Do we want a TOC logo? */

.toc-logo {
width: 200px !important;
Expand All @@ -218,8 +199,9 @@ li.appendix span, li.part span { /* for TOC part names */
height: auto !important;
}

/* --------------Two columns--------------- */

/* --------------Two columns--------------- */
/* TODO: Where is this useful? */
.col2 {
columns: 2 200px; /* number of columns and width in pixels*/
-webkit-columns: 2 200px; /* chrome, safari */
Expand All @@ -241,7 +223,7 @@ li.appendix span, li.part span { /* for TOC part names */
}

/* --------------Even split- two columns--------------- */

/* TODO: Where is this useful? */
.split {
display: flex;
}
Expand Down Expand Up @@ -326,6 +308,7 @@ div.wip{
to override the styles produced by gitbook, which are ridiculously
overspecified. Goal of the selectors is to ensure internal "margins"
controlled only by padding of container */
/* TODO: Where is this useful? */

.book .book-body .page-wrapper .page-inner section.normal div.rstudio-tip > :first-child,
.book .book-body .page-wrapper .page-inner section.normal div.tip > :first-child {
Expand All @@ -337,6 +320,8 @@ div.wip{
margin-bottom: 0;
}


/* TODO: Where is this useful? */
iframe {
-moz-transform-origin: top left;
-webkit-transform-origin: top left;
Expand All @@ -358,35 +343,6 @@ iframe {
}


/* -------Clipboard copy button --------- */
.copy {
width: inherit;
background-color: #e2e2e2 ;
border: none;
border-radius: 2px;
float: right;
font-size: 60%;
padding: 4px 4px 4px 4px;
}

/* for new copy button */

.hasCopyButton {
position: relative;
}

.btn-copy-ex {
position: absolute;
right: 0;
top: 0;
visibility: hidden;
}

.hasCopyButton:hover button.btn-copy-ex {
visibility: visible;
}



/* -----------Section anchors -------------*/

Expand Down Expand Up @@ -429,9 +385,10 @@ a.anchor:hover {


/*____Code Chunks____*/
/* TODO: Where is this useful? */

.sourceCode {
margin-bottom: 0.85em; /* adds same amount of margin as a <p> would */
margin-bottom: 1.5em; /* adds same amount of margin as a <p> would */
}

.sourceCode pre {
Expand Down

0 comments on commit 706d94a

Please sign in to comment.