Skip to content

Commit 75e402b

Browse files
committed
Handful of tweaks before all-hands
1 parent eb2c563 commit 75e402b

File tree

6 files changed

+91
-49
lines changed

6 files changed

+91
-49
lines changed

app/assets/images/bubble-add.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
1+
.comments {
2+
hr {
3+
block-size: 6cqi;
4+
border-inline-start: 1px solid var(--splat-color);
5+
display: block;
6+
inline-size: 2px;
7+
margin: auto;
8+
overflow: initial;
9+
position: relative;
10+
11+
&::after {
12+
background: var(--color-bg);
13+
border: 2px solid var(--splat-color);
14+
border-radius: 50%;
15+
content: "";
16+
display: block;
17+
height: 1cqi;
18+
inline-size: 1cqi;
19+
inset: auto auto -0.5cqi auto;
20+
margin-inline-start: -0.5cqi;
21+
position: absolute;
22+
}
23+
24+
&::before {
25+
background: var(--color-bg);
26+
border: 2px solid var(--splat-color);
27+
border-radius: 50%;
28+
content: "";
29+
display: block;
30+
height: 1cqi;
31+
inline-size: 1cqi;
32+
inset: -0.5cqi auto auto auto;
33+
margin-inline-start: -0.5cqi;
34+
position: absolute;
35+
}
36+
}
37+
}
38+
139
.comment {
240
inline-size: 100%;
341
flex-wrap: wrap;
4-
border: 1px solid currentColor;
5-
border-radius: 1em;
6-
padding: var(--block-space);
7-
position: relative;
8-
9-
&:after {
10-
content: "";
11-
background: currentColor;
12-
block-size: var(--block-space);
13-
inline-size: 4px;;
14-
margin: auto;
15-
position: absolute;
16-
inset: auto 50% 0 auto;
17-
margin-block-end: calc(var(--block-space) * -1);
18-
}
1942
}

app/assets/stylesheets/splats.css

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
--splat-color: var(--color-ink);
2121
--splat-rotate: 20deg;
2222

23-
animation: float-up-left 400ms normal forwards ease-out;
2423
aspect-ratio: 1;
2524
block-size: var(--splat-size);
2625
color: var(--splat-color, currentColor);
@@ -31,13 +30,17 @@
3130
position: relative;
3231
transition: all 0.2s ease;
3332

34-
&:nth-of-type(2n+1) {
35-
animation-delay: 50ms;
36-
animation: float-down-right 400ms normal forwards ease-out;
37-
}
33+
.windshield & {
34+
animation: float-up-left 400ms normal forwards ease-out;
35+
36+
&:nth-of-type(2n+1) {
37+
animation-delay: 50ms;
38+
animation: float-down-right 400ms normal forwards ease-out;
39+
}
3840

39-
&:nth-of-type(3n+1) {
40-
animation-delay: 150ms;
41+
&:nth-of-type(3n+1) {
42+
animation-delay: 150ms;
43+
}
4144
}
4245

4346
.windshield &:nth-of-type(n+5) {
@@ -65,24 +68,6 @@
6568
}
6669
}
6770

68-
.splat__link {
69-
content: "";
70-
inset: 0;
71-
position: absolute;
72-
z-index: -1;
73-
}
74-
75-
.splat__svg {
76-
fill: var(--color-bg);
77-
position: absolute;
78-
scale: 1.1;
79-
stroke: var(--splat-color);
80-
stroke-width: 1.1rem;
81-
transform: rotate(var(--splat-rotate));
82-
transition: all 200ms ease-out;
83-
z-index: -1;
84-
}
85-
8671
.splat__bubble {
8772
background-color: var(--color-bg);
8873
border: 0.3em solid var(--splat-color);
@@ -159,6 +144,28 @@
159144
}
160145
}
161146

