Skip to content

Commit 7aed54c

Browse files
committed
F24 site
1 parent 573ce08 commit 7aed54c

16 files changed

+247
-27
lines changed

_data/site.json

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"schedule": [
3+
{
4+
"title": "Introduction",
5+
"agenda": [
6+
{ "title": "Why Rust?", "sub": []},
7+
{ "title": "Cargo Basics", "sub": []},
8+
{ "title": "Syntax", "sub": [
9+
{ "title": "Variables and Mutability", "sub": []},
10+
{ "title": "Data Types", "sub": [
11+
{ "title": "Scalar Types", "sub": []},
12+
{ "title": "Compound Types", "sub": []}
13+
]},
14+
{ "title": "Functions, Statements, and Expressions", "sub": []},
15+
{ "title": "Control Flow", "sub": []}
16+
]},
17+
{ "title": "Course Logistics", "sub": []},
18+
{ "title": "Installing Rust", "sub": []}
19+
],
20+
"slides_light_html": "http://htmlpreview.github.io/?https://github.com/rust-stuco/lectures/blob/main/week1/light.html",
21+
"slides_light_pdf": "https://raw.githubusercontent.com/rust-stuco/lectures/main/week1/light.pdf",
22+
"slides_dark_html": "http://htmlpreview.github.io/?https://github.com/rust-stuco/lectures/blob/main/week1/dark.html",
23+
"slides_dark_pdf": "https://raw.githubusercontent.com/rust-stuco/lectures/main/week1/dark.pdf",
24+
"hw_handout": "/hw/primerlab/primerlab.zip",
25+
"hw_writeup": "/hw/primerlab/doc/primerlab/index.html",
26+
"hw_released": false,
27+
"details_released": true,
28+
"slides_released": false,
29+
"extras": [
30+
{ "title": "Rust Book Chapters 1–3", "link": "https://doc.rust-lang.org/book/ch01-00-getting-started.html", "sub": []},
31+
{ "title": "`rustlings` exercises", "link": "https://github.com/rust-lang/rustlings", "sub": [
32+
{ "title": "variables", "link": "", "sub": [] },
33+
{ "title": "functions", "link": "", "sub": [] },
34+
{ "title": "if", "link": "", "sub": [] },
35+
{ "title": "primitive_types", "link": "", "sub": [] }
36+
]}
37+
]
38+
},
39+
{
40+
"title": "Ownership",
41+
"agenda": [
42+
{ "title": "Ownership", "sub": [
43+
{ "title": "Announcements and Review", "sub": []},
44+
{ "title": "Ownership Rules", "sub": []},
45+
{ "title": "Memory and Allocation", "sub": []},
46+
{ "title": "`String` Type and Aliasing", "sub": []},
47+
{ "title": "`Copy` and `Clone` Traits", "sub": []},
48+
{ "title": "Ownership with Functions and Return Values", "sub": []}
49+
] },
50+
{ "title": "References and Borrowing", "sub": [
51+
{ "title": "Reference Vs Ownership", "sub": []},
52+
{ "title": "Immutable and Mutable References", "sub": []},
53+
{ "title": "Dangling References and Data", "sub": []}
54+
] },
55+
{ "title": "Slices", "sub": [
56+
{ "title": "Memory Layout", "sub": []},
57+
{ "title": "`&str`", "sub": []}
58+
] },
59+
{ "title": "`Vec`", "sub": [
60+
{ "title": "Memory Layout", "sub": []}
61+
] }
62+
],
63+
"slides_light_html": "http://htmlpreview.github.io/?https://github.com/rust-stuco/lectures/blob/main/week2/light.html",
64+
"slides_light_pdf": "https://raw.githubusercontent.com/rust-stuco/lectures/main/week2/light.pdf",
65+
"slides_dark_html": "http://htmlpreview.github.io/?https://github.com/rust-stuco/lectures/blob/main/week2/dark.html",
66+
"slides_dark_pdf": "https://raw.githubusercontent.com/rust-stuco/lectures/main/week2/dark.pdf",
67+
"hw_handout": "/hw/getownedlab/getownedlab.zip",
68+
"hw_writeup": "/hw/getownedlab/doc/getownedlab/index.html",
69+
"hw_released": false,
70+
"details_released": false,
71+
"slides_released": false,
72+
"extras": [
73+
{ "title": "Rust Book Chapter 4", "link": "https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html", "sub": []},
74+
{ "title": "YouTube video", "link": "https://www.youtube.com/watch?v=VFIOSWy93H0", "sub": []}
75+
]
76+
},
77+
{
78+
"title": "Structs and Enums",
79+
"agenda": [
80+
{ "title": "Ownership Review", "sub": [] },
81+
{ "title": "Structs", "sub": [
82+
{ "title": "Creating structs", "sub": []},
83+
{ "title": "Update syntax", "sub": []},
84+
{ "title": "Tuple structs", "sub": []},
85+
{ "title": "Unit structs", "sub": []},
86+
{ "title": "Lifetimes sneak peek", "sub": []}
87+
] },
88+
{ "title": "`impl` Structs and Methods", "sub": [
89+
{ "title": "Automatic referencing and dereferencing", "sub": []},
90+
{ "title": "`Self` vs `&self`", "sub": []},
91+
{ "title": "Associated functions", "sub": []},
92+
{ "title": "Match Control Flow", "sub": []}
93+
] },
94+
{ "title": "Enum basics", "sub": [
95+
{ "title": "Pattern Matching", "sub": []},
96+
{ "title": "Option Type", "sub": []},
97+
{ "title": "`if let`", "sub": []}
98+
] }
99+
],
100+
"slides_light_html": "http://htmlpreview.github.io/?https://github.com/rust-stuco/lectures/blob/main/week3/light.html",
101+
"slides_light_pdf": "https://raw.githubusercontent.com/rust-stuco/lectures/main/week3/light.pdf",
102+
"slides_dark_html": "http://htmlpreview.github.io/?https://github.com/rust-stuco/lectures/blob/main/week3/dark.html",
103+
"slides_dark_pdf": "https://raw.githubusercontent.com/rust-stuco/lectures/main/week3/dark.pdf",
104+
"hw_handout": "/hw/pokelab/pokelab.zip",
105+
"hw_writeup": "/hw/pokelab/doc/pokelab/index.html",
106+
"hw_released": false,
107+
"details_released": false,
108+
"slides_released": false,
109+
"extras": [
110+
{ "title": "Rust Book Chapter 5", "link": "https://doc.rust-lang.org/book/ch05-00-structs.html", "sub": []},
111+
{ "title": "Rust Book Chapter 6", "link": "https://doc.rust-lang.org/book/ch06-00-enums.html", "sub": []}
112+
]
113+
}
114+
]
115+
}

