Skip to content

Commit cb98058

Browse files
authored
repo sync
2 parents 5903fb0 + dd91c5a commit cb98058

12 files changed

+113
-5
lines changed

content/actions/guides/building-and-testing-powershell.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ product: '{% data reusables.gated-features.actions %}'
55
versions:
66
free-pro-team: '*'
77
enterprise-server: '>=2.22'
8+
authors:
9+
- potatoqualitee
810
---
911

1012
{% data reusables.actions.enterprise-beta %}

content/actions/guides/publishing-nodejs-packages.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ redirect_from:
88
versions:
99
free-pro-team: '*'
1010
enterprise-server: '>=2.22'
11+
authors:
12+
- GitHub
1113
---
1214

1315
{% data reusables.actions.enterprise-beta %}

content/actions/guides/setting-up-continuous-integration-using-workflow-templates.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ redirect_from:
1111
versions:
1212
free-pro-team: '*'
1313
enterprise-server: '>=2.22'
14+
authors:
15+
- GitHub
1416
---
1517

1618
{% data reusables.actions.enterprise-beta %}

content/actions/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ featuredLinks:
1313
gettingStarted:
1414
- /actions/managing-workflow-runs
1515
- /actions/hosting-your-own-runners
16+
guideCards:
17+
- /actions/guides/setting-up-continuous-integration-using-workflow-templates
18+
- /actions/guides/publishing-nodejs-packages
19+
- /actions/guides/building-and-testing-powershell
1620
popular:
1721
- /actions/reference/workflow-syntax-for-github-actions
1822
- /actions/reference/events-that-trigger-workflows
@@ -56,7 +60,7 @@ versions:
5660

5761
<!-- Code examples -->
5862
<div class="my-6 pt-6">
59-
<h2 class="mb-2">More guides</h2>
63+
<h2 class="mb-2 font-mktg h1">Code examples</h2>
6064

6165
<div class="d-flex flex-wrap gutter">
6266
<div class="col-12 col-lg-4 mb-4">
@@ -156,6 +160,4 @@ versions:
156160
</a>
157161
</div>
158162
</div>
159-
160-
<a href="/actions/guides" class="btn btn-outline mt-4">Show all guides {% octicon "arrow-right" %}</a>
161163
</div>

includes/guide-card.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{% assign authorsString = guide.page.authors | join: ", @" %}
2+
3+
<div class="col-lg-4 col-12 mb-3">
4+
<a class="Box box-shadow-medium height-full d-block hover-shadow-large no-underline text-gray-dark p-5" href="{{ guide.href }}">
5+
<h2>{{ guide.title }}</h2>
6+
<p class="mt-2 mb-4 text-gray-light">{{ guide.intro }}</p>
7+
8+
{% if guide.page.authors and guide.page.authors.length > 0 %}
9+
<footer class="d-flex">
10+
<div class="mr-1">
11+
{% if guide.page.authors.length == 1 %}
12+
<img class="avatar avatar-2 circle mr-1" src="https://github.com/{{ guide.page.authors[0] }}.png" alt="@{{ guide.page.authors[0] }}" />
13+
{% else %}
14+
<div class="AvatarStack AvatarStack--three-plus">
15+
<div
16+
class="AvatarStack-body tooltipped tooltipped-se tooltipped-align-left-1"
17+
aria-label="@{{ authorsString }}"
18+
>
19+
{% for author in guide.page.authors %}
20+
<img
21+
class="avatar circle"
22+
alt="@{{ author }}"
23+
src="https://github.com/{{ author }}.png"
24+
/>
25+
{% endfor %}
26+
</div>
27+
</div>
28+
{% endif %}
29+
</div>
30+
31+
<div>
32+
@{{ authorsString }}
33+
</div>
34+
</footer>
35+
{% endif %}
36+
</a>
37+
</div>

layouts/product-landing.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,21 @@ <h4>{{ link.title }} <span class="Bump-link-symbol">→</span></h4>
8383
{{ renderedPage }}
8484
</div>
8585

86+
{% if featuredLinks.guideCards %}
87+
<div class="bg-guides-gradient py-6">
88+
<div class="container-xl px-3 px-md-6 my-6">
89+
<h2 class="font-mktg h1 mb-2">Guides</h2>
90+
91+
<div class="d-lg-flex gutter-lg flex-items-stretch">
92+
{% assign guideCards = featuredLinks.guideCards %}
93+
{% render "guide-card" for guideCards as guide %}
94+
</div>
95+
96+
<a href="{{ currentPath }}/guides" class="btn btn-outline float-right">Explore guides {% octicon "arrow-right" %}</a>
97+
</div>
98+
</div>
99+
{% endif %}
100+
86101
<div class="border-top">
87102
{% include small-footer %}
88103
</div>

lib/frontmatter.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ const schema = {
6262
reference: { type: 'string' }
6363
}
6464
},
65+
authors: {
66+
type: 'array',
67+
items: {
68+
type: 'string'
69+
}
70+
},
6571
featuredLinks: {
6672
type: 'object',
6773
additionalProperties: false,

middleware/csp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ module.exports = contentSecurityPolicy({
2121
'github.githubassets.com',
2222
'github-images.s3.amazonaws.com',
2323
'octodex.github.com',
24-
'placehold.it'
24+
'placehold.it',
25+
'*.githubusercontent.com',
26+
'github.com'
2527
],
2628
objectSrc: [
2729
"'self'"

middleware/featured-links.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ async function getLinkData (rawLinks, context) {
4343
links.push({
4444
href,
4545
title: await linkedPage.renderTitle(context, opts),
46-
intro: await linkedPage.renderProp('intro', context, opts)
46+
intro: await linkedPage.renderProp('intro', context, opts),
47+
page: linkedPage
4748
})
4849
}
4950

stylesheets/index.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
@import "@primer/css/tooltips/index.scss";
2828
@import "@primer/css/truncate/index.scss";
2929
@import "@primer/css/utilities/index.scss";
30+
@import "@primer/css/avatars/index.scss";
3031
// END CUSTOM CORE IMPORT
3132

3233
@import "@primer/css/markdown/index.scss";
@@ -52,3 +53,5 @@ $marketing-font-path: "/dist/fonts/";
5253
@import "tables.scss";
5354
@import "opacity.scss";
5455
@import "print.scss";
56+
@import "shadows.scss";
57+
@import "product-landing.scss";

stylesheets/product-landing.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.bg-guides-gradient {
2+
background: linear-gradient(0deg, rgba(33, 136, 255, 0.11) 0%, rgba(255, 255, 255, 0) 100%);
3+
}

stylesheets/shadows.scss

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.hover-shadow {
2+
& {
3+
transition: box-shadow 0.3s ease-in-out;
4+
5+
&:hover {
6+
box-shadow: $box-shadow !important;
7+
}
8+
}
9+
10+
&-medium {
11+
transition: box-shadow 0.3s ease-in-out;
12+
13+
&:hover {
14+
box-shadow: $box-shadow-medium !important;
15+
}
16+
}
17+
18+
&-large {
19+
transition: box-shadow 0.3s ease-in-out;
20+
21+
&:hover {
22+
box-shadow: $box-shadow-large !important;
23+
}
24+
}
25+
26+
&-extra-large {
27+
transition: box-shadow 0.3s ease-in-out;
28+
29+
&:hover {
30+
box-shadow: $box-shadow-extra-large !important;
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)