147+
.splat__link {
148+
content: "";
149+
inset: 0;
150+
position: absolute;
151+
z-index: -1;
152+
}
153+
154+
.splat__notes {
155+
position: relative;
156+
}
157+
158+
.splat__svg {
159+
fill: var(--color-bg);
160+
position: absolute;
161+
scale: 1.1;
162+
stroke: var(--splat-color);
163+
stroke-width: 1.1rem;
164+
transform: rotate(var(--splat-rotate));
165+
transition: all 200ms ease-out;
166+
z-index: -1;
167+
}
168+
162169
.splat__title {
163170
-webkit-line-clamp: var(--lines, 5);
164171
-webkit-box-orient: vertical;

app/views/splats/_splat.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<time class="splat__bubble splat__meta splat__date"><%= splat.created_at.strftime("%b <br> %d").html_safe %></time>
1111

1212
<% splat.categories.each do | category | %>
13-
<%= link_to category.title, splats_path(category_id: category.id), class: "splat__bubble splat__meta splat__category" %>
13+
<%= link_to "##{category.title}", splats_path(category_id: category.id), class: "splat__bubble splat__meta splat__category" %>
1414
<% end %>
1515

1616
<% if splat.categories.count < 3 %>

app/views/splats/index.html.erb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<% end %>
1919
</h1>
2020

21-
<%= link_to new_splat_path, class: "btn flex-item-justify-end" do %>
22-
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
21+
<%= link_to new_splat_path, class: "btn btn--plain flex-item-justify-end" do %>
22+
<%= image_tag "bubble-add.svg", aria: { hidden: true }, size: 24 %>
2323
<span class="for-screen-reader">Create a new splat</span>
2424
<% end %>
2525
</nav>
@@ -41,10 +41,9 @@
4141
<% end %>
4242
<small class="flex align-center gap flex-item-no-shrink">
4343
<% splat.categories.each do |category| %>
44-
<%= link_to "# #{ category.title }", splats_path(category_id: category.id) %>
44+
<%= link_to "# #{ category.title }", splats_path(category_id: category.id), style: "color: #{ splat.color }" %>
4545
<% end %>
46-
<span class="avatar txt-small txt-nowrap fill-shade"><strong>JZ</strong></span>
47-
<time class="txt-nowrap flex-item-justify-end"><%= splat.updated_at.strftime("%B %d").html_safe %></time>
46+
<time class="txt-nowrap flex-item-justify-end"><%= splat.created_at.strftime("%b %d").html_safe %></time>
4847
</small>
4948
</li>
5049
<% end %>

app/views/splats/show.html.erb

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<%= render @splat %>
2525
</div>
2626

27-
<div class="splat__notes txt-align-start panel center pad-block-half pad-inline-end fill-shade border-radius border margin-block-start-double flex align-start" style="--border-color: <%= @splat.color %>; background-color: <%= @splat.color -%>20">
27+
<div class="splat__notes fill-transparent txt-align-start panel center pad-block-half pad-inline-end borderless margin-block-start-double flex align-start" style="--splat-color: <%= @splat.color %>;">
2828
<div class="full-width">
2929
<%= simple_format @splat.body %>
3030
</div>
@@ -35,13 +35,18 @@
3535
<% end %>
3636
</div>
3737

38-
<section class="comments panel center borderless margin-block flex flex-column gap">
38+
<section class="comments panel center borderless margin-block flex flex-column gap" style="--splat-color: <%= @splat.color %>;">
39+
40+
<hr />
41+
3942
<div class="comment flex align-start gap">
4043
<header class="full-width margin-block">
41-
Added by <strong>Jason Zimdars</strong> <%= time_ago_in_words @splat.created_at %> ago.
44+
Added by <strong>Jason Zimdars</strong> on <%= @splat.created_at.strftime("%B %d") %> (<%= time_ago_in_words @splat.created_at %> ago).
4245
</header>
4346
</div>
4447

48+
<hr />
49+
4550
<div class="comment flex align-start gap">
4651
<div class="flex align-center gap">
4752
<span class="avatar fill-shade flex-item-no-shrink"><strong>JZ</strong></span>
@@ -54,6 +59,8 @@
5459
</div>
5560
</div>
5661

62+
<hr />
63+
5764
<div class="comment flex align-start gap">
5865
<div class="flex align-center gap">
5966
<span class="avatar fill-selected flex-item-no-shrink"><strong>JF</strong></span>
@@ -66,6 +73,8 @@
6673
</div>
6774
</div>
6875

76+
<hr />
77+
6978
<div class="comment flex align-start gap">
7079
<div class="flex align-center gap">
7180
<span class="avatar fill-black txt-reversed flex-item-no-shrink"><strong>JF</strong></span>
@@ -78,6 +87,9 @@
7887
<p>But if you hear about something similar happening to anyone else, please flag it here and I'll look more urgently.</p>
7988
</div>
8089
</div>
90+
91+
<hr />
92+
8193
<button class="btn btn--positive center">
8294
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
8395
<span class="for-screen-reader">Add a comment</span>

0 commit comments

Comments
 (0)