You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/content/pages/about/index.html.mdrb
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: Joy of Rails is a Rails application dedicated to teaching and demon
6
6
updated: 2024-07-15
7
7
---
8
8
9
-
I’ll never forget that first day of school.
9
+
I’ll never forget my first day of teaching.
10
10
11
11
I was young and inexperienced. As my first-period students filed in from the hallway, the reality of the situation began to settle in.
12
12
@@ -16,31 +16,31 @@ _My students are going to see right through me_.
16
16
17
17
_I’m screwed._
18
18
19
-
As I closed the door, I surveyed the faces of my students. They were looking back at me eager to find out if I had any worth. Fear tightened its grip around my throat.
19
+
I closed the door. I surveyed the faces of my students. They were looking back at me eager to find out if I had any worth. Fear tightened its grip around my throat.
20
20
21
21
I almost passed out.
22
22
23
23
My first job out of college was teaching Science in inner-city Houston, Texas. It was, and still is, the hardest job I’ve ever had.
24
24
25
-
On that first day of teaching, I was under-prepared. I less than ten years older than my 8th-grade students. I had completed less than three months of teacher training through the Teach for America program. Most of my students were first and second generation immigrants whose families hailed from Latin America. I didn’t speak any Spanish.
25
+
When I started teaching, I was under-prepared. Less than ten years older than my 8th-grade students, I had only two months of teacher training through the Teach for America program. Most of my students were first and second generation immigrants whose families hailed from Latin America. I didn’t speak any Spanish.
26
26
27
-
_I_ was supposed to teach _them_.
27
+
_I_ was supposed to teach _them_. Yeah, right.
28
28
29
-
Somehow, I survived my first period class and the others that followed that day. And then something magical happened.
29
+
Somehow, I survived my first period class and the rest of the day. And then something magical happened.
30
30
31
31
Once the students had been dismissed, I was cleaning up in the an equipment closet, which I shared with the department chair, Ms Young, who taught next door. She came in and pointed to some boxes on the shelf.
32
32
33
33
_"The district gave me these boxes and I’m not sure what to make of all that. Why don’t you take ’em?"_
34
34
35
35
I didn’t know it at the time, but this moment changed my life.
36
36
37
-
These boxes were full of Legos. Not just any Legos—the (at the time) recently released [Lego Mindstorms](https://en.wikipedia.org/wiki/Lego_Mindstorms) kit. Basically Lego Mindstorms was what you’d get if Legos, Scratch, and Arduino made a baby.
37
+
These boxes were full of Legos. Not just any Legos—these were [Lego Mindstorms](https://en.wikipedia.org/wiki/Lego_Mindstorms) kits. Basically Lego Mindstorms was what you’d get if Legos, Scratch, and Arduino made a baby.
38
38
39
-
_Damn right_. I took those boxes. I felt like a kid again. I thought I had been given Legos but the real gift was computer programming.
39
+
_Cool_. I took those boxes. I felt like a kid again. I tore into the tutorials and taught myself just enough to pass on to my students. Later that month, I started an after school club. Later that year, we entered Robotic competitions. It was a lot of fun.
40
40
41
-
I tore into the tutorials and taught myself just enough to pass on to my students. I started an after school club. We entered Robotic competitions. It was a lot of fun.
41
+
I thought I had been given Legos but the real gift was computer programming.
42
42
43
-
Looking back on these memories and my teaching experience, I remember it has being very challenging—emotionally, mentally, physically. But I also remember all the joy. Helping a student learn always brought me joy. How Miguel’s eyes lit up during a demonstration. The way Juana pumped her fist when she balanced a difficult chemistry equation. When our rocket project helped Jerry transform from my worst nightmare and to my biggest supporter.
43
+
Looking back on these memories and my teaching experience, I remember it has being very challenging—emotionally, mentally, physically. But I also remember all the joy. Helping a student learn brought me so much. How Miguel’s eyes lit up during a demonstration. The way Juana pumped her fist when she balanced a difficult chemistry equation. When our rocket project helped Jerry transform from my worst nightmare and to my biggest supporter.
44
44
45
45
I often say my first day of teaching was also my first day as a programmer. In the [first article for this site](https://joyofrails.com/articles/introducing-joy-of-rails), I talked about the joy I felt when I experienced Ruby on Rails for the first time. Looking back, it seems likely I might never have encountered Ruby or Rails or even started a career in computers had it not been for my humble beginnings as a teacher and Ms. Young’s Lego Mindstorms kits. I may have left teaching for tech, but the teacher in me never left. Teaching and programming for me are inexorably linked.
Copy file name to clipboardExpand all lines: app/content/pages/articles/custom-color-schemes-with-ruby-on-rails.html.mdrb
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ author: Ross Kaffenberger
4
4
layout: article
5
5
description: You can edit the color scheme of this website right in content of this blog post. Play with the controls while we highlight the benefits of Rails, Hotwire, and CSS variables.
6
6
summary: You can edit the color scheme of this website right in content of this blog post. Play with the controls while we highlight the benefits of Rails, Hotwire, and CSS variables.
@@ -31,7 +31,7 @@ Pretty cool, huh? Here are the key ingredients:
31
31
- [Cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies): A session cookie to store your saved color scheme selection
32
32
- [Hotwire](https://hotwired.dev/): Server-rendered HTML and a single-page app experience powered by Rails, [Turbo Drive](https://turbo.hotwired.dev/handbook/introduction#turbo-drive%3A-navigate-within-a-persistent-process), and [Turbo Frames](https://turbo.hotwired.dev/handbook/introduction#turbo-frames%3A-decompose-complex-pages)
33
33
34
-
I started with the premise of using a monochromatic color scheme based on the 11 color scale Tailwind uses for each of [its default color sets](https://tailwindcss.com/docs/customizing-colors). The curated options are all generated from [uicolors.app](https://uicolors.app/create).
34
+
I started with the premise of using a monochromatic color scheme based on the eleven-item color scale [Tailwind](https://tailwindcss.com) uses for each of [its default color sets](https://tailwindcss.com/docs/customizing-colors). The curated options are all generated from [uicolors.app](https://uicolors.app/create).
35
35
36
36
Each color scheme is a row in the `color_schemes` table, with a name and CSS hex code values for each of the eleven weights.
37
37
@@ -51,7 +51,7 @@ end
51
51
52
52
CSS variables make it easy to change repeated CSS in a lot of places. You can set a CSS variable with double dashes, `--`. The CSS variable can be accessed using the `var()` expression. CSS variables can be overridden and can be defined in terms of other variables.
53
53
54
-
Here’s a simplified a view of how I used CSS variables to define the main background color of the `<body>` element.
54
+
Here’s a simplified a view of how I used CSS variables to define the main background color of the `<body>` element. Using the pseudo-class `:root` means the CSS variable can be accessed from any scope in CSS.
55
55
56
56
```css:{"show_header": false}
57
57
:root {
@@ -66,9 +66,11 @@ body {
66
66
}
67
67
```
68
68
69
-
Even though Joy of Rails does not use Tailwind, this approach is consistent with [the Tailwind docs for using CSS variables to customize Tailwind colors](https://tailwindcss.com/docs/customizing-colors#using-css-variables).
69
+
This approach is consistent with [the Tailwind docs for using CSS variables to customize Tailwind colors](https://tailwindcss.com/docs/customizing-colors#using-css-variables) for those of you that may be using (or interested in using) Tailwind.
70
70
71
-
When you click the "Save" button, the application stores the `id` of the chosen color scheme in your Rails session:
71
+
Most of the buttons in the color scheme demo are connected to `<form>` elements with actions that point to the [`ColorSchemesController`](https://github.com/joyofrails/joyofrails.com/blob/a08589e1cbe2accf4a20713829df56533e31755e/app/controllers/settings/color_schemes_controller.rb) in the Joy of Rails application.
72
+
73
+
When you click the "Save" button, [the application stores the `id` of the chosen color scheme in your Rails session](https://github.com/joyofrails/joyofrails.com/blob/a08589e1cbe2accf4a20713829df56533e31755e/app/controllers/settings/color_schemes_controller.rb#L31):
0 commit comments