├── src ├── assets │ ├── styles │ │ ├── sidebar.css │ │ ├── newdefault.css │ │ ├── lecture_header.css │ │ ├── layout.css │ │ ├── homepage.css │ │ └── index.css │ ├── favicon.ico │ ├── scripts │ │ ├── sidebar.js │ │ └── search.js │ ├── favicon.svg │ ├── julia-logo-color.svg │ ├── julia-logo-dark.svg │ ├── tinbergen-institute-logo.svg │ ├── tinbergen-institute-logo-white.svg │ ├── zoom_logo.svg │ └── uva_logo.svg ├── index.jlmd ├── _includes │ ├── md.jlmd │ ├── welcome.md │ └── layout.jlhtml ├── search.md ├── cheatsheets.md ├── sidebar data.jl ├── installation.md └── week0 │ └── basic_syntax.jl ├── .gitattributes ├── .gitignore ├── develop.jl ├── extra_outputs └── index.html ├── pluto-deployment-environment ├── Project.toml ├── PlutoDeployment.toml └── Manifest.toml ├── .vscode ├── tasks.json ├── extensions.json └── settings.json ├── .github └── workflows │ ├── PRComment.yml │ ├── PRCleanup.yml │ ├── KeepCacheFresh.yml │ └── ExportNotebooks.yml └── README.md /src/assets/styles/sidebar.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | page/* linguist-vendored 2 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | 4 | _cache 5 | _site 6 | generation_report.html -------------------------------------------------------------------------------- /src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greimel/pluto-course-template/HEAD/src/assets/favicon.ico -------------------------------------------------------------------------------- /src/index.jlmd: -------------------------------------------------------------------------------- 1 | --- 2 | authors: ["Massachusetts Institute of Technology"] 3 | tags: ["homepage"] 4 | layout: "welcome.md" 5 | --- 6 | -------------------------------------------------------------------------------- /src/_includes/md.jlmd: -------------------------------------------------------------------------------- 1 | --- 2 | layout: "layout.jlhtml" 3 | --- 4 | 5 |
53 | julia> ]
54 |
55 | (@v$(pkg_version)) pkg>
56 |
57 |
58 | The line turns blue and the prompt changes to `pkg>`, telling you that you are now in _package manager mode_. This mode allows you to do operations on **packages** (also called libraries).
59 |
60 | To install Pluto, run the following (case sensitive) command to *add* (install) the package to your system by downloading it from the internet.
61 | You should only need to do this *once* for each installation of Julia:
62 |
63 |
64 | (@v$(pkg_version)) pkg> add Pluto
65 |
66 |
67 | This might take a couple of minutes, so you can go get yourself a cup of tea!
68 |
69 | 
70 |
71 | You can now close the terminal.
72 |
73 | ## Step 4: Use a modern browser: Mozilla Firefox or Google Chrome
74 | We need a modern browser to view Pluto notebooks with. Firefox and Chrome work best.
75 |
76 |
77 | # Second time: _Running Pluto & opening a notebook_
78 | Repeat the following steps whenever you want to work on a project or homework assignment.
79 |
80 | ## Step 1: Start Pluto
81 |
82 | Start the Julia REPL, like you did during the setup. In the REPL, type:
83 | ```julia
84 | julia> using Pluto
85 |
86 | julia> Pluto.run()
87 | ```
88 |
89 | 
90 |
91 | The terminal tells us to go to `http://localhost:1234/` (or a similar URL). Let's open Firefox or Chrome and type that into the address bar.
92 |
93 | 
94 |
95 | > If you're curious about what a _Pluto notebook_ looks like, have a look at the **Featured Notebooks**. These notebooks are useful for learning some basics of Julia programming.
96 | >
97 | > If you want to hear the story behind Pluto, have a look a the [JuliaCon presentation](https://www.youtube.com/watch?v=IAF8DjrQSSk).
98 |
99 | If nothing happens in the browser the first time, close Julia and try again. And please let us know!
100 |
101 | ## Step 2a: Opening a notebook from the web
102 |
103 | This is the main menu - here you can create new notebooks, or open existing ones. Our homework assignments will always be based on a _template notebook_, available in this GitHub repository. To start from a template notebook on the web, you can _paste the URL into the blue box_ and press ENTER.
104 |
105 | For example, homework 0 is available [here](/hw0/). Go to this page, and on the top right, click on the button that says "Edit or run this notebook". From these instructions, copy the notebook link, and paste it into the box. Press ENTER, and select OK in the confirmation box.
106 |
107 | 
108 |
109 | **The first thing we will want to do is to save the notebook somewhere on our own computer; see below.**
110 |
111 | ## Step 2b: Opening an existing notebook file
112 | When you launch Pluto for the second time, your recent notebooks will appear in the main menu. You can click on them to continue where you left off.
113 |
114 | If you want to run a local notebook file that you have not opened before, then you need to enter its _full path_ into the blue box in the main menu. More on finding full paths in step 3.
115 |
116 | ## Step 3: Saving a notebook
117 | We first need a folder to save our homework in. Open your file explorer and create one.
118 |
119 | Next, we need to know the _absolute path_ of that folder. Here's how you do that in [Windows](https://www.top-password.com/blog/copy-full-path-of-a-folder-file-in-windows/), [MacOS](https://www.josharcher.uk/code/find-path-to-folder-on-mac/) and [Ubuntu]().
120 |
121 | For example, you might have:
122 |
123 | - `C:\\Users\\fons\\Documents\\18S191_assignments\\` on Windows
124 |
125 | - `/Users/fons/Documents/18S191_assignments/` on MacOS
126 |
127 | - `/home/fons/Documents/18S191_assignments/` on Ubuntu
128 |
129 | Now that we know the absolute path, go back to your Pluto notebook, and at the top of the page, click on _"Save notebook..."_.
130 |
131 | 
132 |
133 | This is where you type the **new path+filename for your notebook**:
134 |
135 | 
136 |
137 | Click _Choose_.
138 |
139 | ## Step 4: Sharing a notebook
140 |
141 | After working on your notebook (your code is autosaved when you run it), you will find your notebook file in the folder we created in step 3. This the file that you can share with others, or submit as your homework assignment to Canvas.
142 |
143 |
144 |
158 |
--------------------------------------------------------------------------------
/src/assets/styles/index.css:
--------------------------------------------------------------------------------
1 | /* a minimalist set of CSS resets */
2 |
3 | @import url("https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.css");
4 | @import url("lecture_header.css");
5 | @import url("newdefault.css");
6 |
7 | /* @import url('https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.18.0/frontend/vollkorn.css'); */
8 | /* @import url('https://fonts.googleapis.com/css2?family=Jaldi:wght@400;700&display=swap'); */
9 | /* @import url('https://fonts.googleapis.com/css2?family=Jaldi:wght@400;700&family=Work+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&family=Yantramanav:wght@400;500;700;900&display=swap'); */
10 |
11 | *,
12 | *:before,
13 | *:after {
14 | box-sizing: inherit;
15 | }
16 |
17 | :root {
18 | --system-fonts: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Cantarell, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji",
19 | "Segoe UI Symbol", system-ui, sans-serif;
20 | --system-fonts-mono: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
21 |
22 | --fg: #000;
23 | --faded-1: #858585;
24 | --faded-2: rgb(161, 161, 161);
25 | --sidebar-accent-1: #c89393;
26 | --search-bg: hsl(78deg 10% 85%);
27 | --search-bg-accent: #f4f4f5;
28 | }
29 |
30 | @media (prefers-color-scheme: dark) {
31 | :root {
32 | --fg: #ddd;
33 | --faded-1: #b3b3b3;
34 | --faded-2: #999999;
35 |
36 | --sidebar-accent-1: #8b736a;
37 | --search-bg: #363b33;
38 | --search-bg-accent: #4d6542;
39 | }
40 | }
41 |
42 | /* adjust typography defaults */
43 | body {
44 | margin: 0;
45 | padding: 0;
46 | /* font-family: Noto; */
47 | /* font-family: sans-serif; */
48 | /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; */
49 | width: 100vw;
50 | overflow-x: hidden;
51 | background: hsl(235deg 19% 16%);
52 | color: var(--pluto-output-color);
53 |
54 | /* background: url(bg.svg); */
55 | /* background-color: hsl(231deg 14% 57%); */
56 | /* background-size: cover; */
57 | word-break: break-word;
58 | }
59 |
60 | .pages-markdown p,
61 | .pages-markdown ol {
62 | line-height: 1.5;
63 | }
64 |
65 | .pages-markdown h1,
66 | .pages-markdown h2 {
67 | font-weight: 800;
68 | }
69 |
70 | .pages-markdown h1,
71 | .pages-markdown h2,
72 | .pages-markdown h3,
73 | .pages-markdown h4,
74 | .pages-markdown h5,
75 | .pages-markdown h6 {
76 | color: var(--pluto-output-h-color);
77 | }
78 |
79 | pre {
80 | tab-size: 4;
81 | white-space: pre-wrap;
82 | word-break: break-word;
83 | }
84 |
85 | pre,
86 | code {
87 | font-family: var(--system-fonts-mono);
88 | }
89 |
90 | /* images and videos max out at full width */
91 | img,
92 | video {
93 | height: auto;
94 | max-width: 100%;
95 | }
96 |
97 | a {
98 | font-weight: 500;
99 | text-decoration: none;
100 | }
101 | .pages-markdown a,
102 | .pages-markdown a:visited {
103 | color: #4674bc;
104 | }
105 | a:hover {
106 | text-decoration: underline;
107 | }
108 | h1 a,
109 | h2 a,
110 | h3 a {
111 | font-weight: inherit;
112 | }
113 |
114 | a.arrow::after {
115 | content: " →";
116 | }
117 | card-text > a.arrow {
118 | margin-top: auto;
119 | }
120 |
121 | /* SIDEBAR LOGO */
122 |
123 | a.pluto_home_link img {
124 | height: 1.2em;
125 | width: 1.2em;
126 | }
127 | a.pluto_home_link {
128 | font-size: 1.7em;
129 | font-weight: 800;
130 | color: inherit;
131 | padding: 0.3em;
132 | display: flex;
133 | flex-direction: row;
134 | align-items: center;
135 | gap: 0.5ch;
136 | }
137 |
138 | .sidebar-about .logos {
139 | display: flex;
140 | flex-direction: row;
141 | gap: 1em;
142 | padding: 1em;
143 | align-items: center;
144 | }
145 |
146 | .sidebar-about .logos picture {
147 | flex: 1 1 auto;
148 | min-width: 0;
149 | height: auto;
150 | object-fit: contain;
151 | }
152 |
153 | .sidebar-about .course-numbers {
154 | opacity: 0.6;
155 | }
156 | .sidebar-about .course-numbers > span {
157 | font-family: var(--system-fonts-mono);
158 | font-size: 0.9em;
159 | }
160 | .sidebar-about .course-numbers::before {
161 | /* content: " | "; */
162 | }
163 |
164 | .semester-details,
165 | .authors {
166 | border-radius: var(--border-radius);
167 | padding: var(--child-padding);
168 | }
169 | .semester-details > a {
170 | font-weight: 700;
171 | }
172 |
173 | #pages-sidebar h1 {
174 | font-size: 1.4rem;
175 | margin-block-end: 0px;
176 | margin: 0; /* line-height: 1; */
177 | }
178 |
179 | #pages-sidebar h2 {
180 | font-size: 1rem;
181 | font-weight: 500;
182 | font-style: italic;
183 | opacity: 0.8;
184 | margin-block-start: 0.2em;
185 | }
186 |
187 | .authors {
188 | color: var(--faded-2);
189 | }
190 | .authors {
191 | color: var(--faded-2);
192 | }
193 | #pages-sidebar .authors > a {
194 | color: var(--fg);
195 | }
196 |
197 | .search-result strong {
198 | --bg-color: #73731e94;
199 | background: var(--bg-color);
200 | outline: 0.15em solid var(--bg-color);
201 | border-radius: 0.1em;
202 | }
203 |
204 | #pages-sidebar .search-bar form {
205 | display: flex;
206 | flex-direction: row;
207 | }
208 | #pages-sidebar .search-bar input[type="search"] {
209 | flex: 1 1 auto;
210 | min-width: 0px;
211 | }
212 |
213 | a.search-result,
214 | a.search-result:visited {
215 | color: inherit;
216 | display: block;
217 | text-decoration: none;
218 | background: var(--search-bg);
219 | padding: 0.7rem;
220 | margin: 2rem 1rem 2rem 0rem;
221 | --br: 0.4em;
222 | border-radius: var(--br);
223 | position: relative;
224 | }
225 |
226 | .search-result h3 {
227 | margin-block-start: 0;
228 | }
229 |
230 | .search-result .tags {
231 | opacity: 0.6;
232 | font-family: var(--system-fonts-mono);
233 | }
234 |
235 | a.search-result::before {
236 | content: "";
237 | display: block;
238 | position: absolute;
239 | z-index: -1;
240 | --off: -3px;
241 | top: var(--off);
242 | right: var(--off);
243 | left: var(--off);
244 | bottom: var(--off);
245 | background: var(--search-bg-accent);
246 | transform: rotate(356.9deg) translate(0px, 0px);
247 | border-radius: var(--br);
248 | }
249 |
250 | .student-feedback .card {
251 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
252 | margin: 1rem 0rem;
253 | border-radius: 0.4rem;
254 | padding: 0.2rem 1rem;
255 | }
256 |
257 | @media (prefers-color-scheme: dark) {
258 | .student-feedback .card {
259 | background: #4b4b4b;
260 | }
261 | }
262 | .student-feedback .card-container {
263 | padding: 4px 16px;
264 | }
265 | .student-feedback .card-container::after,
266 | .student-feedback .row::after {
267 | content: "";
268 | clear: both;
269 | display: table;
270 | }
271 | .student-feedback .semester {
272 | opacity: 0.6;
273 | }
274 | .student-feedback .feedback {
275 | /* margin-top: 0.5em; */
276 | }
277 |
278 | .student-feedback {
279 | margin-bottom: 4rem;
280 | }
281 |
282 | blockquote.twitter-tweet {
283 | margin: 0rem;
284 | }
285 |
286 | /* modify Pluto's styles to avoid a visual glitch. This will make the header always display fixed at the top. */
287 |
288 | body:not(.asdfsdfa) pluto-editor:not(.asdffdas) header#pluto-nav {
289 | position: fixed;
290 | top: 0;
291 | left: 56px;
292 | right: 56px;
293 | z-index: 1998;
294 | width: auto;
295 | border-radius: 0 0 10px 10px;
296 | }
297 |
298 | /* Make space for the Pluto header */
299 | body.binder:not(.offer_binder) {
300 | padding-top: 60px;
301 | }
302 |
303 | /* Another strategy: leave the header in place but make the export menu hidden when it is not opened. */
304 | /*
305 | header.show_export aside#export {
306 | visibility: initial;
307 | }
308 |
309 | aside#export {
310 | visibility: hidden;
311 | } */
312 |
--------------------------------------------------------------------------------
/src/_includes/layout.jlhtml:
--------------------------------------------------------------------------------
1 | $(begin
2 | using MarkdownLiteral: @markdown
3 | import Pluto
4 | "The contents of `` from a Pluto HTML export."
5 | const pluto_head = let
6 | default = Pluto.generate_html(;
7 | pluto_cdn_root=Pluto.PLUTO_VERSION < v"0.19" ? "https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@9ca70c36/frontend/" : nothing)
8 | m = match(r"Section $(f("chapter", "-")).$(f("section", "-"))
169 |