Skip to content

Commit 3ffe51a

Browse files
vanessayuennJasonEtcosarahsemilyistoofunky
authored
sublanding tweaks based on feedback (#17445)
* tweaks based on feedback * "marginalize" the columns with GUTTER * layout changes to align the learning track heading heights * star icon * update ui language Co-authored-by: Jason Etcovitch <jasonetco@github.com> Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
1 parent a42f609 commit 3ffe51a

3 files changed

Lines changed: 35 additions & 19 deletions

File tree

data/ui.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,5 @@ product_sublanding:
161161
how_to: How-to guide
162162
reference: Reference
163163
learning_track_nav:
164-
prevGuide: Previous Guide
165-
nextGuide: Next Guide
164+
prevGuide: Previous guide
165+
nextGuide: Next guide

layouts/product-sublanding.html

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ <h1 class="my-3 font-mktg">{{ page.shortTitle }}</h1>
2626
<ul class="list-style-none d-flex flex-nowrap overflow-x-scroll px-2 feature-track">
2727
<li class="px-2 d-flex flex-shrink-0">
2828
<div class="d-inline-block Box p-5 bg-gradient--blue-purple text-white">
29-
<div class="circle bg-white text-blue border border-white d-inline-flex">{% octicon "star-fill" height="24" class="v-align-middle m-2"%}</div>
30-
<h3 class="font-mktg h2-mktg my-4">{{ featuredTrack.title }}</h3>
29+
<div class="circle text-white d-inline-flex" style="border: 2px white solid;">{% octicon "star-fill" height="24" class="v-align-middle m-2"%}</div>
30+
<h3 class="font-mktg h3-mktg my-4">{{ featuredTrack.title }}</h3>
3131
<div class="lead-mktg text-white f5 my-4">{{ featuredTrack.description }}</div>
3232
<a class="d-inline-block border border-white text-white px-4 py-2 f5 no-underline text-bold" role="button" href="{{ featuredTrack.guides[0].href }}?learn={{ featuredTrack.trackName }}">
3333
<span class="mr-2">{% octicon "arrow-right" height="20" %}</span>
@@ -44,8 +44,8 @@ <h3 class="font-mktg h2-mktg my-4">{{ featuredTrack.title }}</h3>
4444
</div>
4545
<div class="text-gray-light h6 text-uppercase">{{ guideTypes[guide.page.type] }}</div>
4646
</div>
47-
<h3 class="font-mktg h2-mktg my-4 text-gray-dark">{{ guide.title }}</h3>
48-
<div class="lead-mktg text-gray f5 my-4">{{ guide.intro }}</div>
47+
<h3 class="font-mktg h3-mktg my-4 text-gray-dark">{{ guide.title }}</h3>
48+
<div class="lead-mktg text-gray f5 my-4 truncate-overflow-8">{{ guide.intro }}</div>
4949
</a>
5050
</li>
5151
{% endfor %}
@@ -59,23 +59,20 @@ <h2 class="mb-3 font-mktg">{% data ui.product_sublanding.learning_paths %}</h2>
5959
<div class="lead-mktg text-gray f4">{% data ui.product_sublanding.learning_paths_desc %}</div>
6060

6161
<!-- Learning tracks -->
62-
<div class="d-flex flex-wrap flex-items-start my-5">
62+
<div class="d-flex flex-wrap flex-items-start my-5 gutter">
6363
{% for track in page.learningTracks offset:1 %}
64-
<div class="my-3 px-0 px-4 col-12 col-md-6 learning-track">
65-
<div class="Box js-show-more-container">
66-
<div class="Box-header bg-gradient--purple-pink py-4 d-flex flex-auto flex-items-start flex-wrap">
64+
<div class="my-3 px-4 col-12 col-md-6 learning-track">
65+
<div class="Box js-show-more-container d-flex flex-column">
66+
<div class="Box-header bg-gradient--purple-pink p-4 d-flex flex-1 flex-items-start flex-wrap">
6767
<div class="d-flex flex-auto flex-items-start col-8 col-md-12 col-xl-8">
68-
<div class="circle bg-white text-purple border border-white d-inline-flex mr-4">
69-
{% octicon "star-fill" height="20" class="v-align-middle m-2"%}
70-
</div>
7168
<div class="my-xl-0 mr-xl-3">
72-
<h4 class="mb-3 text-white font-mktg h3-mktg ">
69+
<h5 class="mb-3 text-white font-mktg h3-mktg ">
7370
{{ track.title }}
74-
</h4>
75-
<p class="text-white">{{ track.description }}</p>
71+
</h5>
72+
<p class="text-white truncate-overflow-3 learning-track--description">{{ track.description }}</p>
7673
</div>
7774
</div>
78-
<a class="d-inline-block border border-white text-white px-3 py-2 f5 no-underline text-bold no-wrap" role="button" href="{{ track.guides[0].href }}?learn={{ track.trackName }}">
75+
<a class="d-inline-block border border-white text-white px-3 py-2 f5 no-underline text-bold no-wrap mt-3 mt-md-0" role="button" href="{{ track.guides[0].href }}?learn={{ track.trackName }}">
7976
{% data ui.product_sublanding.start %}
8077
<span class="ml-2">{% octicon "arrow-right" height="20" %}</span>
8178
</a>
@@ -86,7 +83,7 @@ <h4 class="mb-3 text-white font-mktg h3-mktg ">
8683
<div class="circle bg-gray d-inline-flex mr-4">
8784
<span class="m-2 f3 lh-condensed-ultra text-center text-bold text-gradient--purple-pink" style="min-width: 20px; height: 20px;">{{ forloop.index }}</span>
8885
</div>
89-
<h4 class="flex-auto">{{ guide.title }}</h4>
86+
<h5 class="flex-auto pr-2">{{ guide.title }}</h5>
9087
<div class="text-gray-light h6 text-uppercase">{{ guideTypes[guide.page.type] }}</div>
9188
</a>
9289
{% endfor %}

stylesheets/product-sublanding.scss

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,23 @@
22
li {
33
width: 280px;
44
}
5-
}
5+
}
6+
7+
.learning-track {
8+
&--description {
9+
min-height: 1em * $body-line-height * 3
10+
}
11+
}
12+
13+
@mixin truncate($maxLine) {
14+
.truncate-overflow-#{$maxLine} {
15+
display: -webkit-box;
16+
-webkit-line-clamp: $maxLine;
17+
-webkit-box-orient: vertical;
18+
overflow: hidden;
19+
text-overflow: ellipsis;
20+
}
21+
}
22+
23+
@include truncate(3);
24+
@include truncate(8);

0 commit comments

Comments
 (0)