_includes/components/nav.njk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@
3030
<!-- Branding -->
3131
<div class="flex items-center relative">
3232
<a href="/">
33-
<h1 class="text-2xl hover:brightness-125 transition-all] text-slate-800 dark:text-orange-100 ">RUST STUCO</h1>
33+
<img class="h-8 min-w-[2rem] rounded-md hover:scale-105 active:scale-95 hover:brightness-105 transition-all sepia-[.5]" src="/assets/img/apple-touch-icon.png">
3434
</a>
3535
</div>
3636
<div class="hidden sm:ml-6 sm:block">
3737
<div class="flex space-x-4">
3838
{% for entry in navPages %}
3939
<a href="{{ entry.url }}"
4040
{% if entry.url == page.url %}
41-
class="text-amber-50 bg-slate-700 px-3 py-2 text-md font-semibold"
41+
class="text-amber-50 bg-slate-700 px-3 py-2 text-md font-bold rounded-sm"
4242
{% else %}
43-
class="text-slate-800 dark:text-orange-100 hover:bg-slate-700 hover:text-white px-3 py-2 text-md font-semibold transition-all"
43+
class="text-slate-800 dark:text-orange-300 hover:bg-gray-700 hover:text-white rounded-sm px-3 py-2 text-md font-bold transition-all"
4444
{% endif %}
4545
aria-current="page">
4646
{{ entry.title }}
@@ -79,9 +79,9 @@
7979
{% for entry in navPages %}
8080
<a href="{{ entry.url }}"
8181
{% if entry.url == page.url %}
82-
class="text-white bg-gray-700 rounded-md px-3 py-2 text-sm font-semibold block"
82+
class="text-white bg-gray-700 rounded-md px-3 py-2 text-sm font-bold block"
8383
{% else %}
84-
class="text-gray-800 dark:text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-semibold transition-all block"
84+
class="text-gray-800 dark:text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-bold transition-all block"
8585
{% endif %}
8686
aria-current="page">
8787
{{ entry.title }}

_includes/layouts/article.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ layout: layouts/base-nav.njk
44
tags: post
55
---
66
<div class="container max-w-3xl mx-auto">
7-
<h1 class="font-display font-semibold text-4xl text-center pt-16">{{ name }}</h1>
7+
<h1 class="font-display font-bold text-4xl text-center pt-16">{{ name }}</h1>
88
<h5 class="font-display font-medium text-xl text-center pt-2 pb-16">{{ date|toISO }}</h5>
99
<article class="prose dark:prose-invert prose-headings:font-display mx-auto">
1010
{{ content | safe }}

