Skip to content

Initial layout on tutorial page #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jathayde
Copy link
Contributor

image

There are some oddities stemming from the font-size: 0; line-height: 0; declaration from ~ 4 years ago (cards.scss:2 & 3). I decided to override them instead of refactoring the entire site.

Some formatting cleanup for legibility from my previous docs page work as well.

@AmandaPerino
Copy link
Collaborator

Made some copy updates! Is there anything we can do about all this white space to the right? It seems awfully crowded to the left and open on the right.

Screenshot 2025-06-27 at 22 20 26

@jathayde
Copy link
Contributor Author

Made some copy updates! Is there anything we can do about all this white space to the right? It seems awfully crowded to the left and open on the right.

Screenshot 2025-06-27 at 22 20 26

Yes. Let me work that to not be 50/50 and just be the content width.

@jathayde
Copy link
Contributor Author

jathayde commented Jul 1, 2025

Updated:
image

@jathayde
Copy link
Contributor Author

Updated full page screenshot from Firefox:
Screenshot 2025-07-15 at 20-01-44 Ruby on Rails Tutorials

@jathayde
Copy link
Contributor Author

The fullwidth card is weird in how it behaves responsively. Could use some pairing on that to make it more robust.

@AmandaPerino
Copy link
Collaborator

Would be nice to close the space a bit between the Beginner and Advanced section. I'll ask around for some help.

@ghiculescu
Copy link
Member

Quick comment from Amanda's call for help - this is a really good use case for an AI agent. For example I put this prompt into Claude Code: "The "fullwidth" card in _pages/tutorial.html isnt working well on narrow screens. Here is a screenshot: [Image #1]. It looks fine on wider screens. What should I do to fix it?" with this screenshot:

image

I needed two cracks at it, once I gave it a screenshot of how it looks on a wider screen it came up with this, which seems to fix things for me:

diff --git a/_sass/modules/_cards.scss b/_sass/modules/_cards.scss
index 8b7e2e1..6e23ab1 100755
--- a/_sass/modules/_cards.scss
+++ b/_sass/modules/_cards.scss
@@ -30,7 +30,7 @@
     z-index: 1;

     &.card__fullwidth {
-      grid-template-columns: minmax(600px, 800px);
+      grid-template-columns: minmax(0, 800px);
       justify-content: center;

       .card {
@@ -46,6 +46,7 @@
             width: 100%;
             margin: 1em;
             height: auto;
+            max-width: 100%;
           }

           h3 {
@@ -227,6 +228,28 @@
     }
   }

+  @media (max-width: 767px) {
+    &__container {
+      &.card__fullwidth {
+        .card__body {
+          flex-direction: column;
+          align-items: center;
+          padding: 1em;
+
+          img {
+            width: 100% !important;
+            max-width: 400px;
+            margin: 0 0 1.5em 0;
+          }
+
+          > div {
+            width: 100%;
+          }
+        }
+      }
+    }
+  }
+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants