Skip to content

Commit 6f85916

Browse files
committed
add: add new template of quarto slide deck and implement auto deployment
1 parent 39fa88d commit 6f85916

File tree

8 files changed

+190
-17
lines changed

8 files changed

+190
-17
lines changed

.github/workflows/deploy-page.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy slides to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "slides/**"
8+
- "_quarto.yml"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Quarto
28+
uses: quarto-dev/quarto-actions/setup@v2
29+
with:
30+
version: 1.6.40
31+
32+
- name: Render slides
33+
run: |
34+
quarto render slides/index.qmd --to revealjs
35+
36+
- name: Include assets in Pages artifact
37+
run: |
38+
mkdir -p slides/assets
39+
rsync -av assets/ slides/assets/
40+
41+
- name: Rewrite logo path to use slides-local assets
42+
run: |
43+
sed -i 's|src="\../assets/|src="assets/|g' slides/index.html
44+
45+
- name: Upload Pages artifact (slides as site root)
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: slides
49+
50+
deploy:
51+
needs: build
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,10 @@ conda-meta/
3636
# ---- Colab ----
3737
sample_data/
3838

39+
40+
/.quarto/
41+
42+
# ---- Quarto render artifacts (do not commit built slides) ----
43+
_site/
44+
slides/*.html
45+
slides/*_files/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22

3-
<a href="https://www.lib.ncsu.edu/" aria-label="nc state university libraries logo"><img src="assets/libraries-logo.png" width="400" alt="NC State University Libraries Logo" /></a>
3+
<a href="https://www.lib.ncsu.edu/" aria-label="nc state university libraries logo"><img src="assets/lib_logo_whiteBG.svg" width="400" alt="NC State University Libraries Logo" /></a>
44

55
<h2>NC State University Libraries Python Workshops</h2>
66

_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ format:
99
background-transition: fade
1010
code-overflow: wrap
1111
toc: false
12-
footer: "NC State University — Data Science Services"
12+
footer: "Data Science Services"
1313

1414
editor: visual

assets/lib_logo_whiteBG.png

12.2 KB
Loading

assets/lib_logo_whiteBG.svg

Lines changed: 50 additions & 0 deletions
Loading

slides/index.qmd

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
title: "Introduction to Programming with Python"
3-
subtitle: "NC State Data Science Services"
2+
title: "🐍Introduction to Programming with Python"
3+
subtitle: "Data Science Services"
44
author: "Alp Tezbasaran"
55
date: today
66
format:
77
revealjs:
88
incremental: true
99
preview-links: auto
1010
chalkboard: true
11-
logo: ../assets/libraries-logo.png
11+
logo: ../assets/lib_logo_whiteBG.png
12+
# Quarto passes through custom attributes via include-after-body; we will inject at runtime
1213
---
1314

1415
## Welcome
@@ -49,3 +50,14 @@ print("Hello, NC State!")
4950
- Convert each section of your current slides into headings and bullet points
5051
- Use `---` to separate slides
5152
- Use `::: columns` for side-by-side text and images when needed
53+
54+
55+
:::: {.hidden}
56+
<script>
57+
document.addEventListener('DOMContentLoaded', () => {
58+
const title = document.querySelector('.reveal .slides section .title, .reveal .slides section h1, .reveal .slides section h2');
59+
const workshop = title ? title.textContent.trim() : 'Workshop';
60+
document.body.setAttribute('data-workshop', workshop);
61+
});
62+
</script>
63+
::::

slides/theme/ncsu.scss

Lines changed: 57 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,67 @@
11
/*-- scss:defaults --*/
2+
// Font import (Inter as primary sans)
3+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");
4+
25
// NC State brand palette
36
$ncsu-red: #CC0000; // Brick
47
$ncsu-dk-gray: #3D3D3D;
58
$ncsu-md-gray: #6D6E71;
69
$ncsu-lt-gray: #E6E6E6;
710
$ncsu-white: #FFFFFF;
811