_includes/layouts/base.njk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1616
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;600&display=swap" rel="stylesheet">
1717
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,1,0" />
18+
<link href="https://fonts.googleapis.com/css2?family=Zilla+Slab:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
1819

1920
<!-- CSS -->
2021
<link rel="stylesheet" href="/assets/css/main.css">
@@ -34,7 +35,7 @@
3435
<title>{{ title }}</title>
3536
<meta name="description" content={{ description }}>
3637
</head>
37-
<body class="dark:text-amber-100 dark:bg-gray-900 bg-amber-50 text-slate-900">
38+
<body class="dark:text-orange-300 dark:bg-rust-dark-bg">
3839
{{ content | safe }}
3940
</body>
4041
</html>

_includes/layouts/hero-page.njk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ layout: layouts/base.njk
88
{% include "../components/nav.njk" %}
99
</div>
1010
<div class="text-center">
11-
<div class="bg-slate-900 bg-opacity-50 inline-block mt-36 mx-auto justify-self-center p-3">
12-
<h1 class="font-display font-bold text-6xl pb-4 text-center text-shadow text-orange-100">{{ herotitle }}</h1>
13-
<h2 class="font-display font-semibold text-5xl text-center text-shadow text-orange-100">{{ herosubtitle }}</h1>
11+
<div class="bg-slate-900 bg-opacity-50 inline-block mt-36 mx-auto justify-self-center p-3 rounded-md" title="{{ herotooltip }}">
12+
<h1 class="font-display font-bold text-6xl pb-4 text-center text-shadow text-orange-300">{{ herotitle }}</h1>
13+
<h2 class="font-display font-bold text-5xl text-center text-shadow text-orange-300">{{ herosubtitle }}</h1>
1414
</div>
1515
</div>
1616
</div>
1717
<div class="container max-w-3xl mx-auto">
18-
<h1 class="font-display font-semibold text-4xl text-center pt-16 pb-8">{{ name }}</h1>
18+
<h1 class="font-display font-bold text-4xl text-center pt-16 pb-8">{{ name }}</h1>
1919
<article class="prose dark:prose-invert prose-headings:font-display mx-auto">
2020
{{ content | safe }}
2121
</article>

_includes/layouts/page.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: page
33
layout: layouts/base-nav.njk
44
---
5-
<div class="container max-w-3xl mx-auto">
6-
<h1 class="font-display font-semibold text-4xl text-center pt-16 pb-8">{{ name }}</h1>
7-
<article class="prose dark:prose-invert prose-li:my-0 prose-ul:my-0 prose-p:my-0 prose-headings:font-display mx-auto">
5+
<div class="container w-3xl mx-auto">
6+
<h1 class="font-display font-bold text-4xl text-center pt-16 pb-8">{{ name }}</h1>
7+
<article class="prose dark:prose-invert prose-li:my-0 prose-ul:my-0 prose-p:my-0 prose-headings:font-display mx-auto w-full">
88
{{ content | safe }}
99
</article>
1010
</div>

about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ There will be weekly homeworks that are intended to take less than an hour each,
1313

1414
Please contact us with any questions or concerns, by Discord or by email. Thank you for your interest in our course!
1515

16-
[<center>View Full Syllabus</center>](/assets/pdf/syllabus-s24.pdf)
16+
[<center>View Full Syllabus</center>](/assets/pdf/syllabus-f24.pdf)
1717

1818
### Previous Iterations:
1919

assets/css/main.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@tailwind components;
33
@tailwind utilities;
44

5-
@font-face { font-family: 'Nikkyou Sans'; src: url('../fonts/NikkyouSans-mLKax.ttf'); }
65

76
/* ported conveniences from legacy intvstyle */
87

@@ -14,6 +13,10 @@
1413
@apply bg-white text-intv-dark px-1 font-semibold inline-block leading-[1.125]
1514
}
1615

16+
.font-display {
17+
@apply font-bold italic
18+
}
19+
1720
/* rules for the dark mode switch */
1821

1922
#theme-toggle input:checked~span {
@@ -60,11 +63,11 @@
6063
/* convenient link style */
6164

6265
a.link, .prose a {
63-
@apply text-amber-600 dark:text-amber-400 no-underline
66+
@apply text-orange-600 dark:text-orange-400 no-underline
6467
}
6568

6669
a.link:hover, .prose a:hover {
67-
@apply text-amber-500 no-underline
70+
@apply text-orange-500 no-underline
6871
}
6972

