Skip to content

Commit 39fa88d

Browse files
committed
feat: Quarto Reveal.js deck with NC State theme + Dockerized preview
1 parent 1c20c88 commit 39fa88d

File tree

6 files changed

+180
-0
lines changed

6 files changed

+180
-0
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.git
2+
.gitignore
3+
**/.venv
4+
**/__pycache__
5+
**/.ipynb_checkpoints
6+
node_modules
7+
.DS_Store
8+
*.log
9+
*.tmp
10+
*.local
11+
**/.quarto/

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Quarto + Python base
2+
FROM ghcr.io/quarto-dev/quarto:1.5.57
3+
4+
# Add Python (uv) + Jupyter support
5+
RUN apt-get update -y && apt-get install -y --no-install-recommends \
6+
python3 python3-pip python3-venv \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
# Set workdir
10+
WORKDIR /project
11+
12+
# Preinstall python deps to leverage Docker cache
13+
COPY requirements.txt requirements.txt
14+
RUN python3 -m venv .venv \
15+
&& . .venv/bin/activate \
16+
&& pip install --upgrade pip \
17+
&& pip install -r requirements.txt || true
18+
19+
# Copy project last to maximize cache
20+
COPY . .
21+
22+
# Expose preview port
23+
EXPOSE 4000
24+
25+
# Default command: run preview for the deck
26+
CMD ["bash", "-lc", "quarto preview slides/index.qmd --host 0.0.0.0 --port 4000 --no-browser"]

_quarto.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
project:
2+
type: default
3+
4+
format:
5+
revealjs:
6+
theme: [default, slides/theme/ncsu.scss]
7+
slide-number: true
8+
transition: fade
9+
background-transition: fade
10+
code-overflow: wrap
11+
toc: false
12+
footer: "NC State University — Data Science Services"
13+
14+
editor: visual

compose.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
slides:
3+
platform: linux/arm64/v8
4+
build:
5+
context: .
6+
image: intro-to-prog-py:quarto
7+
container_name: intro-to-prog-py-slides
8+
ports:
9+
- "4000:4000"
10+
volumes:
11+
- .:/project
12+
command: bash -lc "quarto preview slides/index.qmd --host 0.0.0.0 --port 4000 --no-browser"
13+
environment:
14+
- QUARTO_LOG_LEVEL=debug

slides/index.qmd

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Introduction to Programming with Python"
3+
subtitle: "NC State Data Science Services"
4+
author: "Alp Tezbasaran"
5+
date: today
6+
format:
7+
revealjs:
8+
incremental: true
9+
preview-links: auto
10+
chalkboard: true
11+
logo: ../assets/libraries-logo.png
12+
---
13+
14+
## Welcome
15+
16+
- Course overview
17+
- Tools we'll use
18+
- Expectations
19+
20+
---
21+
22+
## Agenda
23+
24+
1. Python basics
25+
2. Control flow
26+
3. Functions
27+
4. Practice
28+
29+
---
30+
31+
## Visuals and media
32+
33+
- Drag images into the `assets/` folder and reference like:
34+
35+
![](../assets/libraries-logo.png)
36+
37+
---
38+
39+
## Code example
40+
41+
```python
42+
print("Hello, NC State!")
43+
```
44+
45+
---
46+
47+
## Next steps
48+
49+
- Convert each section of your current slides into headings and bullet points
50+
- Use `---` to separate slides
51+
- Use `::: columns` for side-by-side text and images when needed

slides/theme/ncsu.scss

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*-- scss:defaults --*/
2+
// NC State brand palette
3+
$ncsu-red: #CC0000; // Brick
4+
$ncsu-dk-gray: #3D3D3D;
5+
$ncsu-md-gray: #6D6E71;
6+
$ncsu-lt-gray: #E6E6E6;
7+
$ncsu-white: #FFFFFF;
8+
9+
// Reveal theme variables
10+
$body-bg: $ncsu-white;
11+
$text: $ncsu-dk-gray;
12+
$link-color: $ncsu-red;
13+
$link-color-hover: darken($ncsu-red, 10%);
14+
$heading-color: $ncsu-dk-gray;
15+
$heading-text-transform: none;
16+
$heading-font-weight: 800;
17+
$selection-bg: $ncsu-red;
18+
$selection-color: $ncsu-white;
19+
$code-block-bg: $ncsu-lt-gray;
20+
$code-block-border-color: $ncsu-md-gray;
21+
$blockquote-border-color: $ncsu-red;
22+
23+
/*-- scss:rules --*/
24+
.reveal {
25+
h1, h2, h3, h4 {
26+
letter-spacing: 0.2px;
27+
border-bottom: 6px solid $ncsu-red;
28+
}
29+
30+
.slides section {
31+
padding-top: 18px;
32+
}
33+
34+
.slide-number {
35+
color: $ncsu-md-gray;
36+
}
37+
38+
a {
39+
text-decoration: underline;
40+
}
41+
42+
blockquote {
43+
border-left: 6px solid $blockquote-border-color;
44+
padding-left: 14px;
45+
color: $ncsu-md-gray;
46+
}
47+
48+
pre code {
49+
background: $code-block-bg;
50+
border: 1px solid $code-block-border-color;
51+
border-radius: 8px;
52+
padding: 12px 14px;
53+
}
54+
55+
.title-slide {
56+
background: $ncsu-white;
57+
.title {
58+
color: $ncsu-red;
59+
}
60+
.subtitle {
61+
color: $ncsu-dk-gray;
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)