From 606ef81aae1db729022cf1cdbd51d76340b82a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Ko=CC=88lling?= <tobias.koelling@mpimet.mpg.de> Date: Mon, 29 Apr 2024 12:01:36 +0200 Subject: [PATCH] CSS: add .handson and .special classes --- lectures/command-line/slides.qmd | 4 ++-- lectures/custom.scss | 8 ++++++++ lectures/data-structures/slides.qmd | 4 ++-- lectures/example-lecture/slides.qmd | 8 ++++++-- lectures/git/slides.qmd | 8 ++++---- lectures/intro/slides.qmd | 10 +++++----- lectures/programming-paradigms/slides.qmd | 4 ++-- 7 files changed, 29 insertions(+), 17 deletions(-) diff --git a/lectures/command-line/slides.qmd b/lectures/command-line/slides.qmd index f141630..72dc08e 100644 --- a/lectures/command-line/slides.qmd +++ b/lectures/command-line/slides.qmd @@ -57,7 +57,7 @@ author: "Lukas Kluft and Florian Ziemen" * Built-in commands and core utilities are available on (almost) all machines * Sequences of commands can be stored and executed as shell scripts -# Hands-on session {background-color=var(--dark-bg-color)} +# Hands-on session {.handson} 1. Open the command line (_Terminal_) 1. Create a shell script using an editor of your choice @@ -194,7 +194,7 @@ We all lost data to `/scratch`, many killed something on `/work` * Using a secure shell (`ssh`) one can login to Levante and use it as any other machine * Computationally demanding or long-lasting jobs have to be submitted to the job queue -# Hands-on session {background-color=var(--dark-bg-color)} +# Hands-on session {.handson} 1. Create an SSH key pair on your local machine 1. Upload the **public** key to luv.dkrz.de diff --git a/lectures/custom.scss b/lectures/custom.scss index 8eecd35..a22dec4 100644 --- a/lectures/custom.scss +++ b/lectures/custom.scss @@ -101,3 +101,11 @@ kbd, .kbd { background-attachment: fixed; background-position: right top; } + +.reveal .special.slide-background { + background-color: var(--dark-bg-color); +} + +.reveal .handson.slide-background { + background-color: var(--dark-bg-color); +} diff --git a/lectures/data-structures/slides.qmd b/lectures/data-structures/slides.qmd index 9687e08..4af24dd 100644 --- a/lectures/data-structures/slides.qmd +++ b/lectures/data-structures/slides.qmd @@ -222,7 +222,7 @@ deque(['Second', 'Third']) ``` -## Hands-on Session! (~15min) {background-color=var(--dark-bg-color) .leftalign} +## Hands-on Session! (~15min) {.handson .leftalign} :::{.smaller} @@ -397,7 +397,7 @@ def run_timing(class_name: str, method_name: str): ``` -## Hands-on Session! {background-color=var(--dark-bg-color) .leftalign} +## Hands-on Session! {.handson .leftalign} 1. Activate `TableByColumn` and `TableByRow` init and add missing `get_...` methods. diff --git a/lectures/example-lecture/slides.qmd b/lectures/example-lecture/slides.qmd index 6d7db39..108da85 100644 --- a/lectures/example-lecture/slides.qmd +++ b/lectures/example-lecture/slides.qmd @@ -48,7 +48,11 @@ It's **impossible** to look at the entire globe in full resolution. ](https://easy.gems.dkrz.de/_images/gorski_f1.jpg) -## Highlight! {background-color=var(--dark-bg-color)} +## Highlight! {.special} * This slide is either important or has a special purpose. -* You can use it to ask the audience a question or to start a hands-on session. +* You can use it to ask the audience a question. For handson-sessions, please use `.handson` (next slide) + +## Handson! {.handson} + +This also is a special slide, but specific to handson exercises. diff --git a/lectures/git/slides.qmd b/lectures/git/slides.qmd index 2c3a24b..bb0462d 100644 --- a/lectures/git/slides.qmd +++ b/lectures/git/slides.qmd @@ -81,7 +81,7 @@ git config --global user.name "Your Name" git config --global user.email "youremail@yourdomain.com" ``` -## Hands-on Session {background-color=var(--dark-bg-color)} +## Hands-on Session {.handson} 1. Configure the username and email adress in your local git client 2. Create a directory and initialize a Git repository @@ -161,7 +161,7 @@ After the example: ask about differences to graph and their git log. By default, git will perform a fast-forward merge and omit the merge commit. ::: -## Hands-on session {background-color=var(--dark-bg-color)} +## Hands-on session {.handson} 1. Create a branch 3. Commit something in the branch @@ -272,7 +272,7 @@ git commit ``` ::: -## Hands-on session {background-color=var(--dark-bg-color) .leftalign} +## Hands-on session {.handson .leftalign} 1. Create `file.txt` in two different branches with different content^[Make sure to **commit** the changes in each branch] 2. Merge both branches into `main` (`CONFLICT`) @@ -378,7 +378,7 @@ We are using **GitLab** for this lecture! GitLab can act as a remote (like Github or even a local copy could also). ::: -## Hands-on session {background-color=var(--dark-bg-color) .leftalign} +## Hands-on session {.handson .leftalign} 1. Create a new SSH Key pair (`ssh-keygen`) to use with Gitlab 1. Login to [DKRZ GitLab](https://gitlab.dkrz.de) and upload your public SSH key diff --git a/lectures/intro/slides.qmd b/lectures/intro/slides.qmd index 7f2ec39..9c7d68e 100644 --- a/lectures/intro/slides.qmd +++ b/lectures/intro/slides.qmd @@ -71,20 +71,20 @@ The presentation can change your grade in either direction. # The students -## Who needs a grade? {background-color=var(--dark-bg-color)} +## Who needs a grade? {.special} -## Who is experienced with git? {background-color=var(--dark-bg-color)} +## Who is experienced with git? {.special} -## Who has used an HPC system before? {background-color=var(--dark-bg-color)} +## Who has used an HPC system before? {.special} -## Which programming languages do you speak? {background-color=var(--dark-bg-color)} +## Which programming languages do you speak? {.special} * Python * Fortran * C/C++ * other -## What is missing in our lecture concept? {background-color=var(--dark-bg-color)} +## What is missing in our lecture concept? {.special} # Course materials diff --git a/lectures/programming-paradigms/slides.qmd b/lectures/programming-paradigms/slides.qmd index 91a14ee..47072df 100644 --- a/lectures/programming-paradigms/slides.qmd +++ b/lectures/programming-paradigms/slides.qmd @@ -888,7 +888,7 @@ for x in (book, laptop): ``` ::: -## Hands-on Session! {background-color=var(--dark-bg-color) .leftalign} +## Hands-on Session! {.handson .leftalign} 1. Define a class `Person` with a constructor which initialises `name` and `address` attributes 2. Define a class `Student` that extends `Person` and sets a `university` attribute @@ -1085,7 +1085,7 @@ sum_items=reduce(lambda x, y : x + y, items, 0) # 0 is initializer value ``` ::: -## Hands-on Session! {background-color=var(--dark-bg-color) .leftalign} +## Hands-on Session! {.handson .leftalign} Write a higher-order function using map/filter/reduce which returns the product of the squares of the positive values from the input array -- GitLab