Skip to content

Commit cb7c128

Browse files
committed
feat: Improve work section UX and formatting
Homepage: - Change "portfolio" link to "work" and link to /work route Work story page: - Increase paragraph spacing (1.75rem bottom margin) - Increase line height to 2 for better readability - Larger font size (1.125rem) for story content - Bold text now acts as section headers (block display, larger) - Better spacing for section breaks (3rem top margin for h2) - Improved hr styling for section dividers - Footer metadata has smaller, inline styling Slash command: - Add comprehensive markdown formatting guidelines - Require blank lines between all paragraphs - Use **Bold** for section headers (not ##) - Proper spacing for lists and code blocks - Example structure with formatting rules
1 parent 8f7db20 commit cb7c128

File tree

2 files changed

+71
-14
lines changed

2 files changed

+71
-14
lines changed

app/views/pages/home.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
Right now I'm working on building this space and
2626
<%= link_to "RZMetaversity", "https://github.com/rz1989s/RZMetaversity", target: "_blank", rel: "noopener" %>
2727
a decentralized learning platform for Web3 builders.
28-
You can explore my <%= link_to "portfolio", "#" %>,
28+
You can explore my <%= link_to "work", works_path %>,
2929
peek at <%= link_to "labs", "#" %> experiments,
3030
read my <%= link_to "journal", "#" %>,
3131
or browse my <%= link_to "cheatsheet", "#" %>.

app/views/works/show.html.erb

Lines changed: 70 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,40 +51,79 @@
5151
</div>
5252

5353
<style>
54-
.story-content h1, .story-content h2, .story-content h3 {
54+
/* Main story heading */
55+
.story-content > h1:first-child {
56+
font-size: 2.5rem;
5557
font-weight: 700;
5658
color: #3B2C22;
57-
margin-top: 2rem;
59+
margin-bottom: 2rem;
60+
line-height: 1.2;
61+
}
62+
63+
/* Section headings */
64+
.story-content h2 {
65+
font-size: 1.5rem;
66+
font-weight: 700;
67+
color: #3B2C22;
68+
margin-top: 3rem;
5869
margin-bottom: 1rem;
5970
}
6071

61-
.story-content h1 { font-size: 2rem; }
62-
.story-content h2 { font-size: 1.5rem; }
63-
.story-content h3 { font-size: 1.25rem; }
72+
.story-content h3 {
73+
font-size: 1.25rem;
74+
font-weight: 600;
75+
color: #3B2C22;
76+
margin-top: 2rem;
77+
margin-bottom: 0.75rem;
78+
}
6479

80+
/* Paragraphs - generous spacing for readability */
6581
.story-content p {
66-
margin-bottom: 1.5rem;
67-
line-height: 1.875;
82+
margin-bottom: 1.75rem;
83+
line-height: 2;
84+
font-size: 1.125rem;
85+
}
86+
87+
/* Bold text in paragraphs - acts as mini section headers */
88+
.story-content p strong {
89+
display: block;
90+
font-weight: 600;
91+
margin-top: 2rem;
92+
margin-bottom: 0.5rem;
93+
font-size: 1.25rem;
6894
}
6995

96+
/* Links */
7097
.story-content a {
7198
color: #41CFFF;
7299
text-decoration: underline;
100+
transition: color 0.2s;
73101
}
74102

75103
.story-content a:hover {
76104
color: #E58C2E;
77105
}
78106

107+
/* Lists - better spacing */
79108
.story-content ul, .story-content ol {
80-
margin-bottom: 1.5rem;
109+
margin-bottom: 2rem;
81110
padding-left: 2rem;
111+
line-height: 1.875;
82112
}
83113

84114
.story-content li {
85-
margin-bottom: 0.5rem;
115+
margin-bottom: 0.75rem;
116+
}
117+
118+
/* Horizontal rules - section dividers */
119+
.story-content hr {
120+
border: none;
121+
border-top: 2px solid #3B2C22;
122+
opacity: 0.1;
123+
margin: 3rem 0;
86124
}
87125

126+
/* Inline code */
88127
.story-content code {
89128
background-color: #3B2C22;
90129
color: #FFF7E1;
@@ -93,26 +132,44 @@
93132
font-size: 0.875em;
94133
}
95134

135+
/* Code blocks */
96136
.story-content pre {
97137
background-color: #3B2C22;
98138
color: #FFF7E1;
99-
padding: 1rem;
139+
padding: 1.25rem;
100140
border-radius: 0.5rem;
101141
overflow-x: auto;
102-
margin-bottom: 1.5rem;
142+
margin-bottom: 2rem;
143+
line-height: 1.5;
103144
}
104145

105146
.story-content pre code {
106147
background-color: transparent;
107148
padding: 0;
108149
}
109150

151+
/* Blockquotes */
110152
.story-content blockquote {
111153
border-left: 4px solid #41CFFF;
112-
padding-left: 1rem;
154+
padding-left: 1.5rem;
113155
font-style: italic;
114156
color: #3B2C22;
115157
opacity: 0.8;
116-
margin-bottom: 1.5rem;
158+
margin-bottom: 2rem;
159+
margin-top: 2rem;
160+
font-size: 1.125rem;
161+
}
162+
163+
/* Footer section - distinct styling */
164+
.story-content > hr:last-of-type ~ p {
165+
font-size: 1rem;
166+
line-height: 1.75;
167+
}
168+
169+
.story-content > hr:last-of-type ~ p strong {
170+
display: inline;
171+
font-weight: 600;
172+
font-size: inherit;
173+
margin: 0;
117174
}
118175
</style>

0 commit comments

Comments
 (0)