12+
// Reveal/Quarto typography variables
13+
$font-family-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
14+
$headings-font-family: $font-family-sans-serif;
15+
$headings-font-weight: 800;
16+
$code-font-family: "Fira Code", "JetBrains Mono", Menlo, Consolas, monospace;
17+
918
// Reveal theme variables
1019
$body-bg: $ncsu-white;
1120
$text: $ncsu-dk-gray;
1221
$link-color: $ncsu-red;
1322
$link-color-hover: darken($ncsu-red, 10%);
1423
$heading-color: $ncsu-dk-gray;
1524
$heading-text-transform: none;
16-
$heading-font-weight: 800;
25+
$heading-font-weight: $headings-font-weight;
1726
$selection-bg: $ncsu-red;
1827
$selection-color: $ncsu-white;
1928
$code-block-bg: $ncsu-lt-gray;
2029
$code-block-border-color: $ncsu-md-gray;
2130
$blockquote-border-color: $ncsu-red;
2231

2332
/*-- scss:rules --*/
33+
// Map to Reveal CSS variables as an extra guarantee
2434
.reveal {
25-
h1, h2, h3, h4 {
35+
--r-main-font: #{$font-family-sans-serif};
36+
--r-heading-font: #{$headings-font-family};
37+
38+
h1 {
39+
letter-spacing: 0.2px;
40+
border-top: 6px solid $ncsu-red;
41+
padding-top: 42px;
42+
}
43+
44+
h2, h3, h4 {
2645
letter-spacing: 0.2px;
2746
border-bottom: 6px solid $ncsu-red;
47+
padding-bottom: 4px;
2848
}
2949

3050
.slides section {
31-
padding-top: 18px;
51+
padding-top: 2px;
3252
}
3353

3454
.slide-number {
3555
color: $ncsu-md-gray;
56+
position: absolute !important;
57+
left: 16px !important;
58+
right: auto !important;
59+
bottom: 16px !important;
60+
top: auto !important;
61+
z-index: 1001 !important;
3662
}
3763

38-
a {
39-
text-decoration: underline;
40-
}
64+
a { text-decoration: underline; }
4165

4266
blockquote {
4367
border-left: 6px solid $blockquote-border-color;
@@ -46,6 +70,7 @@ $blockquote-border-color: $ncsu-red;
4670
}
4771

4872
pre code {
73+
font-family: $code-font-family;
4974
background: $code-block-bg;
5075
border: 1px solid $code-block-border-color;
5176
border-radius: 8px;
@@ -54,11 +79,31 @@ $blockquote-border-color: $ncsu-red;
5479

5580
.title-slide {
5681
background: $ncsu-white;
57-
.title {
58-
color: $ncsu-red;
59-
}
60-
.subtitle {
61-
color: $ncsu-dk-gray;
62-
}
82+
.title { color: $ncsu-red; }
83+
.subtitle { color: $ncsu-dk-gray; }
6384
}
6485
}
86+
87+
// Optional top bar styling (kept if present)
88+
body[data-workshop] { --topbar-height: 36px; }
89+
body[data-workshop]::before {
90+
content: attr(data-workshop);
91+
position: fixed;
92+
top: 0; left: 0; right: 0;
93+
height: var(--topbar-height);
94+
background: $ncsu-red;
95+
color: $ncsu-white;
96+
display: flex; align-items: center;
97+
padding: 0 16px;
98+
font-weight: 700;
99+
z-index: 1000;
100+
font-family: $font-family-sans-serif;
101+
}
102+
.reveal .slides { margin-top: 2px; }
103+
104+
// Increase Reveal slide logo size (affects format.revealjs.logo)
105+
.reveal .slide-logo {
106+
height: 256px !important; // enforce override of default reveal size
107+
width: auto !important;
108+
}
109+

0 commit comments

Comments
 (0)