Skip to content

Commit

Permalink
Merge branch 'quarto' into jupyter_update
Browse files Browse the repository at this point in the history
  • Loading branch information
johnne committed Nov 2, 2023
2 parents d6a4700 + e54ecc7 commit 6ab7dce
Show file tree
Hide file tree
Showing 95 changed files with 27,669 additions and 5,613 deletions.
16 changes: 5 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Conda environment
# Conda environments
*-env

# Xaringan-related files
**/*_files

# Lecture-related files
lectures/**/*.html
# lectures/**/*.pdf
lectures/*/*/remark-css-0.0.1/default.css
lectures/*/*/header-attrs-2.3/header-attrs.js

Expand All @@ -22,15 +17,14 @@ jupyter/.ipynb_checkpoints
**/intermediate
**/results
**/work
rmarkdown/.R*
rmarkdown/*html
rmarkdown/*Rproj
snakemake/*txt
snakemake/*png
snakemake/*tsv
.Rproj.user

# jupyter checkpoints
.ipynb_checkpoints
.idea

.idea
# Quarto-related files
.quarto/
**/*_files
1 change: 1 addition & 0 deletions lectures/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.quarto/
25 changes: 13 additions & 12 deletions lectures/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Lectures

This directory contains all the course lectures, which were created using
[Quarto](https://quarto.org/). The directory is set up as a Quarto project,
so as to make rendering as simple as possible.

## Requirements

Install the required packages using:
Expand All @@ -10,23 +14,20 @@ conda env create -f environment.yml

## Rendering

Lectures in **Rmarkdown** format can be rendered using the following from
the command line:
Make sure your current directory is the `lectures/` directory and run the
following command:

```bash
Rscript -e 'rmarkdown::render(<Rmd-file>, "xaringan::moon_reader")'
quarto render
```

Lectures in **Jupyter notebook** format can be rendered using:
## Render a single lecture

To render only a single, specific lecture you can execute the following command:

```bash
jupyter nbconvert --to slides --execute <.ipynb-file>
quarto render <lecture>
```

## Render everything

To render all lectures you can use `snakemake`:

```bash
snakemake -j 1
```
For example, to render the Git lecture execute `quarto render git` while inside
the `lectures/` directory.
59 changes: 0 additions & 59 deletions lectures/Snakefile

This file was deleted.

23 changes: 23 additions & 0 deletions lectures/_extensions/NBISweden/nbis/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title: NBIS Quarto Extension
author: Erik Fasterius
version: 1.0.0
quarto-required: ">=1.2.0"
contributes:
formats:
html:
code-fold: true
df-print: paged
embed-resources: true
highlight-style: nbis.theme
smooth-scroll: true
theme: [default, nbis.scss]
toc-location: left
toc-title: nbis-logo-green.svg
toc: true
revealjs:
code-line-numbers: false
embed-resources: true
logo: nbis-logo-green.svg
slide-level: 2
slide-number: false
theme: [default, nbis.scss]
3 changes: 3 additions & 0 deletions lectures/_extensions/NBISweden/nbis/nbis-logo-green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
198 changes: 198 additions & 0 deletions lectures/_extensions/NBISweden/nbis/nbis.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
/*-- scss:defaults --*/

$theme: "nbis" !default;

// NBIS base colours
$green: #92BB55 !default;
$blue: #0093BD !default;
$orange: #EF7C00 !default;

// NBIS light colours
$lgreen: #F8FFE5 !default;
$lblue: #E5F9FF !default;
$lorange: #FFF2E5 !default;

// Extra colours
$red: #BB5454 !default;
$yellow: #BBBB54 !default;
$purple: #AF75A7 !default;

// Greyscale colours
$white: #FFFFFF !default;
$grey-100: #F5F5F5 !default;
$grey-90: #E5E5E5 !default;
$grey-80: #CCCCCC !default;
$grey-70: #B2B2B2 !default;
$grey-60: #999999 !default;
$grey-50: #7F7F7F !default;
$grey-40: #666666 !default;
$grey-30: #4C4C4C !default;
$grey-20: #333333 !default;
$grey-10: #191919 !default;
$black: #000000 !default;

// Theme
$primary: $green !default;
$secondary: $blue !default;
$light: $grey-100 !default;
$dark: $grey-30 !default;
$success: $green !default;
$info: $purple !default;
$warning: $yellow !default;
$danger: $red !default;

// Code
$code-color: $primary !default;
$code-bg: $light !default;
$code-block-bg: $light !default;

// Links
$link-color: $primary !default;

// Popover
$popover: $light !default;

// Dropdowns
$dropdown-link-color: $grey-30 !default;
$dropdown-link-hover-color: $white !default;
$dropdown-link-hover-bg: $primary !default;

// Fonts
$font-family-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;

// Font size for headers
$h1-font-size: 1.75rem !default;
$h2-font-size: 1.50rem !default;
$h3-font-size: 1.25rem !default;

// Font size base for reveal.js presentations
$presentation-font-size-root: 35px !default;

// Tables
$table-bg-scale: 0 !default;

// Navs
$nav-link-padding-y: .5rem !default !default;
$nav-link-padding-x: 2rem !default;
$nav-link-disabled-color: $grey-40 !default !default;
$nav-tabs-border-color: $grey-80 !default;

// Navbar
$navbar-padding-y: 1rem !default;
$navbar-light-bg: $primary !default;
$navbar-light-color: $white !default;
$navbar-light-hover-color: $success !default;
$navbar-light-active-color: $success !default;
$navbar-light-brand-color: $white !default;
$navbar-light-brand-hover-color: $navbar-light-brand-color !default;
$navbar-dark-color: $white !default;
$navbar-dark-hover-color: $primary !default;
$navbar-dark-active-color: $primary !default;
$navbar-dark-brand-color: $white !default;
$navbar-dark-brand-hover-color: $navbar-dark-brand-color !default;

// Pagination
$pagination-color: $white !default;
$pagination-bg: $success !default;
$pagination-border-width: 0 !default;
$pagination-border-color: transparent !default;
$pagination-hover-color: $white !default;
$pagination-hover-bg: darken($success, 15%) !default;
$pagination-hover-border-color: transparent !default;
$pagination-active-bg: $pagination-hover-bg !default;
$pagination-active-border-color: transparent !default;
$pagination-disabled-color: $grey-80 !default;
$pagination-disabled-bg: lighten($success, 15%) !default;
$pagination-disabled-border-color: transparent !default;

// List group
$list-group-hover-bg: $grey-80 !default;
$list-group-disabled-bg: $grey-80 !default;

// Close
$btn-close-color: $white !default;
$btn-close-opacity: .4 !default;
$btn-close-hover-opacity: 1 !default;

/*-- scss:rules --*/

// Variables
$web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap" !default;
@if $web-font-path {
@import url($web-font-path);
}

// Navbar
.bg-primary {
.navbar-nav .show > .nav-link,
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
color: $success !important;
}
}

// Navs
.nav-tabs {
.nav-link.active,
.nav-link.active:focus,
.nav-link.active:hover,
.nav-item.open .nav-link,
.nav-item.open .nav-link:focus,
.nav-item.open .nav-link:hover {
color: $primary;
}
}

// Pagination
.pagination {
a:hover {
text-decoration: none;
}
}

// Blockquotes
.reveal .slide blockquote {
color: $primary;
border-left-color: $primary;
}

// Cell Output
.cell-output-error > pre > code {
color: $red;
}
.cell-output-stderr > pre > code {
color: $yellow;
}

// Horizontally center level 1 headers
.center h1 {
text-align: center
}

// Text justification
.justify-right {
text-align: right
}
.justify-center {
text-align: center
}

// Custom colours
.green {
color: $green;
font-weight: bold;
}
.blue {
color: $blue;
font-weight: bold;
}
.light-grey {
color: $grey-60;
}
.grey {
color: $grey-40;
}
.dark-grey {
color: $grey-20;
}
Loading

0 comments on commit 6ab7dce

Please sign in to comment.