7073
.image {

assets/img/crabs.jpg

137 KB
Loading

assets/js/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,5 @@ document.addEventListener('DOMContentLoaded', () => {
155155
});
156156
}
157157

158-
});
158+
});
159+

assets/js/navbar.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,15 @@ function toggleMobileMenu() {
9999
menuButton.addEventListener("click", (e) => {
100100
toggleMobileMenu()
101101
})
102+
103+
document.querySelectorAll('a[id^="toggleButton"]').forEach(button => {
104+
const idNumber = button.id.replace('toggleButton', '');
105+
const correspondingDiv = document.getElementById(`toggleDiv${idNumber}`);
106+
107+
console.log("adding listener")
108+
109+
button.addEventListener('click', () => {
110+
console.log("ping ")
111+
correspondingDiv.classList.toggle('hidden');
112+
});
113+
});

assets/pdf/syllabus-f24.pdf

54.9 KB
Binary file not shown.

index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: Intro to Rust Lang
33
name: Intro to Rust Lang
44
herotitle: Intro to Rust Lang
5-
herosubtitle: Spring 2024
5+
herosubtitle: Fall 2024
6+
herotooltip: Helping prevent CrowdStrike since Spring 2024
67
layout: layouts/hero-page.njk
78
---
8-
Welcome to Intro to Rust Lang (98-008). The course will be offered in Spring 2024 by Benjamin Owad, Connor Tsui, and David Rudo. Please refer to the [about page](/about) for more information.
9+
Welcome to Intro to Rust Lang (98-008). The course will be offered in Fall 2024 by Benjamin Owad, Connor Tsui, and David Rudo. Please refer to the [about page](/about) for more information.

schedule.njk

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Schedule - Rust Stuco
3+
name: Schedule
4+
layout: layouts/page.njk
5+
eleventyNavigation:
6+
key: Schedule
7+
order: 2
8+
---
9+
10+
<table>
11+
<thead>
12+
<tr class="font-semibold italic font-display text-lg">
13+
<th>Topics</th>
14+
<th>Extra Material</th>
15+
<th>Slides</th>
16+
<th>Homework</th>
17+
</tr>
18+
</thead>
19+
<tbody>
20+
{% for entry in site.schedule %}
21+
<tr>
22+
<td>
23+
<h2 class="mt-0 mb-2 italic font-bold">{{ entry.title }}</h2>
24+
<a href="#/" id="toggleButton{{loop.index}}">Details &#x25BC;</a>
25+
<ul id="toggleDiv{{loop.index}}" class="hidden">
26+
{% if entry.details_released %}
27+
{% for topic in entry.agenda %}
28+
<li>{{ topic.title }}</li>
29+
<ul>
30+
{% for subtopic in topic.sub %}
31+
<li>{{ subtopic.title }}</li>
32+
{% endfor %}
33+
</ul>
34+
{% endfor %}
35+
{% else %}
36+
<li><i>Details TBA</i></li>
37+
{% endif %}
38+
</ul>
39+
</td>
40+
<td>
41+
{% if entry.details_released %}
42+
<ul>
43+
{% for topic in entry.extras %}
44+
{% if topic.link %}
45+
<li><a href="{{ topic.link }}">{{ topic.title }}</a></li>
46+
{% else %}
47+
<li>{{ topic.title }}</li>
48+
{% endif %}
49+
<ul>
50+
{% for subtopic in topic.sub %}
51+
{% if subtopic.link %}
52+
<li><a href="{{ subtopic.link }}">{{ subtopic.title }}</a></li>
53+
{% else %}
54+
<li>{{ subtopic.title }}</li>
55+
{% endif %}
56+
{% endfor %}
57+
</ul>
58+
{% endfor %}
59+
{% else %}
60+
61+
</ul>
62+
{% endif %}
63+
</td>
64+
<td>
65+
{% if entry.slides_released %}
66+
<ul>
67+
<li><nobr><a href="{{ entry.slides_light_html }}">light</a><a href="{{ slides_light_pdf }}"> (pdf)</a></nobr></li>
68+
<li><nobr><a href="{{ entry.slides_dark_html }}">dark</a><a href="{{ slides_dark_pdf }}"> (pdf)</a></nobr></li>
69+
</ul>
70+
{% else %}
71+
72+
{% endif %}
73+
</td>
74+
<td>
75+
{% if entry.hw_released %}
76+
<ul>
77+
<li><a href="{{ entry.hw_handout }}">handout</a></li>
78+
<li><a href="{{ entry.hw_writeup }}">writeup</a></li>
79+
</ul>
80+
{% endif %}
81+
</td>
82+
</tr>
83+
{% endfor %}
84+
</tbody>
85+
</table>

0 commit comments

Comments
 (0)